-
Notifications
You must be signed in to change notification settings - Fork 32
KekulizeMolecule
dstoeckel edited this page Mar 16, 2015
·
2 revisions
BALL offers a Kekuliser
class to transform bonds with type "aromatic" to conjugated single and double bonds.
Please note: This class needs some cleanup!
#include<BALL/KERNEL/molecule.h>
#include <BALL/KERNEL/atom.h>
#include<BALL/STRUCTURE/kekulizer.h>
...
Molecule molecule;
System system;
vector< vector< Atom * > > rings;
// compute all rings
RingPerceptionProcessor rpp;
rpp.calculateSSSR(rings, system);
// compute all aromatic rings
AromaticityProcessor ap;
ap.aromatizeSimple(rings);
// based on rings compute vector< std::set< Atom * > > arings, rings;
Kekuliser keku;
keku.setAromaticRings(arings);
keku.setRings(rings);
keku.setup(&molecule);
std::cout << "Number of unassigned bonds:" << keku.getUnassignedBonds().size() << std::endl;
keku.clear();