Hi JP, Not sure if this is of any help. If it's an pdb file from rcsb or an in-house one where you have a corresponding smiles available maybe you could use this information to properly setup the bond types using bond matches? I know the components.cif file still has quite a few errors - however, maybe it could be of help. Cheers Nik
Maybe you could use the smiles information ion On 7/6/12 5:04 AM, "Greg Landrum" <[email protected]> wrote: >Hi JP, > >On Thu, Jul 5, 2012 at 7:07 PM, JP <[email protected]> wrote: >> >> >> I generate a RWMol instance from the HETATM portion of a PDB file. My >>atoms >> are currently only joined by a single bond as defined in the connect >>portion >> of the pdb file, e.g. >> >> CONECT 2235 2234 2236 >> CONECT 2236 2231 2235 2251 >> CONECT 2237 2238 2242 > >ah, yes, the missing bond orders, one of the many reasons that I have >never done a PDB parser for the RDKit. :-S > >I think you're doing this work in C++, so I'm going to answer the rest >of the questions accordingly. > >> Are there any obvious rdkit ways how to detect :- >> >> 0. rings > >Sure. > >If you just want to know if each atom/ring is in a ring you can use >MolOps::fastFindRings and then mol.getRingInfo().numAtomRings(idx)>0 >or mol.getRingInfo().numBondRings(idx)>0 > >If you want to know what the SSSR rings are, then you should use >MolOps::symmetrizeSSSR(). You can pass that an extra argument where it >will return the rings as defined by atom indices. After calling this, >you can also get the set of atom rings using >mol.getRingInfo().atomRings() or the bond rings with >mol.getRingInfo().bondRings(); > >> 1. aromatic rings/atoms >> 2. double/triple bonds >> 3. charges (if any) > >Here's where the trouble starts. > >I guess you want to perceive the bond types and atom hybridizations >from the geometry. From there you can get the charges. The RDKit does >not currently have anything to do this. There was a discussion on the >mailing list last year: >http://comments.gmane.org/gmane.science.chemistry.rdkit.user/85 >where Geoff Hutchinson very kindly offered to donate the OpenBabel >bond perception code to the RDKit. He sent the code, but I've never >had the time to "port" it from OpenBabel to RDKit. If you're >interested in implementing this and were willing to do it in a way >that could be integrated into the main RDKit, I can send you the >donated code; it's about 300 lines of well-commented C++. > >> >> I would like to set these properties on every atom instance contained >>in my >> RWMol - so I generate a correct molecule representation. >> I assume sanitize would not clean these up for me? Correct? > >Correct. Sanitize uses the bond information that's there. > >-greg > >-------------------------------------------------------------------------- >---- >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Rdkit-discuss mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Rdkit-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

