pub struct LammpsDataWriter;Expand description
Writer for the LAMMPS data-file format (used with read_data).
Implementations§
Source§impl LammpsDataWriter
impl LammpsDataWriter
Sourcepub fn write_header(
n_atoms: usize,
n_bonds: usize,
box_lo: [f64; 3],
box_hi: [f64; 3],
) -> String
pub fn write_header( n_atoms: usize, n_bonds: usize, box_lo: [f64; 3], box_hi: [f64; 3], ) -> String
Generate the header section of a LAMMPS data file.
box_lo / box_hi are the lower/upper corners of the simulation box.
Sourcepub fn write_atoms_atomic(
positions: &[[f64; 3]],
masses: &[f64],
types: &[u32],
) -> String
pub fn write_atoms_atomic( positions: &[[f64; 3]], masses: &[f64], types: &[u32], ) -> String
Generate the Atoms section for atom_style atomic.
types is 1-indexed atom type per atom.
Sourcepub fn write_atoms_charge(
positions: &[[f64; 3]],
masses: &[f64],
charges: &[f64],
types: &[u32],
) -> String
pub fn write_atoms_charge( positions: &[[f64; 3]], masses: &[f64], charges: &[f64], types: &[u32], ) -> String
Generate the Atoms section for atom_style charge.
Auto Trait Implementations§
impl Freeze for LammpsDataWriter
impl RefUnwindSafe for LammpsDataWriter
impl Send for LammpsDataWriter
impl Sync for LammpsDataWriter
impl Unpin for LammpsDataWriter
impl UnsafeUnpin for LammpsDataWriter
impl UnwindSafe for LammpsDataWriter
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.