-
Hi all, mol = Chem.MolFromMol2File(mol2file)
canonical_mol = Chem.MolFromSmiles(Chem.MolToSmiles(mol)) More specifically, my problem is that I have to locate the same groups of torsional bonds on the both two molecules with one-by-one mapping. The location of torsional bonds are determined through the way below. And because 1) the orientation and atom ordering are different in from rdkit.Chem.Lipinski import RotatableBondSmarts
all_rot = mol.GetSubstructMatches(RotatableBondSmarts) So any specific ideas on solving my specific problem are also welcome and appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@qcxia20
So atom 0 was atom 17 before canonicalization, 1 was 16, 2 was 18, etc. |
Beta Was this translation helpful? Give feedback.
@qcxia20
MolFromSmiles
adds two private properties to the molecule it is called on,_smilesAtomOutputOrder
and_smilesBondOutputOrder
, which contain the original atom index before canonicalization. See below: