Struct feroxide::Atom
[−]
[src]
pub struct Atom { pub number: AtomNumber, pub group: AtomGroup, pub symbol: &'static str, pub name: &'static str, pub mass: AtomMass, pub diatomic: bool, }
An atom
Fields
number: AtomNumber
Atom Number (Hydrogen: 1)
group: AtomGroup
Atom Group (Hydrogen: 1)
symbol: &'static str
Atom symbol (Hydrogen: H)
name: &'static str
Atom name (Hydrogen: hydrogen)
mass: AtomMass
Atom mass (Hydrogen: 1.008)
diatomic: bool
Methods
impl Atom
[src]
fn from_string(symbol: String) -> Option<Atom>
[src]
Convert a string representation to an Atom
fn charge_by_group(&self) -> Option<AtomCharge>
[src]
Get the charge an atom has based on its group
Trait Implementations
impl Debug for Atom
[src]
impl Clone for Atom
[src]
fn clone(&self) -> Atom
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Atom
[src]
impl PartialEq for Atom
[src]
fn eq(&self, rhs: &Atom) -> bool
[src]
Two Atom
s are equal when their atom numbers are equal
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Hash for Atom
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Properties for Atom
[src]
fn symbol(&self) -> String
[src]
Get the symbol of the current item
fn name(&self) -> String
[src]
Get the name of the current item
fn mass(&self) -> AtomMass
[src]
Get the mass of the current item
fn stringify(&self) -> String
[src]
Stringify the current item (default: self.symbol())