schrodinger.application.jaguar.workflow_validation module¶
Workflow keywords input validation and specialized Exceptions
- 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.