Dear Ivan, Many thanks for your reply. Yes, when I give 3D hydrogen added molecule as input (molecule.pdb) the result remains the same. Say, if I give benzene molecule (C1=CC=CC=C1) as an input, or other complex molecule, it prints the correct atom rank no matter whether hydrogen atoms are there or not. In [1]: from rdkit import Chem In [2]: m = Chem.MolFromSmiles('C1=CC=CC=C1') In [3]: ri = m.GetRingInfo() In [4]: print(ri.AtomRings()) *((0, 5, 4, 3, 2, 1),)*
Thank and Best Regards, Goutam On Thu, Mar 11, 2021 at 5:49 PM Ivan Tubert-Brohman < ivan.tubert-broh...@schrodinger.com> wrote: > Hi Goutam, > > The ring atoms reported by RDKit in your example are correct; you just > need to consider that the atom indexes correspond to the position of each > atom in the SMILES string. How could RDKit guess the index that the atom > might have in a PDB file that's not even being read in your example? > > I'm guessing maybe in your real use case you did read the PDB file. It is > possible that the atoms got renumbered, for example if the hydrogens were > deleted in the process. > > Hope this helps, > Ivan > > On Thu, Mar 11, 2021 at 11:35 AM Goutam Mukherjee <cyz078...@gmail.com> > wrote: > >> Dear Members, >> >> I have found an error in RDKit output. I am not sure whether it is my >> mistake. >> I have a SMILES code of a molecule: >> C[S+](CC[C@H](N)C([O-])=O)C[C@H]1O[C@H]([C@H](O)[C@ >> @H]1O)N1C=NC2=C1N=CN=C2N >> >> the 3D coordinates of the molecule is attached here with. >> >> *I ran the following command:* >> >> >> >> >> >> >> >> *In [1]: from rdkit import ChemIn [2]: m = >> Chem.MolFromSmiles('C[S+](CC[C@H](N)C([O-])=O)C[C@H]1O[C@H]([C@H](O)[C@@H]1O)N1C=NC2=C1N=CN=C2N')In >> [3]: ri = m.GetRingInfo()In [4]: print(ri.AtomRings())((10, 11, 12, 13, >> 15), (18, 17, 21, 20, 19), (22, 23, 24, 25, 20, 21))* >> >> Here the atom rank does not correspond to the ring atom ranks. >> This molecule contains two five members and one six member ring >> The true atom rank would be >> *{(11, 13, 14, 16, 19), (22, 23, 24, 25, 26), (25, 26, 27, 28, 29, 30)}* >> >> Could anyone please give me a solution how I get a corect atom ranks >> which are part of a ring. >> >> Thanks and Best Regards, >> Goutam >> >> _______________________________________________ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss