Struct gchemol_core::Atom
source · 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: Into<AtomKind>, P: Into<Vector3f>>(s: S, p: P) -> Self
pub fn new<S: Into<AtomKind>, P: Into<Vector3f>>(s: S, p: P) -> Self
Construct Atom
from element symbol and Cartesian coordinates.
sourcepub fn set_position<P: Into<Vector3f>>(&mut self, p: P)
pub fn set_position<P: Into<Vector3f>>(&mut self, p: P)
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: Into<AtomKind>>(&mut self, symbol: S)
pub fn set_symbol<S: Into<AtomKind>>(&mut self, symbol: S)
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: Into<Vector3f>>(&mut self, p: P)
pub fn update_position<P: Into<Vector3f>>(&mut self, p: P)
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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Atom
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 T
impl<T> Configure for T
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>
source§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>
self
from the equivalent element of its
superset. Read moresource§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).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.