Hi Brian,

Thank you for your kind reply. That’s a very good point! The order of atoms in 
the PDB file (which I extracted from RCSB PDB) is not the same as in the 
SMILES. And I find that the indexing in newmol will follow the reference 
molecule.

But I was wrong in thinking that the indexing was different from both. I didn’t 
realize that the indexing is zero-based… Using the codes in the previous 
message, the newmol will receive the bond order from smilemol and the indexing 
from pdbmol, which is exactly what I wanted to do!

Thank you again for your time and kind help!!

Thanks,
Amy

--
Amy He
Chemistry Graduate Teaching Assistant
Hadad Research Group
Ohio State University
he.1...@osu.edu

From: Bennion, Brian <benni...@llnl.gov>
Date: Sunday, July 17, 2022 at 8:20 PM
To: He, Amy <he.1...@buckeyemail.osu.edu>, rdkit-discuss@lists.sourceforge.net 
<rdkit-discuss@lists.sourceforge.net>
Subject: Re: [Rdkit-discuss] Atom indexing with AssignBondOrdersFromTemplate
I don’t know if this is the issue but Are the order of atoms the same between 
the pdb file and the smiles string? --- Sent from Workspace ONE Boxer On July 
16, 2022 at 8:14:51 PM PDT, He, Amy <he.1...@buckeyemail.osu.edu> wrote: ‍ ‍ ‍ 
‍ ‍

I don’t know if this is the issue but Are the order of atoms the same between 
the pdb file and the smiles string?


---
Sent from Workspace ONE 
Boxer<https://urldefense.com/v3/__https:/whatisworkspaceone.com/boxer__;!!KGKeukY!ys014tzEXJmNi8IQW56hTW857n_g_PPt2PXLOUBlwv2sRR__E6NIIDJeLXnpF8VrEQlDqMnesvLXIQc-55S-Qekas4gYPes$>
On July 16, 2022 at 8:14:51 PM PDT, He, Amy <he.1...@buckeyemail.osu.edu> wrote:

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>


<ATT00001.txt>
<ATT00002.txt>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to