schrodinger.application.jaguar.autots_bonding module¶
Methods to handle structure reading and bonding in AutoTS.
-
schrodinger.application.jaguar.autots_bonding.
clean_st
(st, mmjag=True, cov_offset=0.4)¶ Clean up a st via redefining bonding.
We also delete formal charges because they get in the way of the SMARTS pattern based matching used in many places.
Parameters: - st (schrodinger.structure.Structure instance) – structure to clean
- mmjag (boolean) – if True use mmjag, else use schrodinger.application.matsci.nano.xtal.connect_atoms
- cov_offset (float) – additional value to add to covalent radii, applicable only if mjag=False
Rtype st: schrodinger.structure.Structure instance
Returns: the cleaned up structure
-
schrodinger.application.jaguar.autots_bonding.
canonicalize_atom_names
(st)¶ Canonicalize the atom names
Parameters: st (Structure) – Structure containing atoms to name
-
class
schrodinger.application.jaguar.autots_bonding.
ReactiqStructureReader
(*args, **kwargs)¶ Bases:
schrodinger.structure.StructureReader
Local version of StructureReader which redefines bonding when reading
-
__init__
(*args, **kwargs)¶ The format is determined from the file extension if no format is specified.
Parameters: - filename (str) – The filename to read.
- index (int) – The index of the first structure to read.
- error_handler (int) – The handle of the mmerr object to use for error logging. Defaults to schrodinger.infra.mm.error_handler.
- format (str) – The format of the file, either ‘pdb’, ‘sd’, ‘mol2’, ‘maestro’ or ‘maestro_text’ (determined from file extension by default).
- ignore_errors (bool) – If True, bad structures will be skipped instead of raising an exception. Currently only used by the SD reader.
- input_string (str) – Use of this argument is pending deprecation. Please use the
StructureReader.fromString
static method instead. If this is specified then the structure will be read from this string and the filename will be ignored. The format must be specified. Currently this is only supported for Maestro and SD format.
-
__iter__
()¶
-
__next__
()¶
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.jaguar.autots_bonding', '__doc__': '\n Local version of StructureReader which redefines bonding\n when reading\n ', '__init__': <function ReactiqStructureReader.__init__>, '__iter__': <function ReactiqStructureReader.__iter__>, '__next__': <function ReactiqStructureReader.__next__>})¶
-
__dir__
() → list¶ default dir() implementation
-
__enter__
()¶
-
__eq__
¶ Return self==value.
-
__exit__
(type, value, tb)¶
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.jaguar.autots_bonding'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__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).
-
__weakref__
¶ list of weak references to the object (if defined)
-
clearReadErrors
()¶ Clear any queued read errors.
-
close
()¶
-
static
fromString
(input_string, index=1, error_handler=None, format='maestro', ignore_errors=False)¶ Create a StructureReader from an input string. Currently this is only supported for Maestro and SD format.
Parameters: - input_string (str) – The string representation of the Structure.
- index (int) – The index of the first structure to read.
- error_handler (int) – The handle of the mmerr object to use for error logging. Defaults to schrodinger.infra.mm.error_handler.
- format (str) – The format of the file, either SD (‘sd’) or MAESTRO (‘maestro’). Defaults to MAESTRO.
- ignore_errors (bool) – If True, bad structures will be skipped instead of raising an exception. Currently only used by the SD reader.
-
getReadErrors
()¶ Return any queued read errors.
-
-
schrodinger.application.jaguar.autots_bonding.
copy_autots_atom_properties
(st1, st2)¶ copy all known atom-level AutoTS-specific properties from st1 to st2. Atoms in st1 and st2 must be in the same order.
-
schrodinger.application.jaguar.autots_bonding.
copy_autots_st_properties
(st1, st2)¶ copy all known structure-level AutoTS-specific properties from st1 to st2.
-
schrodinger.application.jaguar.autots_bonding.
copy_autots_bond_properties
(st1, st2)¶ copy all known bond-level AutoTS-specific properties. Atoms in st1 and st2 must be in the same order but the bonds do not. However, a bond with the same atom indexes and bond order must exist in order to copy the properties.
-
schrodinger.application.jaguar.autots_bonding.
copy_autots_properties
(st1, st2)¶ copy all known atom-, bond- and st-level AutoTS-specific properties from st1 to st2. Atoms in st1 and st2 must be in the same order.
-
schrodinger.application.jaguar.autots_bonding.
clear_autots_atom_properties
(st)¶ clear all known atom-level AutoTS-specific properties.
-
schrodinger.application.jaguar.autots_bonding.
clear_autots_st_properties
(st, exceptions=('i_m_Molecular_charge', 'i_m_Spin_multiplicity'))¶ Copy all known structure-level AutoTS-specific properties. Any properties in exceptions are not cleared (charge and mult by default)
-
schrodinger.application.jaguar.autots_bonding.
clear_autots_bond_properties
(st)¶ clear all known bond-level AutoTS-specific properties.
-
schrodinger.application.jaguar.autots_bonding.
clear_autots_properties
(st)¶ Remove all known atom-, bond- and st-level AutoTS specific properties.
-
schrodinger.application.jaguar.autots_bonding.
zero_order_metal_bonds
(st)¶ Set the order of bonds containing metals to zero.
Parameters: st (Structure instance) – the structure containing metal bonds
-
schrodinger.application.jaguar.autots_bonding.
delete_ghosts
(st)¶ Delete ghost/dummy atoms from the structure and return the modified structure.
Ghosts are identified by the attribute _StructureAtom.atomic_number = 0. The original structure is unmodified.
Parameters: st (Structure instance) – the structure with the ghost atoms Return type: Structure instance Returns: the structure without the ghost atoms
-
schrodinger.application.jaguar.autots_bonding.
get_mmlewis_bonding
(st, require_charge_conservation=True, debug=False)¶ Get bonding from mmlewis. Do it molecule by molecule.
Parameters: - st (Structure instance) – the structure to get bond orders for (must be connected)
- require_charge_conservation (boolean) – if True we require the sum of formal charges after running through mmlewis to equal the total charge. (defined either by PROPERTY_KEY_CHARGE or by the sum of formal charges).
-
schrodinger.application.jaguar.autots_bonding.
simplify_structure
(st)¶ Make all bonds single bonds and remove all charges.
Parameters: st (schrodinger.structure.Structure) – a structure
-
schrodinger.application.jaguar.autots_bonding.
remove_formal_charges
(st)¶
-
schrodinger.application.jaguar.autots_bonding.
active_reactant_atom_pairs
(reactant, product)¶ return active atom pairs in reactant structure as a list of pairs of integers
-
schrodinger.application.jaguar.autots_bonding.
active_atom_pairs
(reactant, product)¶ Determine active bonds and return them as lists of pairs of atoms
-
schrodinger.application.jaguar.autots_bonding.
copy_bonding
(st1, st2)¶ Impose the bonding and formal charges of st1 onto st2 The two structures must have the same number of atoms or a ValueError is raised.
-
class
schrodinger.application.jaguar.autots_bonding.
Coordinate
(value, *args)¶ Bases:
object
An internal coordinate. The value and indexes are stored as data “value” and “indices”.
-
__init__
(value, *args)¶ Create an internal coordinate with a value
Parameters: - value (float) – value of coordinate
- args (tuple) – atom indexes defining constraint
- Example usage
- torsion = Coordinate(91.2, 4, 5, 8, 12) bond = Coordinate(1.2, 12, 14)
-
__str__
()¶ Return str(self).
-
__eq__
(other)¶ Return self==value.
-
__hash__
()¶ Return hash(self).
-
similar_coordinate
(other)¶ A similar coordinate is one that describes the same degree of freedom. For example, the torsion 1 2 3 4 and torsion 1 2 3 6 describe rotation about the same bond.
Parameters: other (Coordinate) – the other coordinate for comparison :return True if the other coordinate is similar, else False
-
adjust
(st)¶ adjust this coordinate for a structure If coordinate is in a ring no adjustment is made
-
setValue
(st)¶ Set value of coordinate using structure
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.jaguar.autots_bonding', '__doc__': '\n An internal coordinate.\n The value and indexes are stored as data "value" and "indices".\n ', '__init__': <function Coordinate.__init__>, '__str__': <function Coordinate.__str__>, '__eq__': <function Coordinate.__eq__>, '__hash__': <function Coordinate.__hash__>, 'similar_coordinate': <function Coordinate.similar_coordinate>, 'adjust': <function Coordinate.adjust>, 'setValue': <function Coordinate.setValue>, '__dict__': <attribute '__dict__' of 'Coordinate' objects>, '__weakref__': <attribute '__weakref__' of 'Coordinate' objects>})¶
-
__dir__
() → list¶ default dir() implementation
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.application.jaguar.autots_bonding'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__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).
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
schrodinger.application.jaguar.autots_bonding.
examine_constraints
(constraints, st, tol=0.01, enforce=True)¶ Examine the satisfaction of constraints. Returns a list of Coordinate instances representing the error in any constraints which are not satisfied to a specified tolerance.
Parameters: - constraints (list of Coordinate) – the constraints
- st (Structure) – structure which should satisfy constraints
- tol (float) – tolerance
- enforce (boolean) – if True attempt to enforce constraints with Structure.adjust
-
schrodinger.application.jaguar.autots_bonding.
get_static_constraints
(constraints)¶ Convert a list of constraints into static constraints. This just means returning a list of constraints with the value set to None
Parameters: constraints (list) – list of Coordinate instances :return : a list of Coordinates
-
schrodinger.application.jaguar.autots_bonding.
atoms_in_ring
(st, i, j)¶ Determine if two atoms are in the same ring :type st: Structure :param st: structure :type i: int :param i: atom index :type j: int :param j: atom index
-
schrodinger.application.jaguar.autots_bonding.
coord_in_ring
(st, *args)¶ Determine whether or not an internal coordinate is in a ring.
For a bond: returns True if both atoms are in the same ring. For an angle: returns True if all three atoms are in the same ring. For a torsion: returns True if the two central atoms are in the same ring.
Parameters: - st (Structure) – Structure used to test if indexes are in the same ring
- args (tuple/list) – indexes of the coordinate.