Skip to content
dstoeckel edited this page Feb 20, 2015 · 2 revisions

How can I compute the aromaticity of a molecule?

BALL offers an AromaticityProcessor to compute aromaticit atoms and bonds of a molecule. Currently BALL supports two definitions of aromaticity:

  • a BALL specific definition and

  • the algorithm developed by

   Jakalian, A., Jack, D. B., and Bayly, C. I. (2002). 
   Fast, efficient generation of high- quality atomic charges. 
   AM1-BCC model: II. parameterization and validation. 
   J Comput Chem, 23(16), 1623–1641.

You can switch between both definitions by setting the option AromaticityProcessor::Option::AROMATICITY_DEFINITION to AromaticityProcessor::Method::STANDARD or AromaticityProcessor::Method::AM1BCC respectively.

The option OVERWRITE_BOND_ORDERS determines whether the aromaticity is stored in the bond orders or denoted as a property called AromaticityProcessor::Option::AROMATICITY_PROPERTY_STRING.

#include <BALL/QSAR/aromaticityProcessor.h>
#include <BALL/QSAR/ringPerceptionProcessor.h>

System S;
...
AromaticityProcessor ap;	
ap.options[AromaticityProcessor::Option::AROMATICITY_DEFINITION] = AromaticityProcessor::Method::AM1BCC; 
ap.options[AromaticityProcessor::Option::STORE_AM1BCC_AROMATICITY_TYPE] = true;
ap.options[AromaticityProcessor::Option::OVERWRITE_BOND_ORDERS] = true;

S.apply(ap);

String aromaticity_property_name = ap.options[AromaticityProcessor::Option::AROMATICITY_PROPERTY_STRING];

// find all aromatic atoms
AtomConstIterator a_it = molecule->beginAtom();
for ( ; a_it != molecule->endAtom(); ++a_it)
{
  if (a_it->hasProperty(aromaticity_property_name))
  {
    if (a_it->getProperty(aromaticity_property_name).getBool())
    {
      cout << a_it->getFullName() << endl;
    }
  }
}
  
// find all aromatic bonds
Atom::BondIterator b_it;	
BALL_FOREACH_BOND(S, a_it, b_it)
{
  if (    (b_it->getOrder() == Bond::ORDER__AROMATIC)
       || (b_it->hasProperty(Bond::IS_AROMATIC))
       || ((b_it->hasProperty(aromaticity_property_name) &&
            b_it->getProperty(aromaticity_property_name).getBool())
     )
  {
    cout << b_it->getOrder() << endl;
  }
}

Clone this wiki locally