schrodinger.application.jaguar.reactiq_validation module¶
Reactiq keywords input validation and specialized Exceptions
-
exception
schrodinger.application.jaguar.reactiq_validation.
AutoTSAtomClassConflict
¶ Bases:
schrodinger.application.jaguar.exceptions.JaguarUserFacingException
Runtime Error indicating there is a problem with the atom class definition
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
schrodinger.application.jaguar.reactiq_validation.
AutoTSInvalidConstraintError
¶ Bases:
schrodinger.application.jaguar.exceptions.JaguarUserFacingException
An invalid constraint
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
schrodinger.application.jaguar.reactiq_validation.
check_conflicts
(kwd, all_keywords)¶ Raise Exception if keyword value is inconsistent with the other keywords. This is done in an adhoc case-by-case way.
Parameters: - kwd (ReactiqKeyword) – reference Reactiq keyword
- all_keywords (dict of ReactiqKeyword instances indexed by name) – all the other Reactiq keywords set
:raise WorkflowKeywordConflictError if conflicting values found.
-
schrodinger.application.jaguar.reactiq_validation.
reaction_is_supported
(reactants, products)¶ Check that the input reaction is supported, if not raise an UnsupportedReaction.
-
schrodinger.application.jaguar.reactiq_validation.
matter_is_conserved
(reactants, products)¶ Check the input structures to ensure that matter is conserved. If matter is not conserved a ReactiqConservationError is raised.
Parameters: - reactants (Structure object or iterable of Structure objects) – the reactants or reactant complex
- products (Structure object or iterable of Structure objects) – the reactants or reactant complex
Return type: bool
Returns: whether or not matter is conserved
-
schrodinger.application.jaguar.reactiq_validation.
validate_atom_classes
(reactants, products)¶ Check the input structures to ensure that if atom classes are defined they are defined for an equal number of atoms in each class on each side of the reaction. This is required to be able to compute an atom map.
Parameters: - reactants (Structure object or iterable of Structure objects) – the reactants or reactant complex
- products (Structure object or iterable of Structure objects) – the reactants or reactant complex
Return type: bool
Returns: whether or not atom classes are valid
-
schrodinger.application.jaguar.reactiq_validation.
charge_is_conserved
(reactants, products)¶ Check the input structures to ensure that charge is conserved. If charge is not conserved a ReactiqConservationError is raised.
Parameters: - reactants (Structure object or iterable of Structure objects) – the reactants or reactant complex
- products (Structure object or iterable of Structure objects) – the reactants or reactant complex
Return type: bool
Returns: whether or not matter is conserved
-
schrodinger.application.jaguar.reactiq_validation.
validate_jag_keys
(jaguar_keywords)¶ raise an exception if tmpini, press, or pbf_after_pcm are keywords
Parameters: jaguar_keywords (dict) – key: value dict of jaguar keywords
-
schrodinger.application.jaguar.reactiq_validation.
validate_constraints
(rinp)¶ Validate any constraints that have been read. This ensures that the constraints can be mapped onto the input reactant/product molecules.
- Specifically the properties that are required are:
- relax_path = True cannot be set if we have constraints
- The input reactants and products must have unique titles
- Each constraint must map to some titled molecule or COMPLEX_STRUCTURE_CONSTRAINT if both reactant and product complexes are defined
- Atom indexes of the constraint must be between 1 and the number of atoms in that molecule.
- constraints cannot be in rings
- Atom indexes for complex constraints cannot span multiple molecules.
-
schrodinger.application.jaguar.reactiq_validation.
validate_structures
(rinp)¶ Perform a check to ensure that matter is conserved and that charge/multiplicity are consistent with structures.
A WorkflowConservationError is raised if any test fails.