pub struct Atom { /* private fields */ }Expand description
A dynamic property bag representing an atom (or bead).
All data — including coordinates ("x", "y", "z"), element symbol,
mass, charge, etc. — is stored as key-value pairs.
Implementations§
Source§impl Atom
impl Atom
Sourcepub fn xyz(symbol: &str, x: f64, y: f64, z: f64) -> Atom
pub fn xyz(symbol: &str, x: f64, y: f64, z: f64) -> Atom
Convenience: create an atom with symbol + xyz.
Sourcepub fn get_mut(&mut self, key: &str) -> Option<&mut PropValue>
pub fn get_mut(&mut self, key: &str) -> Option<&mut PropValue>
Get a mutable reference to a property value.
Sourcepub fn contains_key(&self, key: &str) -> bool
pub fn contains_key(&self, key: &str) -> bool
Check whether a key exists.
Trait Implementations§
impl StructuralPartialEq for Atom
Auto Trait Implementations§
impl Freeze for Atom
impl RefUnwindSafe for Atom
impl Send for Atom
impl Sync for Atom
impl Unpin for Atom
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more