moleculekit.tools.graphalignment module

moleculekit.tools.graphalignment.compareGraphs(G, H, fields=('element', ), tolerance=0.5, returnmatching=False)
moleculekit.tools.graphalignment.createProductGraph(G, H, tolerance, fields)
moleculekit.tools.graphalignment.makeMolGraph(mol, sel, fields)
moleculekit.tools.graphalignment.maximalSubstructureAlignment(mol1, mol2, sel1='all', sel2='all', fields=('element', ), tolerance=0.5, visualize=False)

Aligns two molecules on the largest common substructure

Parameters
  • mol1 (Molecule) – The reference molecule on which to align

  • mol2 (Molecule) – The second molecule which will be rotated and translated to align on mol1

  • sel1 (str) – Atom selection string of the atoms of mol1 to align. See more here

  • sel2 (str) – Atom selection string of the atoms of mol2 to align. See more here

  • fields (tuple) – A tuple of the fields that are used to match atoms

  • tolerance (float) – How different can distances be between to atom pairs for them to match in the product graph

  • visualize (bool) – If set to True it will visualize the alignment

Returns

newmol – A copy of mol2 aligned on mol1

Return type

Molecule