AvogadroLibs 2.1.0-20261111
Loading...
Searching...
No Matches
AromaticityPerceiver Class Reference

Perceive which atoms and bonds belong to an aromatic system. More...

#include <avogadro/core/aromaticity.h>

Public Types

enum class  Model { Default }

Public Member Functions

 AromaticityPerceiver (const Molecule *m=nullptr, Model model=Model::Default)
void setMolecule (const Molecule *m)
const Molecule * molecule () const
Model model () const
const std::vector< std::vector< Index > > & ringSystems () const
const std::vector< signed char > & piContributions () const
const std::vector< bool > & aromaticAtoms () const
const std::vector< bool > & aromaticBonds () const

Detailed Description

Results are derived, not stored: like RingPerceiver, this takes a molecule and answers questions about it, leaving the molecule untouched. Perception runs on first use and is cached until setMolecule() is called again.

The molecule is read in its Kekule form – alternating single and double bond orders, which is how Avogadro stores structures – so no kekulization is required or performed.

Each candidate atom is assigned a pi electron contribution, and a ring is aromatic when its contributions sum to 4n+2 and every atom is a candidate. Fused rings are also tested as a whole, which is what makes azulene aromatic even though neither of its rings satisfies the rule alone.

The contribution table is hand-transcribed chemistry and is the part of this class most in need of review; piContributions() exposes it directly so it can be tested without going through the ring arithmetic.

Member Enumeration Documentation

◆ Model

enum class Model
strong

Which set of rules to apply. Only Default exists so far; the enum is here so that adding a model later does not change this class's interface.

Enumerator
Default 

Broadly the model RDKit applies by default.

Member Function Documentation

◆ ringSystems()

const std::vector< std::vector< Index > > & ringSystems ( ) const

Atoms grouped into fused ring systems: the connected components of the ring bonds. Aromaticity is decided over these as well as over individual rings.

◆ piContributions()

const std::vector< signed char > & piContributions ( ) const

Per-atom pi electron contribution, or NotAromaticCandidate for an atom that cannot be part of an aromatic system at all.

◆ aromaticAtoms()

const std::vector< bool > & aromaticAtoms ( ) const

One entry per atom, true where the atom is in an aromatic system.

◆ aromaticBonds()

const std::vector< bool > & aromaticBonds ( ) const

One entry per bond, true where both ends share an aromatic system.


The documentation for this class was generated from the following file: