pub struct Atom {
pub properties: PropertyStore,
/* private fields */
}
Expand description
Atom is the smallest particle still characterizing a chemical element.
Reference
https://goldbook.iupac.org/html/A/A00493.html
Fields§
§properties: PropertyStore
Arbitrary property stored in key-value pair. Key is a string type, but it is the responsibility of the user to correctly interpret the value.
Implementations§
source§impl Atom
impl Atom
sourcepub fn new<S, P>(s: S, p: P) -> Atomwhere
S: Into<AtomKind>,
P: Into<Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>>,
pub fn new<S, P>(s: S, p: P) -> Atomwhere S: Into<AtomKind>, P: Into<Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>>,
Construct Atom
from element symbol and Cartesian coordinates.
sourcepub fn set_position<P>(&mut self, p: P)where
P: Into<Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>>,
pub fn set_position<P>(&mut self, p: P)where P: Into<Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>>,
Set atom position in 3D Cartesian coordinates
sourcepub fn label(&self) -> &str
👎Deprecated: use get_label instead
pub fn label(&self) -> &str
Return the user defined atom label, if not return the elment symbol.
sourcepub fn set_symbol<S>(&mut self, symbol: S)where
S: Into<AtomKind>,
pub fn set_symbol<S>(&mut self, symbol: S)where S: Into<AtomKind>,
Set atom symbol.
sourcepub fn set_partial_charge(&mut self, c: f64)
pub fn set_partial_charge(&mut self, c: f64)
Assign atom partial charge, usually for molecular mechanical calculations.
sourcepub fn is_element(&self) -> bool
pub fn is_element(&self) -> bool
Return true if atom is an element.
sourcepub fn set_freezing(&mut self, freezing: [bool; 3])
pub fn set_freezing(&mut self, freezing: [bool; 3])
Set freezing mask array for Cartesian coordinates
sourcepub fn update_position<P>(&mut self, p: P)where
P: Into<Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>>,
pub fn update_position<P>(&mut self, p: P)where P: Into<Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>>,
Update Cartesian coordinates partially, without changing its freezing coordinate components (xyz).
source§impl Atom
impl Atom
Core data for Atom
sourcepub fn get_cov_radius(&self) -> Option<f64>
pub fn get_cov_radius(&self) -> Option<f64>
Access covalent radius of atom. Return None if no data available or atom is dummy.
sourcepub fn get_vdw_radius(&self) -> Option<f64>
pub fn get_vdw_radius(&self) -> Option<f64>
Access Van der Waals radius of atom. Return None if no data available
sourcepub fn get_bonding_radius(&self) -> Option<f64>
pub fn get_bonding_radius(&self) -> Option<f64>
Return bonding radius of this element if available
sourcepub fn cov_radius(&self) -> Option<f64>
👎Deprecated: use get_cov_radius instead
pub fn cov_radius(&self) -> Option<f64>
Access covalent radius of atom. Return None if no data available or atom is dummy.
sourcepub fn get_mass(&self) -> Option<f64>
pub fn get_mass(&self) -> Option<f64>
Get mass in atomic mass unit. Return None if atom is dummy.
sourcepub fn vdw_radius(&self) -> Option<f64>
👎Deprecated: Use get_vdw_radius instead
pub fn vdw_radius(&self) -> Option<f64>
Access Van der Waals radius of atom. Return None if no data available
Trait Implementations§
source§impl<'de> Deserialize<'de> for Atom
impl<'de> Deserialize<'de> for Atom
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Atom, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Atom, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
source§impl<S, P> From<(S, P)> for Atomwhere
S: Into<AtomKind>,
P: Into<Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>>,
impl<S, P> From<(S, P)> for Atomwhere S: Into<AtomKind>, P: Into<Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>>,
source§impl Serialize for Atom
impl Serialize for Atom
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Auto Trait Implementations§
impl RefUnwindSafe for Atom
impl Send for Atom
impl Sync for Atom
impl Unpin for Atom
impl UnwindSafe for Atom
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
source§impl<T> Configure for Twhere
T: Default + DeserializeOwned + Serialize,
impl<T> Configure for Twhere T: Default + DeserializeOwned + Serialize,
source§fn print_toml(&self)
fn print_toml(&self)
source§fn from_json(s: &str) -> Result<Self, Error>
fn from_json(s: &str) -> Result<Self, Error>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.