Package schrodinger :: Package application :: Package jaguar :: Module autots_rmsd
[hide private]
[frames] | no frames]

Module autots_rmsd

methods for comparison of structures using rmsd

Functions [hide private]
RMS difference
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.
 
are_consistently_ordered_conformers(st1, st2, fraction_different=0.5, fix_bonds=True)
Given two structures that have consistently ordered atoms.
 
are_conformers(st1, st2, consistently_ordered=False)
Determine if two structures are conformers.
 
are_same_structure(st1, st2, rms_thresh, heavy_only, conformers_only, consistently_ordered=False)
Determine if two structures are the same.
float @return average rms of difference between individual molecules
compare_structures(st1, st2, heavy_only=False)
Compare two structures by individually superimposing the molecules contained in these structures.
float @return average rms of difference between individual molecules
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.
float @return average rms of difference between individual molecules
rms_structures(structure1, structure2, heavy_only=False)
Compute the rms between structures st1 and st2.
 
align_all_molecules(st1, st2, sort_rms=True)
Inspects whether or not all the molecules in reactant are conformers of those in product.
 
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.
 
_distance_vec(st1, i, st2, j)
 
general_superimpose(st1, atlist1, st2, atlist2, move_which=2)
wrapper for rmsd.superimpose that handles 1 or 2 atom cases which fail in superimpose.
 
align_path_strs(path_strs)
Align the structures in a path.
 
impose_molecules_on_structure(st, mol_list, mol_indx)
Superimpose the molecules in mol_list onto the structure st.
Variables [hide private]
  __doc__ = """ methods for comparison of structures using rmsd """
  __package__ = 'schrodinger.application.jaguar'
Function Details [hide private]

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.
Returns: RMS difference

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.

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

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)

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.

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
Returns: float @return average rms of difference between individual molecules

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
Returns: float @return average rms of difference between individual molecules

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
Returns: float @return average rms of difference between individual molecules

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.

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 

@type strs: list of schrodinger.structure.Structure instances
@param strs: list of structures to be sorted
@rtype: list of schrodinger.structure.Structure instances
@return: sorted list

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

align_path_strs(path_strs)

 

Align the structures in a path.

Parameters:
  • path_strs (list of structures) - the structures along the path

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).