Skip to main content

BondOrder

Enum BondOrder 

Source
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

Source

pub fn order_value(self) -> Option<f32>

Fractional bond order. Returns None for aromatic (non-integer).

Source

pub fn order_int(self) -> u8

Integer bond order used for valence calculations. Aromatic, stereo, dative, and query bonds count conservatively as 1.

Source

pub fn smiles_token(self) -> &'static str

The SMILES/CXSMILES token that represents this bond order when available.

Source

pub fn smiles_char(self) -> char

The SMILES character that represents this bond order.

Trait Implementations§

Source§

impl Clone for BondOrder

Source§

fn clone(&self) -> BondOrder

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BondOrder

Source§

impl Debug for BondOrder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for BondOrder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for BondOrder

Source§

impl Hash for BondOrder

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for BondOrder

Source§

fn eq(&self, other: &BondOrder) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for BondOrder

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.