pub enum BondOrder {
Single,
Double,
Triple,
Aromatic,
}Expand description
Bond order classification for chemical bonds.
Represents the multiplicity or aromaticity of a covalent bond. Used to determine equilibrium bond lengths and force constants in the DREIDING force field parameterization.
§Examples
use dreid_forge::BondOrder;
use std::str::FromStr;
// Parse from string representation
let single = BondOrder::from_str("single").unwrap();
let aromatic = BondOrder::from_str("ar").unwrap();
assert_eq!(single.value(), 1.0);
assert_eq!(aromatic.value(), 1.5);Variants§
Single
Single bond with bond order 1.0.
Double
Double bond with bond order 2.0.
Triple
Triple bond with bond order 3.0.
Aromatic
Aromatic bond with effective bond order 1.5.
Implementations§
Trait Implementations§
Source§impl Display for BondOrder
Formats the bond order as a human-readable string.
impl Display for BondOrder
Formats the bond order as a human-readable string.
Produces title-case output: “Single”, “Double”, “Triple”, or “Aromatic”.
Source§impl FromStr for BondOrder
Parses a bond order from its string representation.
impl FromStr for BondOrder
Parses a bond order from its string representation.
Accepts case-insensitive text or numeric forms:
- “single” or “1” →
Single - “double” or “2” →
Double - “triple” or “3” →
Triple - “aromatic” or “ar” →
Aromatic
§Errors
Returns ParseBondOrderError if the input string does not
match any recognized bond order format.
Source§impl Ord for BondOrder
impl Ord for BondOrder
Source§impl PartialOrd for BondOrder
impl PartialOrd for BondOrder
impl Copy for BondOrder
impl Eq for BondOrder
impl StructuralPartialEq for BondOrder
Auto Trait Implementations§
impl Freeze for BondOrder
impl RefUnwindSafe for BondOrder
impl Send for BondOrder
impl Sync for BondOrder
impl Unpin for BondOrder
impl UnsafeUnpin for BondOrder
impl UnwindSafe for BondOrder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.