|
AvogadroLibs 2.1.0-20261111
|
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 |
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.
|
strong |
| 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.
| 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.
| const std::vector< bool > & aromaticAtoms | ( | ) | const |
One entry per atom, true where the atom is in an aromatic system.
| const std::vector< bool > & aromaticBonds | ( | ) | const |
One entry per bond, true where both ends share an aromatic system.