opencadd.structure.superposition.engines.mda.MDAnalysisAligner

class opencadd.structure.superposition.engines.mda.MDAnalysisAligner(alignment_strategy: str = 'global', alignment_matrix: str = 'BLOSUM62', alignment_gap: int = -10, strict_superposition: bool = False, per_residue_selection='name CA and not altloc B and not altloc C', superposition_weights=None, superposition_delta_mass_tolerance=0.1)[source]

Factory to configure an aligner based on MDAnalysis’ superposition algorithms.

Roughly, the algorithm follows these steps:

  1. Sequence alignment – using “biotite” and “MDAnalysis”

  2. Structural superposition – using “MDAnalysis”

Parameters
  • alignment_strategy (str, optional, default=global) – What type of algorithm will be used to calculate the sequence alignment. Choose between: - “global” (Needleman-Wunsch) - “local” (Smith-Waterman)

  • alignment_matrix (str, optional, default=BLOSUM62) – The substitution matrix used for scoring

  • alignment_gap (int or (tuple, dtype=int), optional, default=-10) – Int the value will be interpreted as general gap penalty. Tupel is provided, an affine gap penalty is used. The first integer in the tuple is the gap opening penalty, the second integer is the gap extension penalty. The values need to be negative.

  • strict_superposition (bool, optional, default=False) – True: Will raise SelectionError if a single atom does not match between the two selections. False: Will try to prepare a matching selection by dropping residues with non-matching atoms.

  • per_residue_selection (str or AtomGroup or None, optional, default=None) – None: Apply to mobile.universe.atoms (i.e., all atoms in the context of the selection from mobile such as the rest of a protein, ligands and the surrounding water) str: Apply to mobile.select_atoms(selection-string), e.g “protein and name CA” AtomGroup: Apply to the arbitrary group of atoms

  • superposition_weights ({“mass”, None} or array_like, optional) – choose weights. With “mass” uses masses as weights; None: weigh each atom equally If a float array of the same length as mobile is provided, use each element of the array_like as a weight for the corresponding atom in mobile.

  • superposition_delta_mass_tolerance (float, optional, default=0.1) – Reject match if the atomic masses for matched atoms differ by more than tol_mass

References