Struct chemrust_core::data::atom::AtomCollections
source · pub struct AtomCollections { /* private fields */ }Expand description
Struct of Array style, memory allocation is continuous when modifying the same attribute for all atoms.
Implementations§
source§impl AtomCollections
impl AtomCollections
pub fn new(size: usize) -> Self
pub fn symbols(&self) -> &[String]
pub fn atomic_numbers(&self) -> &[u8] ⓘ
pub fn cartesian_coords(&self) -> &[Point3<f64>]
pub fn indexes(&self) -> &[usize]
sourcepub fn get_atom_at(&self, index: usize) -> Option<Atom>
pub fn get_atom_at(&self, index: usize) -> Option<Atom>
Retrieve an Atom at given 0th-based index.
pub fn size(&self) -> usize
Trait Implementations§
source§impl Clone for AtomCollections
impl Clone for AtomCollections
source§fn clone(&self) -> AtomCollections
fn clone(&self) -> AtomCollections
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for AtomCollections
impl Debug for AtomCollections
source§impl From<&[Atom]> for AtomCollections
impl From<&[Atom]> for AtomCollections
Conversion from &[Atom] to AtomCollections
source§impl From<AtomCollections> for Vec<Atom>
impl From<AtomCollections> for Vec<Atom>
Conversion from AtomCollections to Vec<Atom>
source§fn from(value: AtomCollections) -> Self
fn from(value: AtomCollections) -> Self
Converts to this type from the input type.
source§impl PartialEq for AtomCollections
impl PartialEq for AtomCollections
source§fn eq(&self, other: &AtomCollections) -> bool
fn eq(&self, other: &AtomCollections) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for AtomCollections
impl PartialOrd for AtomCollections
source§fn partial_cmp(&self, other: &AtomCollections) -> Option<Ordering>
fn partial_cmp(&self, other: &AtomCollections) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl StructuralPartialEq for AtomCollections
Auto Trait Implementations§
impl Freeze for AtomCollections
impl RefUnwindSafe for AtomCollections
impl Send for AtomCollections
impl Sync for AtomCollections
impl Unpin for AtomCollections
impl UnwindSafe for AtomCollections
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<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.