A class to calculate the root mean square deviatation between the
atomic coordinates of two conformer structure.Structure objects. The
inputs are expected to be conformers in the traditional sense.
Working copies of the input structures are modified instead the
original. The superimpose transformation is applied to the entire
test_structure. The transformation matrix is saved as
superposition_matrix property if in_place is set to False.
Renumbering is achieved by creating a list of SMARTS patterns, one for
each molecule in the reference structure, evaluating the SMARTS pattern
with both the reference and test structures to get a standard order of
atom indexes, then passing that atom order to mm.mmct_ct_reorder.
Renumbering can be slow with protein-sized molecules so you may want to
disable that feature when working with large molecules.
|
__init__(self,
reference_structure,
test_structure=None,
asl_expr=' NOT atom.element H ' ,
in_place=True)
x.__init__(...) initializes x; see help(type(x)) for signature |
|
|
|
|
|
populatePatternDict(self,
st)
Populates the self._mol_pattern_dict based on the molecules in the
given structure. |
|
|
string
|
|
|
writeStructures(self,
file_name=' rmsd.mae ' ,
mode=' w ' )
Writes the reference and test structures to file. |
|
|
|
writeCommand(self,
file_name=' rmsd.cmd ' )
Writes a Maestro command file and structures with the pair wise atom
mapping in command file mode. |
|
|
|
__str__(self)
Returns:
a user friendly string representation of the instance. |
|
|
|
|
list of ints
@raise RuntimeError if ASL matching failed.
|
evaluateAsl(self,
st)
Return the atoms of the input structure that match <asl_expr>. |
|
|
|
calculate(self)
@return:
Root-mean-squared difference of atom coordinates. |
|
|
list of ints
|
_prepareStructures(self)
Returns:
a working copy of the reference and test structures, renumbered
and/or reduced as needed. |
|
|
|
renumberBySymmetry(self)
Renumber the atoms in _working_test_st based off the reference
structure ussing mmsym. |
|
|
|
|
|
_getReducedStructure(self,
st)
Returns:
a Structure that is a simplified copy of the input: a neutral, single
bond connected, heavy atom only frame. |
|
|
tuple
|
_superimpose(self,
ref_st_selection,
test_st_selection)
Calculate optimal rotation-translation transform of test_st_selection
of atoms in working_test_st onto ref_st_selection of atoms in
working_ref_st, and apply to test_structure. |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|
|
orig_index_prop = ' i_confrmsd_original_index '
m2io dataname for atomic property that stores the original atom index
of the input structures.
|
float
|
max_distance
Greatest displacement between the atom pairs
|
integer
|
max_distance_atom_1
Reference atom index (in original atom scheme)
|
integer
|
max_distance_atom_2
Test atom index (in the original atom scheme)
|
|
max_permutations
Maximum number of permutations to search defaults to 10000000
|
|
precision
Precision of rmsd stored to find minimum if search_permutations=True
defaults to 6 (meaning a precision of 10^-6)
|
|
renumber_structures
Boolean to control whether the reference and test structures should
be renumbered by a SMARTS pattern before calculating the rmsd.
|
float
|
rmsd
Root mean square deviation of atomic coordintates
|
|
rmsd_str
String of basic rmsd info == str(self)
|
|
superposition_matrix
Matrix that was used for superimposing the test structure on top of
the reference structure, if in_place=True.
|
|
use_heavy_atom_graph
Boolean to control whether the reference and test structures should
be treated as heavy-atom only, graph topologies.
|
|
use_symmetry
Boolean to control whether the test structure atom list should be
determined by with the mmsym library.
|