pub enum ContributionReason {
Show 15 variants
AlreadyAromaticContext,
CarbonEndocyclicDouble,
CarbonExocyclicHeteroatomDouble,
CarbonCarbanionLonePair,
CarbonCationVacant,
CarbonSp3Ineligible,
NitrogenPyrroleTypeH,
NitrogenPyridineTypeExplicitDouble,
NitrogenBridgeheadOrSubstitutedLonePair,
NitrogenAromaticInRing,
NitrogenIneligible,
ChalcogenLonePair,
ChalcogenCationPyridineType,
ChalcogenIneligible,
UnsupportedElement,
}Expand description
Reason a ring atom contributes (or fails to contribute) pi electrons,
mirroring ring_pi_electrons’s branches one-to-one. Purely diagnostic.
Variants§
AlreadyAromaticContext
Already aromatic from a previous Pass 1/Pass 2 ring: contributes 1π unconditionally.
CarbonEndocyclicDouble
Carbon with an endocyclic double/aromatic bond: 1π.
CarbonExocyclicHeteroatomDouble
Carbon whose only double bond is exocyclic to O/N/S: 0π (e.g. a carbonyl carbon).
CarbonCarbanionLonePair
Carbanion with no double bond: 2π (lone pair).
CarbonCationVacant
Cationic ring carbon (e.g. tropylium’s [cH+]): empty p-orbital
electron acceptor, 0π, regardless of representation (Kekule or
aromatic-bond) – mirrors CarbonCarbanionLonePair’s anion rule at
the opposite electron-count extreme.
CarbonSp3Ineligible
sp3 carbon (no double bond, not a carbanion): ineligible.
NitrogenPyrroleTypeH
Pyrrole-type N with an H, neutral or anionic: 2π.
NitrogenPyridineTypeExplicitDouble
Pyridine-type N with an explicit double bond (bare, or protonated N-H+ once it has a Kekule double bond): 1π.
NitrogenBridgeheadOrSubstitutedLonePair
Bridgehead N (or N-substituted azole N), neutral or anionic: all-sigma valence, lone pair in p orbital: 2π.
NitrogenAromaticInRing
N with an in-ring aromatic bond, not a bridgehead (pyridine-type notation, or a charged N-H+ in aromatic-bond representation): 1π.
NitrogenIneligible
N matching none of the above rules: ineligible.
ChalcogenLonePair
O/S/Se/Te lone-pair donor, neutral or anionic, ring-degree 2: 2π.
ChalcogenCationPyridineType
Charged O/S (e.g. pyrylium’s [o+]): the positive charge consumes
the lone pair, so this atom needs pyridine-type treatment (1π via
its own ring double/aromatic bond) instead of donating 2π.
ChalcogenIneligible
O/S/Se/Te with the wrong ring degree, an exocyclic X=O, (Se/Te) non-RdkitLike mode, or a charged O/S with no ring double/aromatic bond to fall back on: ineligible.
UnsupportedElement
Element not supported by the model: ineligible.
Implementations§
Source§impl ContributionReason
impl ContributionReason
Sourcepub fn is_eligible(self) -> bool
pub fn is_eligible(self) -> bool
Whether this reason is an eligible contribution (matches
ring_pi_electrons returning Some) rather than one that disqualifies
the whole ring (matches it returning None).
Sourcepub fn eligibility(self) -> PiEligibility
pub fn eligibility(self) -> PiEligibility
Coarse PiEligibility bucket for this fine-grained reason
(Aromaticity-A1-1a). AlreadyAromaticContext has no single fixed
bucket – it always carries exactly 1π, so it maps to OneElectron.
Trait Implementations§
Source§impl Clone for ContributionReason
impl Clone for ContributionReason
Source§fn clone(&self) -> ContributionReason
fn clone(&self) -> ContributionReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more