schrodinger.application.jaguar.rmsd module

This module is a subclass of schrodinger.structutils.rmsd to provide ability to do searching over more permutations of possible renumbering.

class schrodinger.application.jaguar.rmsd.JaguarConformerRmsdX(reference_structure, *args, **kwargs)

Bases: schrodinger.structutils.rmsd.ConformerRmsd

__init__(reference_structure, *args, **kwargs)
Parameters:
  • search_permutations (Boolean) – If True, computes the rmsd between all possible atom renumberings between test and reference structures, as defined by evaluating the matching smarts pattern. Uses the renumbering with minimal rsmd. Can be (very!) expensive.
  • search_chirality (Boolean) – If True, search for permutations of hydrogens that preserve the chirality of numbering around a chiral center with 3 or 4 neighbors.
calculate()
Returns:Root-mean-squared difference of atom coordinates.
Type:float
Raise:ValueError if working versions of the reference and test structures don’t have the same shape (non-confs).
The order of operations:
  • prepare working copies of the reference and test structures.
    ** copy the structures. ** encode the original atom indexes as atom properties. ** extract substructure of the atoms matching the ASL. ** reduce to heavy atom graph (instance option, non-default). ** normalize numbering scheme (instance option, default).
  • determine molecular symmetry mapping (optional, default).
  • create a numpy coordinate array for the working structures.
  • numpy linear algebra SVD to superimpose (instance option).
    ** transform test_structure
  • numpy array used to calculate RMSD, and max_dist.
  • decode original indexes to identify atoms involve in max dist.
renumberBySymmetry()

Disables renumbering using symmetry, if we are brute forcing the solution.

renumberWorkingStructures(has_hydrogens)

Renumber the working structures to give them identical numbering. If search_permutations is set, a custom renumbering method is used.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.jaguar.rmsd', '__init__': <function JaguarConformerRmsdX.__init__>, 'calculate': <function JaguarConformerRmsdX.calculate>, 'renumberBySymmetry': <function JaguarConformerRmsdX.renumberBySymmetry>, 'renumberWorkingStructures': <function JaguarConformerRmsdX.renumberWorkingStructures>, '_getRenumberedStructureWithComparison': <function JaguarConformerRmsdX._getRenumberedStructureWithComparison>, '_align_hydrogens': <function JaguarConformerRmsdX._align_hydrogens>, '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.jaguar.rmsd'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__()
Returns:a user friendly string representation of the instance. e.g.:

In place RMSD = 1.01; atoms = “a.e C”

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

evaluateAsl(st)

Return the atoms of the input structure that match <asl_expr>.

Parameters:st (structure.Structure) – Structure to evaluate
Returns:Atoms matching the ASL
Return type:list of ints

:raise RuntimeError if ASL matching failed.

getRmsdDataname()
Returns:m2io property dataname string. The property name indicates the reference structure, the title, the ASL used to identify comparison atoms and if the structure is in-place or mobile.
Return type:string
orig_index_prop = 'i_confrmsd_original_index'
populatePatternDict(st)

Populates the self._mol_pattern_dict based on the molecules in the given structure.

writeCommand(file_name='rmsd.cmd')

Writes a Maestro command file and structures with the pair wise atom mapping in command file mode. The Maestro file has the same basename as the command file. Clobbers existing files.

Parameters:file_name (string) – Path to the maestro command file with the atom pairings.
Raise:ValueError if file_name does not have ‘.cmd’ extension.
writeStructures(file_name='rmsd.mae', mode='w')

Writes the reference and test structures to file.

Parameters:
  • file_name (string) – Path of the structure file to write.
  • mode (string) – ‘w’ => write, clobber as needed ‘a’ => append