Package schrodinger :: Package structutils :: Module rmsd
[hide private]
[frames] | no frames]

Module rmsd

Functionality for calculating conformer RMSDs.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  ConformerRmsd
A class to calculate the root mean square deviatation between the atomic coordinates of two conformer structure.Structure objects.
  ConformerRmsdX
Functions [hide private]
float
calculate_in_place_rmsd(st1, at_list1, st2, at_list2, use_symmetry=False, weights=None)
Returns: Atomic coordinate rmsd between structures.
 
superimpose(st1, at_list1, st2, at_list2, use_symmetry=False, move_which=1)
Superimposes atoms 'at_list2' in Structure 'st2' on atoms 'at_list1' in Structure 'st1'.
numpy array
get_super_transformation_matrix(st1, at_list1, st2, at_list2)
Returns: numpy matrix for the tranformation that will best superimpose atoms of st2 onto atoms of st1.
 
_get_mmsym_map(reference_structure, reference_atom_list, test_structure, test_atom_list, in_place=True)
FOR USE BY ConformerRmsd class only!
 
renumber_conformer(ref_st, test_st, use_symmetry=False, in_place=True, has_hydrogens=True)
Renumbers atoms in <test_st> so that they match <ref_st>.
Variables [hide private]
  __doc__ = ...
  smiles = None
hash(x)
  logger = log.get_logger('rmsd')
  MOLECULES = 1
  ATOMS = 0
hash(x)
  CT = 2
  __package__ = 'schrodinger.structutils'
Function Details [hide private]

calculate_in_place_rmsd(st1, at_list1, st2, at_list2, use_symmetry=False, weights=None)

 
Parameters:
  • st1 (structure.Structure) - Reference structure.
  • at_list1 (list) - List of atom index integers to consider. This must be the same length as at_list2. The coordinates from st1 and st2 are mapped in index order.
  • st2 (structure.Structure) - Test structure. Must be a conformer of st1 if use_symmetry is True.
  • at_list2 (list) - List of atom index integers to consider. This must be the same length as at_list1. The coordinates from st1 and st2 are mapped in index order.
  • use_symmetry (boolean) - Adjust at_list2 index order such that it is optimized with regard to molecular symmetry. The default is False for backwards compatibility, accounting for molecular symmetry is usually desireable.
  • weights - A list of weights, which must be the same length as at_list1. The weights in this list pertain to the relative importance to assign to the position deviations of atoms in at_list2 from atoms in at_list1. The weights list is assumed to contain positive values.
Returns: float
Atomic coordinate rmsd between structures.

Note: The input structures are expected to be conformers. See also ConformerRmsd which supports calculating the RMSD of a common conformer atom subset specified by ASL with non-conformer input structures.

superimpose(st1, at_list1, st2, at_list2, use_symmetry=False, move_which=1)

 

Superimposes atoms 'at_list2' in Structure 'st2' on atoms 'at_list1' in
Structure 'st1'.

The two structures can be the same. The atom lists must be of equal
length and contain at least three atoms.

Return the RMS after superimposition. The function can be called as:
    rms = rmsd.superimpose( st, alist1, st, alist2 )

See also the ConformerRmsd class in this module.

Parameters

use_symmetry (bool)
    If True, symmetry will automatically be detected and the lowest RMS
    obtained by doing all symmetry-related comparisons will be returned.
    This option can only be used if the input structures are conformers.

move_which (option)
    MOLECULES - All molecules in st2 which also have atoms specified in
                at_list2 will be transformed to be superimposed on all
                molecules in st1 which have atoms in at_list1 (default).
    ATOMS -     Only the atoms given in the lists at_list1 and at_list2 will
                be transformed.
    CT -        All of st2 will be transformed.

get_super_transformation_matrix(st1, at_list1, st2, at_list2)

 
Parameters:
  • st1 (structure.Structure) - Reference (non-moving) structure.
  • at_list1 (list) - Atom indexes from st1 to consider. Must be the same size as at_list2 and contain at least three atom indexes.
  • st2 (structure.Structure) - Test (moving) structure to be transformed onto st1.
  • at_list2 (list) - Atom indexes from st2 to consider. Must be the same size as at_list1 and contain at least three atom indexes.
Returns: numpy array
numpy matrix for the tranformation that will best superimpose atoms of st2 onto atoms of st1.

_get_mmsym_map(reference_structure, reference_atom_list, test_structure, test_atom_list, in_place=True)

 

FOR USE BY ConformerRmsd class only!

Returns a list of test_structure atom indexes for the optimal,
symmetry-aware, pair-wise alignment with the reference_structure.

Parameters

reference_structure (structure.Structure)

reference_atom_list (list of int)
    A list of atom indices.

test_structure (structure.Structure)

test_atom_list (list of int)
    A list of atom indices.

@param in_place: If False, will superimpose the test_structure on top of
    the reference_structure in addition to calculating the mapping.
@type in_place: bool

This method is semi-private because the ConformerRmsd class depends
on it.

renumber_conformer(ref_st, test_st, use_symmetry=False, in_place=True, has_hydrogens=True)

 

Renumbers atoms in <test_st> so that they match <ref_st>. Structures must have hydrogens, see CANVAS-5422.

Parameters:
  • ref_st (structure.Structure) - Structure to use as a reference for renumbering.
  • test_st (structure.Structure) - Structure to renumber (renumbered copy will be returned)
  • use_symmetry (bool) - Whether to consider symmetry. Always set to True unless mmsym is going to be used on the output structure.
  • in_place (bool

    @return Renumbered version of test structure. @rtype structure.Structure

    ) - If True (default), the conformer is only renumbered; if False, it will also be superimposed on top of the ref_st based on the new atom numbering.

Variables Details [hide private]

__doc__

Value:
"""
Functionality for calculating conformer RMSDs.

Copyright Schrodinger, LLC. All rights reserved.

"""