schrodinger.application.jaguar.autots_rmsd module

methods for comparison of structures using rmsd

schrodinger.application.jaguar.autots_rmsd.compare_consistently_ordered_structures(st1, st2, heavy_only=False, fraction_different=0.5, fix_bonds=True)

Compare two structures by individually superimposing the molecules contained in these structures.

raises a ConformerError the two structures are not conformers. It is assumed that the atoms in st1 and st2 are consistently ordered

Parameters:
  • st1 (Structure instance) – structure 1
  • st2 (Structure instance) – structure 2
  • heavy_only (boolean) – if true, only use heavy atoms in computing rms
  • fraction_different (float) – if a bond breaks then it is also required that the bond distance increases by a factor of 0.5*d0 where d0 is the bond distance before breaking
  • fix_bonds (boolean) – if True and if the structures are determined to be conformers then any bonds that are broken but are less than a fraction_difference different are reformed. If this operation is performed we also run any modified structures through mmlewis to get new bond orders and formal charges.
Return type:

RMS difference

schrodinger.application.jaguar.autots_rmsd.are_consistently_ordered_conformers(st1, st2, fraction_different=0.5, fix_bonds=True)

Given two structures that have consistently ordered atoms. Analyze the bonding to see if the two structures are conformers.

Parameters:
  • st1 (Structure) – the first structure
  • st2 (Structure) – the second structure
  • fraction_different (float) – if a bond breaks then it is also required that the bond distance increases by a factor of 0.5*d0 where d0 is the bond distance before breaking
  • fix_bonds (boolean) – if True and if the structures are determined to be conformers then any bonds that are broken but are less than a fraction_difference different are reformed. If this operation is performed we also run any modified structures through mmlewis to get new bond orders and formal charges.
schrodinger.application.jaguar.autots_rmsd.are_conformers(st1, st2, consistently_ordered=False)

Determine if two structures are conformers. st1 and st2 can either be lists of Structures or single Structure instances. If they are lists than the Structures in the lists are assumed to be fully connected (molecules, not complexes)

Parameters:
  • st1 (Structure or list of Structures) – first structure
  • st2 (Structure or list of Structures.) – second structure
  • consistently_ordered (boolean) – if True, the atoms in st1 and st2 consistently ordered.
Returns:

True/False if two structures are conformers

schrodinger.application.jaguar.autots_rmsd.are_same_structure(st1, st2, rms_thresh, heavy_only, conformers_only, consistently_ordered=False)

Determine if two structures are the same.

st1 and st2 can either be lists of Structures or single Structure instances. If they are lists than the Structures in the lists are assumed to be fully connected (molecules, not complexes)

If consistently_ordered=True and the consistently ordered comparison returns False we apply the comparison for inconsistently ordered structures as a backup test.

Parameters:
  • st1 (Structure or list of Structures) – first structure
  • st2 (Structure or list of Structures) – second structure
  • rms_thresh (float) – threshold for RMS only used if conformers_only=False
  • heavy_only (boolean) – if True excude hydrogens when computing RMS
  • conformers_only (boolean) – if True, only require that structures are conformers
  • consistently_ordered (boolean) – if True, the atoms in st1 and st2 consistently ordered.
Returns:

True/False whether structures are the same.

schrodinger.application.jaguar.autots_rmsd.compare_structures(st1, st2, heavy_only=False)

Compare two structures by individually superimposing the molecules contained in these structures.

To clarify a structure can contain any number of molecules. A molecule is defined as a set of atoms that are bonded to one another. i.e. for a water dimer, there are two molecules that can be combined in a single structure.

Raises a IsomerError if the number of molecules differs or a ConformerError they are not conformers.

Parameters:
  • st1 (schrodinger.structure.Structure instance) – structure 1
  • st2 (schrodinger.structure.Structure instance) – structure 2
  • heavy_only (boolean) – if true, only use heavy atoms in computing rms
Return type:

float

:return average rms of difference between individual molecules

schrodinger.application.jaguar.autots_rmsd.compare_molecule_lists(m1, m2, heavy_only=False)

Compare two lists of molecules and return an average rms if matching pairs of conformers can be found. The structures in m1 and m2 are assumed to be fully connected (molecules).

Raises a IsomerError if the number of molecules differs or a ConformerError if matching conformers cannot be found.

Parameters:
  • m1 (list of structures) – first list of molecules
  • m2 (list of structures) – first list of molecules
  • heavy_only (boolean) – if true, only use heavy atoms in computing rms
Return type:

float

:return average rms of difference between individual molecules

schrodinger.application.jaguar.autots_rmsd.rms_structures(structure1, structure2, heavy_only=False)

Compute the rms between structures st1 and st2. Uses ConfomerRmsdX and superimpose to return smallest rms.

Raises a ValueError if the two structures are not isomers.

if nats = 1, we only compare element names if nats = 2 compare element names and return diff in bond length. else call above mentioned functions.

formal charges are removed before comparison.

Parameters:
  • structure1 (schrodinger.structure.Structure instance) – structure 1
  • structure2 (schrodinger.structure.Structure instance) – structure 2
  • heavy_only (boolean) – if true, only use heavy atoms in computing rms
Return type:

float

:return average rms of difference between individual molecules

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 list
Parameters: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.superimpose_independent_molecules(st1, atlist1, st2, atlist2)

Superimpose st2 on st1 by moving each molecule independently

Parameters:
Atlist1:

list of ints

Atlist1:

list of atom indexes for structure 1

Atlist2:

list of ints

Atlist2:

list of atom indexes for structure 2

Returns:

rmsd, st2 is imposed on st1

schrodinger.application.jaguar.autots_rmsd.general_superimpose(st1, atlist1, st2, atlist2, move_which=2)

wrapper for rmsd.superimpose that handles 1 or 2 atom cases which fail in superimpose. This superimposes the two molecules and returns the rms.

move_which can be set to structutils.rmsd.X, where X=CT, ATOMS, MOLECULES

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.impose_molecules_on_structure(st, mol_list, mol_indx)

Superimpose the molecules in mol_list onto the structure st.

each “molecule” in mol_list is a structure instance that is a substructure in st and must have an accompanying list of indexes in mol_indx. This is useful for optimizing the molecules in st then superimposing them into the same orientation.

Parameters:
  • st (structure instance) – structure object with molecules
  • mol_list (list of structure instances) – each entry is a structure which represents a molecule in st. One way to get this list is the following: mol_list = [mol.extractStructure() for mol in st.mol]
  • mol_indx (list of lists of ints) – list of atom indexes for each molecule. The indexes correspond to atoms in st. That is, it is a map from molecule atoms to structure atoms.
Returns:

A copy of the input structure with the molecules imposed onto their positions and orientations in the input structure (st).