schrodinger.application.jaguar.workflow_validation module¶
Workflow keywords input validation and specialized Exceptions
- class schrodinger.application.jaguar.workflow_validation.QRNNSupportSummary(lic_error: str | None, unsupported_error: str | None, is_supported: list[bool])¶
Bases:
object
Summary of QRNN support for a list of structures
- Parameters
lic_error – error message if QRNN license is not available
unsupported_error – error message if QRNN is not supported
is_supported – list of booleans indicating support for each structure
- lic_error: str | None¶
- unsupported_error: str | None¶
- is_supported: list[bool]¶
- raise_errors()¶
- __init__(lic_error: str | None, unsupported_error: str | None, is_supported: list[bool]) None ¶
- exception schrodinger.application.jaguar.workflow_validation.WorkflowKeywordException¶
Bases:
schrodinger.application.jaguar.exceptions.JaguarUserFacingException
Base exception class for all custom Workflow keyword validation errors
- exception schrodinger.application.jaguar.workflow_validation.WorkflowConservationError¶
Bases:
schrodinger.application.jaguar.exceptions.JaguarUserFacingException
Runtime error due to a failure to conserve something
- exception schrodinger.application.jaguar.workflow_validation.WorkflowKeywordError(keyword: str, allowed_keywords: list)¶
Bases:
schrodinger.application.jaguar.workflow_validation.WorkflowKeywordException
Exception class raised when nonexistent Workflow keyword is requested
- __init__(keyword: str, allowed_keywords: list)¶
- Parameters
keyword – input keyword
allowed_keywords – list of allowed keywords
- exception schrodinger.application.jaguar.workflow_validation.WorkflowKeywordValueTypeError(keyword: str, value, valid_type: Type)¶
Bases:
schrodinger.application.jaguar.workflow_validation.WorkflowKeywordException
Exception class raised when Workflow keyword value has wrong type
- __init__(keyword: str, value, valid_type: Type)¶
- Parameters
keyword – input keyword
value – input value
valid_type – types as documented in the appropriate
*_keywords.py
file
- exception schrodinger.application.jaguar.workflow_validation.WorkflowKeywordValueError(keyword: str, value, choices: list)¶
Bases:
schrodinger.application.jaguar.workflow_validation.WorkflowKeywordException
Exception class raised when Workflow keyword value is invalid
- __init__(keyword: str, value, choices: list)¶
- Parameters
keyword – input keyword
value – input value
choices – valid choices associated with a keyword
- exception schrodinger.application.jaguar.workflow_validation.WorkflowKeywordConflictError(mykey: Optional[str] = None, key: Optional[str] = None, value=None, msg: Optional[str] = None)¶
Bases:
schrodinger.application.jaguar.workflow_validation.WorkflowKeywordException
Exception class raised when Workflow keywords have conflicting values
- __init__(mykey: Optional[str] = None, key: Optional[str] = None, value=None, msg: Optional[str] = None)¶
- Parameters
mykey – keyword name
key – required keyword name
value – required keyword value
msg – generic message to override template
- exception schrodinger.application.jaguar.workflow_validation.WorkflowKeywordFormatError(token: str)¶
Bases:
schrodinger.application.jaguar.workflow_validation.WorkflowKeywordException
Exception class raised when a string not in the keyword=value format is found
- __init__(token: str)¶
- Parameters
token – The token that violates the keyword=value format
- exception schrodinger.application.jaguar.workflow_validation.ConstraintFormatError(token: str)¶
Bases:
schrodinger.application.jaguar.exceptions.JaguarUserFacingException
Exception class raised when a string does not have the correct number of fields for a constraint
- __init__(token: str)¶
- Parameters
token – The token that violates the format
- exception schrodinger.application.jaguar.workflow_validation.JaguarKeywordConflict¶
Bases:
schrodinger.application.jaguar.workflow_validation.WorkflowKeywordException
Exception class raised when a Jaguar keyword is set that we wish to prevent in this workflow
- schrodinger.application.jaguar.workflow_validation.raise_voluptuous_exception(exception: Exception, kwd: schrodinger.application.jaguar.workflow_keywords.WorkflowKeyword)¶
Re-raise voluptuous Exceptions as WorkflowKeywordException’s
- schrodinger.application.jaguar.workflow_validation.estate_is_physical(structures: Union[schrodinger.structure._structure.Structure, Iterable[schrodinger.structure._structure.Structure]], charge: int, mult: int)¶
Check whether the requested electronic state is plausible. This is done by ensuring the number of electrons is consistent with the requested charge/multiplicity. Raises a WorkflowConservationError
- Parameters
structures – the reactants or reactant complex
charge – overall charge
mult – overall spin multiplicity
- Raises
- schrodinger.application.jaguar.workflow_validation.charge_is_consistent(structures: Union[schrodinger.structure._structure.Structure, Iterable[schrodinger.structure._structure.Structure]], charge: int)¶
Tests that the sum of molecular charges is consistent with the total charge. raises WorkflowConservationError if this criterion is not satisfied.
- Parameters
structures – reactant or product structure(s) to check
charge – overall charge of reaction
- schrodinger.application.jaguar.workflow_validation.basis_set_is_valid(structures: Union[schrodinger.structure._structure.Structure, Iterable[schrodinger.structure._structure.Structure]], basis: str)¶
Checks that the given basis set is defined for all atoms in the structures. A JaguarUnsupportedBasisSet is raised if the basis is not supported.
- Parameters
structures – structures to check
basis – name of basis set
- schrodinger.application.jaguar.workflow_validation.valid_smarts(smarts: str)¶
Checks that the given SMARTS is valid
- Parameters
smarts – SMARTS string to check
- schrodinger.application.jaguar.workflow_validation.validate_charges(st: schrodinger.structure._structure.Structure, charge: Optional[int] = None, mult: Optional[int] = None) tuple[int, int] ¶
Validate the charge and multiplicity for a structure. If charge is not specified, the total charge of the structure is used. If multiplicity is not specified, it is calculated based on the number of electrons and the charge.
- Parameters
st – structure instance
charge – structure total charge
mult – specified multiplicity
- Raise
WorkflowConservationError if the specification is invalid.
- schrodinger.application.jaguar.workflow_validation.missing_qrnn_license() str | None ¶
Check if QRNN license exists. Catches runtime error and stores the error message.
- Returns
error message if QRNN license is not available
- schrodinger.application.jaguar.workflow_validation.get_qrnn_support(structs: list[schrodinger.structure._structure.Structure], solvent: schrodinger.energy.Solvent = 0, model: schrodinger.energy.QRNNModel = 3) schrodinger.application.jaguar.workflow_validation.QRNNSupportSummary ¶
Check each structure for compatibility with QRNN model in terms of supported elements. If any unsupported, the returned QRNNSupportSummary object will have a message in the
unsupported_error
attribute and the entries in theis_supported
list will be False for those structures.- Parameters
structs – list of structures to be classified
solvent – solvent choice supported by QRNN model
model – choice of QRNN model
- Returns
summary of QRNN support for the structures and license status