Hello,
what would be the correct method to check the consistency of bonds in a
molecule ?
My first try (below) is wrong: e.g. Aspirin fails this test and if I
understand correctly the reason seems that I compare total number of bonds
(i.e. counting double bonds twice) with maximum/expected number of
neighbors, which (for me unexpected but probably correct) considers
hybridization and equals 3 for SP2-carbons ?
Is there something like atom->GetImplicitBOSum() and/or what would be the
correct implementation to check basic chemistry rules ?
regards,
Rafel
FOR_ATOMS_OF_MOL(atom, obMol)
if (atom->BOSum() > atom->GetImplicitValence())
return false;
return true;
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss