RDKitAlignMolecules.py - Align molecules by RMSD or shape
RDKitAlignMolecules.py [--alignment <Open3A, CrippenOpen3A, RMSD, BestRMSD>] [--infileParams <Name,Value,...>] [--maxIters <number>] [--mode <OneToOne, FirstToAll>] [ --outfileParams <Name,Value,...> ] [--overwrite] [-w <dir>] -r <reffile> -p <probefile> -o <outfile>
RDKitAlignMolecules.py -h | --help | -e | --examples
Perform alignment between a set of similar molecules in reference and probe input files. The molecules are aligned either by Root Mean Square Distance (RMSD) between molecules or overlying their shapes (Open3A or CrippenOpen3A). The RDKit function fails to calculate RMSD values for dissimilar molecules. Consequently, unaligned probe molecules are written to the output file for dissimilar molecule pairs.
The supported input file formats are: Mol (.mol), SD (.sdf, .sd)
The supported output file formats are: SD (.sdf, .sd)
Alignment methodology to use for aligning molecules. Possible values: Open3A, CrippenOpen3A, RMSD, BestRMSD.
The Open3A and CrippenOpen3A allow alignment of molecules using their shapes Open 3DAlign (Open3A) [ Ref 132 ] overlays molecules based on MMFF atom types and charges. Crippen Open 3DAlign (CrippenOpen3A) uses Crippen logP contributions to overlay molecules.
During BestRMSMode mode, the RDKit 'function AllChem.GetBestRMS' is used to align and calculate RMSD. This function calculates optimal RMSD for aligning two molecules, taking symmetry into account. Otherwise, the RMSD value is calculated using 'AllChem.AlignMol function' without changing the atom order. A word to the wise from RDKit documentation: The AllChem.GetBestRMS function will attempt to align all permutations of matching atom orders in both molecules, for some molecules it will lead to 'combinatorial explosion'.
A comma delimited list of parameter name and value pairs for reading molecules from files. The supported parameter names for different file formats, along with their default values, are shown below:
Maximum number of iterations to perform for each molecule pair during minimization of RMSD values. This option is ignored during BestRMSD mode.
Specify how molecules are handled in reference and probe input files during alignment of molecules between reference and probe molecules. Possible values: OneToOne and FirstToAll. For OneToOne mode, the alignment is performed for each pair of molecules in the reference and probe file, and the aligned probe molecule is written the output file. For FirstToAll mode, the alignment is only performed between the first reference molecule against all probe molecules.
Print this help message.
Output file name for writing out aligned probe molecules values. Supported file extensions: sdf or sd.
A comma delimited list of parameter name and value pairs for writing molecules to files. The supported parameter names for different file formats, along with their default values, are shown below:
Probe input file name.
Reference input file name.
Overwrite existing files.
Location of working directory which defaults to the current directory.
To perform shape alignment using Open3A methodology between paris of molecules in reference and probe input 3D SD files and write out a SD file containing aligned molecules, type:
To perform alignment using RMSD methodology between paris of molecules in reference and probe input 3D SD files and write out a SD file containing aligned molecules, type:
To perform alignment using Open3A methodology between first reference molecule against all probe molecules in 3D SD files without removing hydrogens , and write out a SD file containing aligned molecules, type:
RDKitCalculateMolecularDescriptors.py, RDKitCompareMoleculeShapes.py, RDKitCalculateRMSD.py, RDKitConvertFileFormat.py, RDKitGenerateConformers.py, RDKitPerformMinimization.py
Copyright (C) 2020 Manish Sud. All rights reserved.
The functionality available in this script is implemented using RDKit, an open source toolkit for cheminformatics developed by Greg Landrum.
This file is part of MayaChemTools.
MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.