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,
}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.
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