Dear RDKit experts, I am new to RDKit and I have a simple question about atom indexing with RDKit. I am using RDKit in Python to process a collection of small molecule, for each I have the SMILES and a pdb file without explicit hydrogens. To draw the 2D images of the molecules, I used AssignBondOrdersFromTemplate to assign the bond order.
pdbmol = rdmolfiles.MolFromPDBFile(<the pdb file>) smilemol = Chem.MolFromSmiles(<the smiles string>) newmol = AllChem.AssignBondOrdersFromTemplate(smilemol, pdbmol) rdDepictor.Compute2DCoords(newmol) for atom in newmol.GetAtoms(): atom.SetAtomMapNum(atom.GetIdx()) Using the above lines, I was able to draw the ligand in 2D with Idx of atoms. However, I noticed that the Idx of atoms have changed in the newmol… Is there a way to keep the original indexing from the PDB file in the newmol (perhaps by an alternative way to set bond order)? I wanted to label a couple of atoms in the 2D picture, but I only know their Idx in the PDB file, so I really wish to keep the original indexing. Any comments/suggestions would be greatly appreciated. Thank you for your time and kind advice in advance!! Many Thanks, Amy -- Amy He Chemistry Graduate Teaching Assistant Hadad Research Group Ohio State University he.1...@osu.edu<mailto:he.1...@osu.edu>
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss