Hello,

to check the consistence of bonds in a molecule I tried:

  FOR_ATOMS_OF_MOL(atom, obMol)
    if (atom->BOSum() > atom->GetImplicitValence())
      return false;
  return true;

But this is wrong: e.g. Aspirin fails this test and if I understand
correctly the reason seems that  atom->BOSum() returns the total number
of bonds while GetImplicitValence() returns the maximum number of
neighbors. So my code is incorrect for all molecules with double (and
higher order) bonds ?

Is there something like atom->GetImplicitBOSum() and/or what would be
the correct implementation to check basic chemistry rules ?

regards,

Rafel


------------------------------------------------------------------------------
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

Reply via email to