pub struct LammpsBox {
pub lo: [f64; 3],
pub hi: [f64; 3],
pub tilt: [f64; 3],
}Expand description
Simulation box geometry for a LAMMPS run.
Fields§
§lo: [f64; 3]Low corner [xlo, ylo, zlo].
hi: [f64; 3]High corner [xhi, yhi, zhi].
tilt: [f64; 3]Tilt factors [xy, xz, yz] for triclinic cells (0 for orthogonal).
Implementations§
Source§impl LammpsBox
impl LammpsBox
Sourcepub fn orthogonal(lo: [f64; 3], hi: [f64; 3]) -> Self
pub fn orthogonal(lo: [f64; 3], hi: [f64; 3]) -> Self
Create an orthogonal box with given extents.
Sourcepub fn number_density(&self, n_atoms: usize) -> f64
pub fn number_density(&self, n_atoms: usize) -> f64
Number density given an atom count.
Sourcepub fn to_region_command(&self, region_id: &str) -> String
pub fn to_region_command(&self, region_id: &str) -> String
Generate LAMMPS region command for a box region.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LammpsBox
impl RefUnwindSafe for LammpsBox
impl Send for LammpsBox
impl Sync for LammpsBox
impl Unpin for LammpsBox
impl UnsafeUnpin for LammpsBox
impl UnwindSafe for LammpsBox
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.