schrodinger.application.mlff.validation module

exception schrodinger.application.mlff.validation.MLFFSupportError

Bases: Exception

Error in supporting an MLFF.

class schrodinger.application.mlff.validation.MLFFSupportSummary(lic_error: str | None, unsupported_error: str | None, is_supported: list[bool], unsupported_structures: list[Structure])

Bases: object

Summary of MLFF support for a list of structures

Parameters:
  • lic_error – error message if MLFF license is not available

  • unsupported_error – error message if MLFF is not supported

  • is_supported – list of booleans indicating support for each structure

  • unsupported_strucctures – list of structures that are unsupported

lic_error: str | None
unsupported_error: str | None
is_supported: list[bool]
unsupported_structures: list[Structure]
raise_errors()
__init__(lic_error: str | None, unsupported_error: str | None, is_supported: list[bool], unsupported_structures: list[Structure]) None
schrodinger.application.mlff.validation.get_qrnn_mlff_support(structures: list[Structure], model: str | int = 3, ignore_pbc: bool = False) MLFFSupportSummary

Check each structure for compatibility with QRNN or MLFF. Wrapper to avoid the need for calling code to disambiguate whether they need to call get_qrnn_support or get_mlff_support.

Parameters:
  • structures – list of structures to be classified

  • model – choice of QRNN or MLFF model in the form of a model name str

  • ignore_pbc – ignore PBC information on the structures

Returns:

summary of QRNN/MLFF support for the structures and license status

schrodinger.application.mlff.validation.missing_mlff_license() str | None

Check if MLFF license exists. Catches runtime error and stores the error message.

Returns:

error message if MLFF license is not available

schrodinger.application.mlff.validation.get_mlff_support(structures: list[Structure], model_name: str, ignore_pbc: bool = False) MLFFSupportSummary

Validate that the structures are supported by the MLFF model.

Parameters:
  • structures – List of structures to validate

  • model_name – MLFF model to validate against

  • ignore_pbc – Ignore PBC information on the structures

Returns:

summary of MLFF support for the structures and license status

schrodinger.application.mlff.validation.get_qrnn_support(structs: list[Structure], solvent: Solvent = 0, model: QRNNModel = 3, ignore_pbc: bool = False) MLFFSupportSummary

Check each structure for compatibility with QRNN model in terms of supported elements. If any unsupported, the returned MLFFSupportSummary object will have a message in the unsupported_error attribute and the entries in the is_supported list will be False for those structures. If a QRNN license is not available, the lic_error attribute will be set and the is_supported list will be empty, since we can’t check the structures without a license.

Parameters:
  • structs – list of structures to be classified

  • solvent – solvent choice supported by QRNN model

  • model – choice of QRNN model

  • ignore_pbc – ignore PBC information on the structures

Returns:

summary of QRNN support for the structures and license status