On Tue, Mar 26, 2013 at 3:02 PM, Noel O'Boyle <baoille...@gmail.com> wrote:

> It might be a good idea to sit down while you read this. You seem to
> have forgotten that Implicit Valence is not implicit valence, but
> rather the number of bonds to an atom.


I'm finally getting this through my head, and based on your admonitions, my
code is starting to fill up with stuff like this:

a1->SetImplicitValence(bsum);   // "valence" is actually the number of bonds


> atomtyp.txt says 3 bonds to a
> boron. The =O and the OH is two bonds, so there's one missing.


Aaack.  I thought the "3" meant "sp3", not the implicit valence.  The
definitions for boron go like this:

INTHYB  [B]                       2 #sp2 boron
INTHYB  [BD4]                     3 #sp3 boron
IMPVAL  [#5]                      3 # Generic boron

So ... the INTHYB are SPx values, and the IMPVAL are  ... number of bonds.
Got it.

What I can't figure is how such a glaring error has never been noticed.
Surely I'm not the first guy to use OpenBabel on an atom with a B=O bond?

Thanks!



> That's
> the reason for the two thousand different impval statements for
> nitrogen. Although three actual Implicit Valences would cover the lot,
> we go around the houses catching all the different possibilities of
> bond orders, etc.
>
> So feel free to edit atomtyp.txt to patch it up for Boron. But better
> still, all in favor of replacing this impval business, say "aye".
>

Aye!

Craig


>
> - Noel
>
>
>
> On 26 March 2013 21:50, Craig James <cja...@emolecules.com> wrote:
> > Anyone know what's going on with boron?  The atomtyp.txt file looks
> right to
> > me.  A double bond to oxygen seems to mess it up.  I'm no chemist, but
> > everything I can find says this is just wrong.
> >
> >
> > $ echo "O=BO" | obabel -i smi -o smi
> > O=[BH]O
> >
> > Note the extra H on the boron atom.  Here's the same thing as an SDF with
> > the "add H" option.  Note that it adds TWO hydrogens, one for the -OH,
> and
> > an extra (incorrect) one for [BH].
> >
> > $ echo "O=BO" | obabel -i smi -o sdf -h
> >
> >  OpenBabel03261314442D
> >
> >   5  4  0  0  0  0  0  0  0  0999 V2000
> >     0.0000    0.0000    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
> >     0.0000    0.0000    0.0000 B   0  0  0  0  0  0  0  0  0  0  0  0
> >     0.0000    0.0000    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
> >     0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
> >     0.0000    0.0000    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
> >   1  2  2  0  0  0  0
> >   2  3  1  0  0  0  0
> >   2  4  1  0  0  0  0
> >   3  5  1  0  0  0  0
> > M  END
> > $$$$
> >
> > Thanks,
> > Craig
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Own the Future-Intel&reg; Level Up Game Demo Contest 2013
> > Rise to greatness in Intel's independent game demo contest.
> > Compete for recognition, cash, and the chance to get your game
> > on Steam. $5K grand prize plus 10 genre and skill prizes.
> > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
> > _______________________________________________
> > OpenBabel-Devel mailing list
> > OpenBabel-Devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/openbabel-devel
> >
>
------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to