schrodinger.application.jaguar.autots_validation module¶
AutoTS keywords input validation and specialized Exceptions
- exception schrodinger.application.jaguar.autots_validation.AutoTSAtomClassConflict¶
Bases:
JaguarUserFacingException
Runtime Error indicating there is a problem with the atom class definition
- exception schrodinger.application.jaguar.autots_validation.AutoTSInvalidConstraintError¶
Bases:
JaguarUserFacingException
An invalid constraint
- schrodinger.application.jaguar.autots_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 (AutoTSKeyword) – reference AutoTS keyword
all_keywords (dict of AutoTSKeyword instances indexed by name) – all the other AutoTS keywords set
:raise WorkflowKeywordConflictError if conflicting values found.
- schrodinger.application.jaguar.autots_validation.reaction_is_supported(reactants, products)¶
Check that the input reaction is supported, if not raise an UnsupportedReaction.
- schrodinger.application.jaguar.autots_validation.matter_is_conserved(reactants, products)¶
Check the input structures to ensure that matter is conserved. If matter is not conserved a AutoTSConservationError 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 matter is conserved
- schrodinger.application.jaguar.autots_validation.isotopes_are_conserved(r: List[Structure], p: List[Structure])¶
Compare two lists of structures to check if the same number of each isotope is present for both lists, (i.e. they could be isomers), raises wv.WorkflowConservationError if this is not the case.
- Parameters:
sts_r – List of reactant structures to be compared.
sts_p – List of product structures to be compared.
- Raises:
wv.WorkflowConservationError if isotopes are inconsistent.
- schrodinger.application.jaguar.autots_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 atom classes are valid
- schrodinger.application.jaguar.autots_validation.charge_is_conserved(reactants, products)¶
Check the input structures to ensure that charge is conserved. If charge is not conserved a AutoTSConservationError 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 matter is conserved
- schrodinger.application.jaguar.autots_validation.get_stoich_charge(sts)¶
Return the stoichiometry and charge of a list of structures or structure as a string
- Parameters:
sts (list of Structures or Structure instance) – structures to print stoichiometry and charges of
- Return type:
string
- Returns:
the stoichiometry and charge of the input structure(s)
- schrodinger.application.jaguar.autots_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.autots_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.
Unless it’s an atomic constraint (frozen atom) in which case it’s the wild west
- schrodinger.application.jaguar.autots_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.