schrodinger.application.jaguar.utils module¶
Jaguar utility functions.
Copyright Schrodinger, LLC. All rights reserved.
-
class
schrodinger.application.jaguar.utils.
FreeEnergy
(temp, gibbs, property_key)¶ Bases:
tuple
-
__add__
¶ Return self+value.
-
__class__
¶ alias of
builtins.type
-
__contains__
¶ Return key in self.
-
__delattr__
¶ Implement delattr(self, name).
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__getitem__
¶ Return self[key].
-
__getnewargs__
()¶ Return self as a plain tuple. Used by copy and pickle.
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__iter__
¶ Implement iter(self).
-
__le__
¶ Return self<=value.
-
__len__
¶ Return len(self).
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.jaguar.utils'¶
-
__mul__
¶ Return self*value.n
-
__ne__
¶ Return self!=value.
-
static
__new__
(_cls, temp, gibbs, property_key)¶ Create new instance of FreeEnergy(temp, gibbs, property_key)
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
()¶ Return a nicely formatted representation string
-
__rmul__
¶ Return self*value.
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__slots__
= ()¶
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
count
(value) → integer -- return number of occurrences of value¶
-
gibbs
¶ Alias for field number 1
-
index
(value[, start[, stop]]) → integer -- return first index of value.¶ Raises ValueError if the value is not present.
-
property_key
¶ Alias for field number 2
-
temp
¶ Alias for field number 0
-
-
schrodinger.application.jaguar.utils.
append_outfiles_to_recover_file
(recover_file, outfiles)¶ Append list of output file paths to a YAML-format .recover file.
Parameters: - recover_file (str) – .recover file name
- outfiles (list of str) – list of output file paths
-
schrodinger.application.jaguar.utils.
get_jobname
(prefix, str_to_hash)¶ Construct a jobname based on the given string prefix (typically the backend script name) and a string to be hashed (typically based on the cmdline being used to invoke the job.)
-
schrodinger.application.jaguar.utils.
get_stoichiometry_string
(atom_list)¶ Take atom list and return stoichiometry string. For example, atom_list = [‘H’, ‘H’, ‘O’] yields stoichimetry string = ‘H2O’.
Parameters: atom_list (list) – list of strings Returns: stoichiometry string Return type: str
-
schrodinger.application.jaguar.utils.
validate_stoichiometry
(reactants, products)¶ This function validates stoichiometry for a reaction defined by the list of reactants and products. If stoichiometry is not valid this function return text string explaining what was wrong. In case of valid stoichiometry returns None.
Parameters: - reactants (list) – list of
JaguarInput
objects for reactants - products (list) – list of
JaguarInput
objects products
Returns: string with warning message or None
Return type: str or None
- reactants (list) – list of
-
schrodinger.application.jaguar.utils.
get_number_electrons
(st)¶ Count the number of electrons disregarding charges.
Parameters: st (Structure instance) – the structure Return type: int Returns: the number of electrons
-
schrodinger.application.jaguar.utils.
get_total_charge
(structure)¶ Return the total charge of the structure If the property i_m_Molecular_charge is defined we use that, else we sum the formal charges
Parameters: structure (Structure object) – whose total charge must be calculated Returns: total charge of structure Return type: int
-
schrodinger.application.jaguar.utils.
elmnt_mult_dict
()¶ make a dictionary of element:multiplicity for all neutral elements up to Lawrencium
The values are from the ground state term symbol as reported by NIST at http://physics.nist.gov/PhysRefData/Elements/index.html as of 4.2014
-
schrodinger.application.jaguar.utils.
remove_gibbs_energies
(st, allowed_temps=())¶ Remove gibbs energy properties from a structure but allow some exceptions. This allows one to ‘unclutter’ the project table.
Parameters: - st (Structure) – structure containing gibbs energy properties
- allowed_temps (tuple) – temperatures that are allowed to remain as properties
-
schrodinger.application.jaguar.utils.
parse_gibbs_energies
(st, inf_sep=False, std_conc=False)¶ Extract the temperature, gibbs energy and property keys for free energy and store these in a dict relating temperature to FreeEnergy instances.
Parameters: - st (Structure) – the structure
- std_con (bool) – True indicates Gibbs energy at std state concentration
Returns: a dict relating temperature to a FreeEnergy instance with attributes storing these data
-
schrodinger.application.jaguar.utils.
gibbs_energy_property_string
(temp, inf_sep=False, std_conc=False)¶ Construct the property key string for Gibbs energy at a particular temperature
Parameters: - temp (float) – temperature in Kelvin
- inf_sep (bool) – True indicates infinitely separated energy
- std_conc (bool) – True indicates Gibbs energy at std state concentration
Returns: a property key string
-
schrodinger.application.jaguar.utils.
convert_gibbs_energy_to_std_conc
(st)¶ Convert std state (1 atm) Gibbs energies to a std state of 1 Molar concentration. The energies are returned as a dict relating temperature to FreeEnergy instances. The energies are also stored as structure level properties. This is intended to be used with AutoTS for rate calculations and we assume the free energies were computed at 1 atm of pressure.
Parameters: st (Structure) – the structure Returns: a dict relating temperature to a FreeEnergy instance with attributes storing these data
-
schrodinger.application.jaguar.utils.
compute_std_conc_gibbs_energy
(gibbs, temp, press, con)¶ Convert Gibbs energy which was computed at a pressure of press to a concentration of con using the formula G = G_0 + kT log(CRT/P_0) where we’ve used the ideal gas law to relate P = CRT
Parameters: - gibbs (float) – Gibbs free energy in a.u. evaluated at a pressure of press
- press (float) – Pressure at which the Gibbs energy was evaluated in atm
- temp (float) – Temperature at which the Gibbs energy was evaluated in Kelvin
- con (float) – Concentration which defines the standard state in moles/Liter
-
schrodinger.application.jaguar.utils.
group_items
(items, comparator, *args)¶ Put items into groups using a comparator. These will be returned as a list of lists, each list representing a group. The first item of the first group will be the first item in the list items. The groups have the property that Comparator(item1, item2, args) returns True for all pairs in a group.
Parameters: - items (list) – a list of items to group
- comparator (function) – this function compares two items and returns a boolean indicating whether or not they are equivalent.
- args (argument list) – arguments passed to the comparator which is called as comparator(item1, item2, *args)
Returns: a list of lists of items
-
schrodinger.application.jaguar.utils.
beta_au
(temp)¶ Beta = 1/kT in a.u.
-
schrodinger.application.jaguar.utils.
beta_kcalmol
(temp)¶ Beta = 1/kT in kcal/mol