|
From: andi <ad...@mi...> - 2011-04-19 06:37:50
|
>If you're adding atoms and bonds programmatically, you should wrap the
modifications with:
>mol.BeginModify();
>// make changes
>mol.EndModify();
>The EndModify() call will reset aromatic perception.
Hi Geoff,
I tried doing that, but still doesn't seem to work. The only thing I can
think of that may cause this is the bond order. Due to the nature of the
project, bondorders get different values for rings and aromatic type rings.
static enum BondTypes {
SINGLE = 1,
DOUBLE,
TRIPLE,
SINGLERING = 6,
DOUBLERING,
TRIPLERING,
AROMATICSINGLE = 10,
AROMATICDOUBLE,
AROMATICTRIPLE
};
Essentially, for regular rings, the bond order becomes 6,7, and 8 for
single, double and triple respectively, and for aromatic type bonds, the
bond orders become 10, 11, and 12 for single, double and triple
respectively.
Code for updating bondorder.
http://pastebin.com/ExU01Lz8
--
View this message in context: http://forums.openbabel.org/Setting-Aromaticity-tp3416960p3459585.html
Sent from the General discussion mailing list archive at Nabble.com.
|