schrodinger.application.jaguar.reactiq_validation module¶
Reactiq keywords input validation and specialized Exceptions
-
exception
schrodinger.application.jaguar.reactiq_validation.
ReactiqConservationError
¶ Bases:
schrodinger.application.jaguar.exceptions.JaguarUserFacingException
Runtime error due to a failure to conserve matter
-
exception
schrodinger.application.jaguar.reactiq_validation.
ReactiqKeywordConflictError
(mykey, key, value)¶ Bases:
schrodinger.application.jaguar.reactiq_validation.ReactiqKeywordException
Exception class raised when Reactiq keywords have conflicting values
-
exception
schrodinger.application.jaguar.reactiq_validation.
ReactiqKeywordError
(keyword, allowed_keywords)¶ Bases:
schrodinger.application.jaguar.reactiq_validation.ReactiqKeywordException
Exception class raised when nonexistant Reactiq keyword is requested
-
exception
schrodinger.application.jaguar.reactiq_validation.
ReactiqKeywordException
¶ Bases:
schrodinger.application.jaguar.exceptions.JaguarUserFacingException
Base exception class for all custom Reactiq keyword validation errors
-
exception
schrodinger.application.jaguar.reactiq_validation.
ReactiqKeywordFormatError
(token)¶ Bases:
schrodinger.application.jaguar.reactiq_validation.ReactiqKeywordException
Exception class raised when a string not in the keyword=value format is found
-
exception
schrodinger.application.jaguar.reactiq_validation.
ReactiqKeywordValueError
(keyword, value, choices)¶ Bases:
schrodinger.application.jaguar.reactiq_validation.ReactiqKeywordException
Exception class raised when Reactiq keyword value is invalid
-
exception
schrodinger.application.jaguar.reactiq_validation.
ReactiqKeywordValueTypeError
(keyword, value, valid_type)¶ Bases:
schrodinger.application.jaguar.reactiq_validation.ReactiqKeywordException
Exception class raised when Reactiq keyword value has wrong type
-
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.
charge_is_consistent
(strs, charge)¶ Tests that the sum of molecular charges is consistent with the total charge. raises ReactiqConservationError if this criterion is not satisfied.
Parameters: - strs (Structure or iterable of Structure objects) – reactant or product structure(s) to check
- charge (int) – overall charge of reaction
-
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 ReactiqKeywordConflictError if conflicting values found.
-
schrodinger.application.jaguar.reactiq_validation.
estate_is_physical
(strs, charge, mult)¶ Check whether or not the requested electronic state is plausible. This is done by ensuring the number of electrons is consistent with the requested charge/multiplicity. Raises a ReactiqConservationError
Parameters: - strs (Structure object or iterable of Structure objects) – the reactants or reactant complex
- charge (int) – overall charge
-
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.
raise_voluptuous_exception
(exception, kwd)¶ Re-raise voluptuous Exceptions as ReactiqKeywordException’s
-
schrodinger.application.jaguar.reactiq_validation.
reaction_is_supported
(reactants, products)¶ Check that the input reaction is supported, if not raise an UnsupportedReaction.