Menu

#756 define bond order as constant or introduce AddAromaticBond()

3.0
open
nobody
5
2012-10-23
2011-10-18
No

Currently the documentation (from bond.cpp) for bond orders says:

"The bond order (i.e., 1 = single, 2 = double... 5 = aromatic)"

The numbers "1", "2", ... "5" should be defined as constants:

define SINGLE_BOND 1

define DOUBLE_BOND 2

...

define AROMATIC_BOND 5

Also the documentation does not specify clearly the connection between order=5 and flag=OB_AROMATIC_BOND... That leads to misuse of the API, e.g.:

Incorrect: mol.AddBond(atomX, atomY, 1, OB_AROMATIC_BOND); // will not mark atoms as aromatic
Correct: mol.AddBond(atomX, atomY, 5); // why 5???

Suggestion:

Define additional function AddAromaticBond() with same arguments as AddBond() and eliminate order=5.

Discussion