pub struct StructuralFeatures {
pub carbon_count: u32,
pub hydroxyl_count: u32,
pub carbonyl_count: u32,
pub has_ring: bool,
pub has_aromatic_ring: bool,
pub has_cc_double_bond: bool,
pub has_halogen: bool,
pub cc_double_bond_count: u32,
pub has_triple_bond: bool,
pub chlorine_count: u32,
pub is_pure_hydrocarbon: bool,
pub is_chloro_hydrocarbon: bool,
}Expand description
Atom-count and connectivity properties extracted from a SMILES string.
These supplement functional-group detection and are used by
crate::smiles::chapter_map::map_to_subheading to resolve
4-digit HS headings to 6-digit subheadings.
Analysis is heuristic and designed for PubChem canonical SMILES.
Fields§
§carbon_count: u32Total carbon atom count (uppercase C + aromatic c, excluding Cl).
hydroxyl_count: u32Estimated hydroxyl (–OH) group count.
For carboxylic acids this includes the acid –OH (one per –COOH).
Use hydroxyl_count.saturating_sub(1) when CarboxylicAcid is
in the detected functional groups to get the extra alcohol –OH count.
carbonyl_count: u32Number of C=O (carbonyl) groups (ketone, aldehyde, ester, acid, etc.).
has_ring: booltrue when the SMILES contains a ring-closure digit outside brackets.
has_aromatic_ring: booltrue when lowercase aromatic-carbon atoms (c) are present.
has_cc_double_bond: booltrue when a C=C aliphatic double bond is present.
has_halogen: booltrue when a halogen substituent (F, Cl, Br, I) is present.
cc_double_bond_count: u32Number of C=C double bonds (counts “=C”/“=c” occurrences). Used to distinguish monoenes from dienes (e.g. isoprene has 2).
has_triple_bond: booltrue when a C≡C triple bond is present (alkynes → 2901.29).
chlorine_count: u32Number of Cl (chlorine) atoms. Used to resolve 2903.11–2903.15.
is_pure_hydrocarbon: booltrue when the SMILES contains only carbon and hydrogen atoms —
no heteroatoms (O, N, S, P) and no halogens.
Routes acyclic/cyclic hydrocarbons to HS 2901/2902.
is_chloro_hydrocarbon: booltrue when the SMILES contains only C, H, and Cl —
no other heteroatoms and no F/Br/I.
Routes simple chlorinated hydrocarbons to HS 2903.
Trait Implementations§
Source§impl Clone for StructuralFeatures
impl Clone for StructuralFeatures
Source§fn clone(&self) -> StructuralFeatures
fn clone(&self) -> StructuralFeatures
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more