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.

If a particular structure is designated as the reference to which all other structures are to be aligned, steps 1-5 are appropriately modified or skipped. Furthermore, if a common core is specified via SMARTS, Bemis-Murcko scaffold detection is disabled, and the SMARTS is used in lieu of the largest shared scaffold to snap/align structures to the reference.

If refinement is requested, additional conformers are generated for each structure that was successfully snapped to its reference, with core atoms and snapped sidechains being held fixed. The resulting conformers are used to systematically increase the average in-place shape similarity over all pairs of structures, whether snapped or not. Conformers are not generated for the the primary reference, a user designated reference, or any structure that was not snapped to its reference.

Copyright Schrodinger LLC, All Rights Reserved.

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

Bases: enum.Enum

An enumeration.

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 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, ref_index=None, core_smarts='')

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.
  • ref_index (int) – 1-based reference structure number. Overrides the basic algorithm that chooses reference structures and determines the order in which alignments are performed.
  • core_smarts (str) – SMARTS string that represents the common core for all alignments. Requires a reference structure to be designated.
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.