schrodinger.application.phase.packages.ligand_aligner module

This module contains the LigandAligner class, which uses a best practices approach to flexibly align a set of ligand structures. The basic procedure is as follows:

  1. A Bemis-Murcko scaffold analysis is performed, and structures are clustered according to their largest scaffold, where scaffolds are represented using bond orders but not elemental types (i.e., fuzzy scaffolds).
  2. Clusters are sorted by decreasing scaffold size, and the structures within each cluster are sorted by decreasing size to establish a canonical order for all subsequent work. The very first structure in the canonical list is the primary reference, and subsequent structures in the list tend to be aligned to reference structures that appear earlier in the list.
  3. A scaffold-based distance matrix is computed, where the i, j entry is the scaffold number (0, 1, etc.) of the largest scaffold that’s shared by structures i and j. Larger scaffolds have lower scaffold numbers, so the scaffold number can be used as a distance. When constructing the matrix, embedded matching is employed (e.g., imidazole matches benzimidazole) in order to increase the size of the largest shared scaffold.
  4. A minimum spanning tree is constructed from the distance matrix, with structures being added to the tree using the canonical order described in step 2. Each edge of the tree holds a structure, the reference to which it is to be aligned, and the largest scaffold they share. The ordered edges of this tree provide a prescription for sequentially aligning each structure to a previously aligned reference with which it shares the largest possible scaffold.
  5. The ordered edges of the minimum spanning tree are traversed, with the applicable alignment method (see AlignMethod below) being used to find the best superposition of a given structure to its reference. Once a structure is aligned to its reference, the aligned structure replaces the original structure, and it is made available as a reference for subsequent structures in the tree.
  6. The structures for which core snapping was successful are post-processed in an attempt to superimpose sidechains that are common to two or more structures.
  7. The aligned structures are returned in the order they were provided.

Copyright Schrodinger LLC, All Rights Reserved.

class schrodinger.application.phase.packages.ligand_aligner.AlignMethod

Bases: enum.Enum

An enumeration.

__class__

alias of enum.EnumMeta

__members__ = mappingproxy(OrderedDict([('snap_core', <AlignMethod.snap_core: 1>), ('least_squares', <AlignMethod.least_squares: 2>), ('shape_based', <AlignMethod.shape_based: 3>)]))
__module__ = 'schrodinger.application.phase.packages.ligand_aligner'
least_squares = 2
shape_based = 3
snap_core = 1
class schrodinger.application.phase.packages.ligand_aligner.LigandAlignerOptions

Bases: object

Holds options that control alignment of structures.

__init__()

Initialize self. See help(type(self)) for accurate signature.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.phase.packages.ligand_aligner', '__doc__': '\n Holds options that control alignment of structures.\n ', '__init__': <function LigandAlignerOptions.__init__>, '__dict__': <attribute '__dict__' of 'LigandAlignerOptions' objects>, '__weakref__': <attribute '__weakref__' of 'LigandAlignerOptions' objects>})
__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.phase.packages.ligand_aligner'
__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__

Return str(self).

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

class schrodinger.application.phase.packages.ligand_aligner.LigandAligner(options=None, logger=None)

Bases: object

Generates a consensus alignment for a set of ligands using the best practices approach described at the top of this module.

__init__(options=None, logger=None)

Constructor taking options that control the alignment behavior and a logger for printed output.

Parameters:
  • options (LigandAlignerOptions) – Alignment options. See also setOptions.
  • logger (Logger) – Logger for printed output. Informative messages about the alignment process are issued at the INFO level; additional messages triggered by core snapping failures are issed at the DEBUG level. See also setLogger.
align(sts)

Aligns the supplied structures using core snapping, flexible least-squares core alignment, or flexible shape-based superposition. See setOptions to modify the default alignment behavior.

Parameters:sts (list(structure.Structure)) – The structures to be aligned.
Returns:The aligned structures in the order they were provided, minus any fragmented structures or structures lacking rings.
Return type:list(structure.Structure)
getLogger()

Returns the logger used for output messages.

Returns:The logger.
Return type:Logger
getOptions()

Returns a copy of the options that control the alignment process and the level of printed output.

Returns:The options.
Return type:LigandAlignerOptions
setLogger(logger)

Sets the logger to be used for printing messages during the alignment process.

Parameters:logger (Logger) – The logger.
setOptions(options)

Sets options that control the alignment process and the level of output printed.

Parameters:options (LigandAlignerOptions) – The options.
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.phase.packages.ligand_aligner', '__doc__': '\n Generates a consensus alignment for a set of ligands using the best\n practices approach described at the top of this module.\n ', '__init__': <function LigandAligner.__init__>, 'align': <function LigandAligner.align>, 'getLogger': <function LigandAligner.getLogger>, 'getOptions': <function LigandAligner.getOptions>, 'setLogger': <function LigandAligner.setLogger>, 'setOptions': <function LigandAligner.setOptions>, '_align': <function LigandAligner._align>, '_alignConformers': <function LigandAligner._alignConformers>, '_alignLeastSquares': <function LigandAligner._alignLeastSquares>, '_alignShapes': <function LigandAligner._alignShapes>, '_alignSnappedCore': <function LigandAligner._alignSnappedCore>, '_badCore': <function LigandAligner._badCore>, '_clusterByScaffold': <function LigandAligner._clusterByScaffold>, '_createMinimumSpanningTree': <function LigandAligner._createMinimumSpanningTree>, '_filterMatches': <function LigandAligner._filterMatches>, '_getAlignCoreOptions': <function LigandAligner._getAlignCoreOptions>, '_getAnchorAtoms': <function LigandAligner._getAnchorAtoms>, '_getBestAlignment': <function LigandAligner._getBestAlignment>, '_getFrozenAtoms': <function LigandAligner._getFrozenAtoms>, '_getScaffoldMatrix': <function LigandAligner._getScaffoldMatrix>, '_getShape': <function LigandAligner._getShape>, '_getSideChain': <function LigandAligner._getSideChain>, '_growCore': <function LigandAligner._growCore>, '_growSideChain': <function LigandAligner._growSideChain>, '_initAlignData': <function LigandAligner._initAlignData>, '_initSideChains': <function LigandAligner._initSideChains>, '_matchCoreAtoms': <function LigandAligner._matchCoreAtoms>, '_matchSideChains': <function LigandAligner._matchSideChains>, '_preparePrimaryRef': <function LigandAligner._preparePrimaryRef>, '_removeDistoredStructures': <function LigandAligner._removeDistoredStructures>, '_setupAlign': <function LigandAligner._setupAlign>, '_snapAndScore': <function LigandAligner._snapAndScore>, '_snapSideChains': <function LigandAligner._snapSideChains>, '_storeCoreAtomCoords': <function LigandAligner._storeCoreAtomCoords>, '_storeRingsAndAnchors': <function LigandAligner._storeRingsAndAnchors>, '_updateSimilarities': <function LigandAligner._updateSimilarities>, '__dict__': <attribute '__dict__' of 'LigandAligner' objects>, '__weakref__': <attribute '__weakref__' of 'LigandAligner' objects>})
__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.phase.packages.ligand_aligner'
__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__

Return str(self).

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