pub enum BondOrder {
Show 13 variants
Single,
Double,
Triple,
Quadruple,
Aromatic,
Up,
Down,
Zero,
Dative,
QueryAny,
QuerySingleOrDouble,
QuerySingleOrAromatic,
QueryDoubleOrAromatic,
}Expand description
Bond order, covering all SMILES bond types.
Variants§
Single
Single bond -
Double
Double bond =
Triple
Triple bond #
Quadruple
Quadruple bond $ (used in some metal complexes)
Aromatic
Aromatic bond : (pre-Kekulization representation)
Up
Stereo bond / (E/Z specification)
Down
Stereo bond \ (E/Z specification)
Zero
Zero-order bond used by CTAB/CXSMILES for non-valence connections.
Dative
Dative/coordinate bond. The stored atom1 → atom2 direction is the donor→acceptor direction.
QueryAny
Query bond matching any bond (~ / MDL type 8).
QuerySingleOrDouble
Query bond matching single or double bonds (MDL type 5).
QuerySingleOrAromatic
Query bond matching single or aromatic bonds (MDL type 6).
QueryDoubleOrAromatic
Query bond matching double or aromatic bonds (MDL type 7).
Implementations§
Source§impl BondOrder
impl BondOrder
Sourcepub fn order_value(self) -> Option<f32>
pub fn order_value(self) -> Option<f32>
Fractional bond order. Returns None for aromatic (non-integer).
Sourcepub fn order_int(self) -> u8
pub fn order_int(self) -> u8
Integer bond order used for valence calculations. Aromatic, stereo, dative, and query bonds count conservatively as 1.
Sourcepub fn smiles_token(self) -> &'static str
pub fn smiles_token(self) -> &'static str
The SMILES/CXSMILES token that represents this bond order when available.
Sourcepub fn smiles_char(self) -> char
pub fn smiles_char(self) -> char
The SMILES character that represents this bond order.