schrodinger.application.jaguar.autots_rmsd module¶
methods for comparison of structures using rmsd
-
class
schrodinger.application.jaguar.autots_rmsd.
MapScore
(score, atom_map)¶ Bases:
tuple
-
__contains__
¶ Return key in self.
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
__len__
¶ Return len(self).
-
atom_map
¶ Alias for field number 1
-
count
()¶ Return number of occurrences of value.
-
index
()¶ Return first index of value.
Raises ValueError if the value is not present.
-
score
¶ Alias for field number 0
-
-
schrodinger.application.jaguar.autots_rmsd.
reform_barely_broken_bonds
(st1, st2, fraction_different=0.5)¶ Given two structures that have consistently ordered atoms, reform bonds that have not broken very much (stretched by less than fraction_different*d0). Return False if not all broken bonds can be reformed. Structures are run through mmlewis to get new bond orders and formal charges.
Parameters:
-
schrodinger.application.jaguar.autots_rmsd.
molecule_lists_are_conformers
(m1, m2, same_molecularity=True)¶ Compare two non-empty lists of structures and return True if matching pairs of conformers can be found. The structures in m1 and m2 are assumed to be fully connected (molecules) if same_molecularity==True.
Returns False if the number of molecules differs and same_molecularity==True.
Parameters: - m1 (list of structures) – first list of molecules
- m2 (list of structures) – first list of molecules
- same_molecularity (bool) – if True, require that the two lists be the same length (i.e. number of molecules)
Return type: bool
Returns: whether or not the two lists of molecules are conformers
-
schrodinger.application.jaguar.autots_rmsd.
align_all_molecules
(st1, st2, sort_rms=True)¶ Inspects whether or not all the molecules in reactant are conformers of those in product. If they are, each molecule in product is superimposed onto the corresponding reactant molecule.
Parameters: - st1 (schrodinger.structure.Structure instance) – structure 1
- st2 (schrodinger.structure.Structure instance) – structure 2
- sort_rms (boolean) – If True the structure in which the inter-molecule distances are larger is superimposes onto the smaller, see sort_by_centroid_distance, which does the sorting.
-
schrodinger.application.jaguar.autots_rmsd.
sort_by_centroid_distance
(strs)¶ Given a list of structures sort the list in non-decreasing order using the rms distance between molecules in the structures. e.g. for two structures which are each water dimers, the water dimer with the smaller
intermolecular distance would appear first in the listParameters: strs (list of schrodinger.structure.Structure instances) – list of structures to be sorted Return type: list of schrodinger.structure.Structure instances Returns: sorted list
-
schrodinger.application.jaguar.autots_rmsd.
align_path_strs
(path_strs)¶ Align the structures in a path.
Parameters: path_strs (list of structures) – the structures along the path
-
schrodinger.application.jaguar.autots_rmsd.
order_atoms
(reactant, product, debug=False)¶ Renumber atoms in reactant and product in a consistent fashion.
Parameters: - reactant (schrodinger.structure.Structure) – reactant structure
- product (schrodinger.structure.Structure) – reactant structure
Return type: tuple of two structures
Returns: renumbered reactant and product
-
class
schrodinger.application.jaguar.autots_rmsd.
AutoTSAtomMapper
(optimize_mapping, use_chirality, debug=False)¶ Bases:
schrodinger.comparison.atom_mapper.BaseAtomMapper
-
RMSD_THRESH
= 1e-08¶
-
__init__
(optimize_mapping, use_chirality, debug=False)¶ Parameters: - optimize_mapping (boolean) – if True search over all bijections to find the one with lowest score
- use_chirality (boolean) – if True, in addition to element type use chirality (where defined) to equate atoms.
-
initialize_atom_types
(st, invert_stereocenters=False)¶ Initialize the atom types
Parameters: - st (Structure) – structure containing atoms
- invert_stereocenters (boolean) – whether or not R/S labels should be flipped
-
score_mapping
(st1, st2, atset)¶ Scores a particular atom reordering.
Parameters: - @pararm atset: the atoms which have been mapped. This may be a subset
- of the atoms in the two structures as we test partial as well as full maps.
Returns: any metric which measures the goodness of a particular relative atom ordering in st1 and st2. Can be any type that has the less than operator implemented.
-
score_is_equivalent
(score1, score2)¶ Here we declare 2 scores equivalent if the same number of chirality mismatches are present and the rmsd difference is within RMSD_THRESH. This resolves machine dependent descrepancies in the chosen map.
Parameters: - score1 (tuple) – the first score (chirality mismatches, active atoms, rms)
- score2 (tuple) – the first score (chirality mismatches, active atoms, rms)
:return boolean indicating if the score is the same or different
-
ATOM_TYPE
= 's_m_custom_atom_type'¶
-
MAPPER_INDEX
= 'i_m_atom_mapper_index'¶
-
are_conformers
(st1, atlist1, st2, atlist2)¶ Determine if the two substructures, as defined by the atom lists, are conformers but do not explore isomorphisms.
Parameters: Returns: boolean indicating whether or not the two structures are conformers
-
are_consistently_ordered_conformers
(st1, st2, atlist)¶ Determine if two substructures are consistently ordered conformers. That is, they have the same atom numbering and bonding
Parameters: Returns: boolean indicating whether or not the two structures are ordered conformers
-
are_enantiomers
(st1, atlist1, st2, atlist2)¶ Determine if the two substructures, as defined by the atom lists, are enantiomers but do not explore isomorphisms.
Parameters: Returns: boolean indicating whether or not the two structures are conformers
-
comparator
(d1, d2)¶ Comparison function to be used to determine if two nodes on graph are equivalent.
If this method is not used when constructing a GraphMatcher, node attributes will not be considered for the purpose of determining isomorphism.
Parameters: - d1 (dict) – key=value dictionary from graph returned from st_to_graph which represents node 1
- d1 – key=value dictionary from graph returned from st_to_graph which represents node 2
Returns: boolean indicating equilvalence
-
get_atom_type
(at)¶ This value is used as an atom property
Parameters: at (_StructureAtom) – atom we wish to obtain a type for Returns: string which identifies atom type
-
invert_chirality
(ch_list)¶ Invert the chirality (R/S) of an input list of chiralities.
Parameters: ch_list (list of strings) – list of chirality labels for a structure
-
isomeric_atom_sets
(st1, atset1, st2, atset2)¶ Check that the atom types in atset1 are the same as those in atset2. If not, the two structures cannot be conformers.
Parameters: Returns: a boolean indicating if these atom lists are isomeric
-
reorder_structures
(st1, atlist1, st2, atlist2, invert_stereocenters=False)¶ Reorder the atoms in the two structures.
Parameters: Returns: the two structures with structure 2 having had atoms reordered
-
set_atom_type
(at, value)¶ Set the value of the atom type
Parameters: - at (_StructureAtom) – atom we wish to set type for
- value (string) – set the type of atom to this
-
st_to_graph
(st, atset)¶ Convert Structure instance to a networkx Graph using _StructureAtom instances as nodes and adding an atom type property
Parameters: - st (Structure) – the structure to convert
- atset (set of ints) – a set of atoms to use to create the graph
Returns: networkx Graph
-
unique_job_name
(base_name)¶ Add an integer to the end of the base_name to get a unique name.
Parameters: base_name (str) – base job name
-
-
class
schrodinger.application.jaguar.autots_rmsd.
AutoTSTemplateAtomMapper
(optimize_mapping, use_chirality, debug=False)¶ Bases:
schrodinger.application.jaguar.autots_rmsd.AutoTSAtomMapper
-
RMSD_THRESH
= 1e-08¶
-
initialize_atom_types
(st, active_ats, invert_stereocenters=False)¶ Initialize the atom types
Parameters: - st (Structure) – structure containing atoms
- active_ats (list of ints) – atom indices of the reaction center
- invert_stereocenters (boolean) – whether or not R/S labels should be flipped
-
choose_template_map
(reactant, product, input_indexes, r_template, p_template, template_indexes)¶ Determine the optimal map from the input reactant and product structures to the template reactant and product structures.
Parameters: - reactant (Structure instance) – input reactant structure
- product (Structure instance) – input product structure
- input_indexes (RxnIndxDecomp instance) – breakdown of input atom indexes into core, reaction center
- r_template (Structure instance) – template reactant structure
- p_template (Structure instance) – template product structure
- template_indexes (RxnIndxDecomp instance) – breakdown of template atom indexes into core, reaction center
Return type: dict
Returns: mapping from input number to template numbering
-
ATOM_TYPE
= 's_m_custom_atom_type'¶
-
MAPPER_INDEX
= 'i_m_atom_mapper_index'¶
-
__init__
(optimize_mapping, use_chirality, debug=False)¶ Parameters: - optimize_mapping (boolean) – if True search over all bijections to find the one with lowest score
- use_chirality (boolean) – if True, in addition to element type use chirality (where defined) to equate atoms.
-
are_conformers
(st1, atlist1, st2, atlist2)¶ Determine if the two substructures, as defined by the atom lists, are conformers but do not explore isomorphisms.
Parameters: Returns: boolean indicating whether or not the two structures are conformers
-
are_consistently_ordered_conformers
(st1, st2, atlist)¶ Determine if two substructures are consistently ordered conformers. That is, they have the same atom numbering and bonding
Parameters: Returns: boolean indicating whether or not the two structures are ordered conformers
-
are_enantiomers
(st1, atlist1, st2, atlist2)¶ Determine if the two substructures, as defined by the atom lists, are enantiomers but do not explore isomorphisms.
Parameters: Returns: boolean indicating whether or not the two structures are conformers
-
comparator
(d1, d2)¶ Comparison function to be used to determine if two nodes on graph are equivalent.
If this method is not used when constructing a GraphMatcher, node attributes will not be considered for the purpose of determining isomorphism.
Parameters: - d1 (dict) – key=value dictionary from graph returned from st_to_graph which represents node 1
- d1 – key=value dictionary from graph returned from st_to_graph which represents node 2
Returns: boolean indicating equilvalence
-
get_atom_type
(at)¶ This value is used as an atom property
Parameters: at (_StructureAtom) – atom we wish to obtain a type for Returns: string which identifies atom type
-
invert_chirality
(ch_list)¶ Invert the chirality (R/S) of an input list of chiralities.
Parameters: ch_list (list of strings) – list of chirality labels for a structure
-
isomeric_atom_sets
(st1, atset1, st2, atset2)¶ Check that the atom types in atset1 are the same as those in atset2. If not, the two structures cannot be conformers.
Parameters: Returns: a boolean indicating if these atom lists are isomeric
-
reorder_structures
(st1, atlist1, st2, atlist2, invert_stereocenters=False)¶ Reorder the atoms in the two structures.
Parameters: Returns: the two structures with structure 2 having had atoms reordered
-
score_is_equivalent
(score1, score2)¶ Here we declare 2 scores equivalent if the same number of chirality mismatches are present and the rmsd difference is within RMSD_THRESH. This resolves machine dependent descrepancies in the chosen map.
Parameters: - score1 (tuple) – the first score (chirality mismatches, active atoms, rms)
- score2 (tuple) – the first score (chirality mismatches, active atoms, rms)
:return boolean indicating if the score is the same or different
-
score_mapping
(st1, st2, atset)¶ Scores a particular atom reordering.
Parameters: - @pararm atset: the atoms which have been mapped. This may be a subset
- of the atoms in the two structures as we test partial as well as full maps.
Returns: any metric which measures the goodness of a particular relative atom ordering in st1 and st2. Can be any type that has the less than operator implemented.
-
set_atom_type
(at, value)¶ Set the value of the atom type
Parameters: - at (_StructureAtom) – atom we wish to set type for
- value (string) – set the type of atom to this
-
st_to_graph
(st, atset)¶ Convert Structure instance to a networkx Graph using _StructureAtom instances as nodes and adding an atom type property
Parameters: - st (Structure) – the structure to convert
- atset (set of ints) – a set of atoms to use to create the graph
Returns: networkx Graph
-
unique_job_name
(base_name)¶ Add an integer to the end of the base_name to get a unique name.
Parameters: base_name (str) – base job name
-