pub struct LammpsLJTable {
pub pairs: Vec<LammpsLJPair>,
pub global_cutoff: f64,
}Expand description
A table of LJ pair parameters for a simulation.
Fields§
§pairs: Vec<LammpsLJPair>All pair interactions.
global_cutoff: f64Global LJ cutoff (distance units).
Implementations§
Source§impl LammpsLJTable
impl LammpsLJTable
Sourcepub fn add_pair(&mut self, pair: LammpsLJPair)
pub fn add_pair(&mut self, pair: LammpsLJPair)
Add a pair interaction.
Sourcepub fn get(&self, type_i: u32, type_j: u32) -> Option<&LammpsLJPair>
pub fn get(&self, type_i: u32, type_j: u32) -> Option<&LammpsLJPair>
Look up parameters for types (i, j). Symmetric lookup.
Sourcepub fn to_lammps_input(&self) -> String
pub fn to_lammps_input(&self) -> String
Generate pair_style lj/cut + all pair_coeff lines.
Sourcepub fn apply_lorentz_berthelot_mixing(&mut self)
pub fn apply_lorentz_berthelot_mixing(&mut self)
Apply Lorentz-Berthelot mixing rules to fill in cross-interactions.
For types (i, j) where i != j, if no cross-term exists,
create one from the like-pairs using:
ε_ij = sqrt(ε_ii * ε_jj)σ_ij = (σ_ii + σ_jj) / 2
Trait Implementations§
Source§impl Clone for LammpsLJTable
impl Clone for LammpsLJTable
Source§fn clone(&self) -> LammpsLJTable
fn clone(&self) -> LammpsLJTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LammpsLJTable
impl Debug for LammpsLJTable
Source§impl Default for LammpsLJTable
impl Default for LammpsLJTable
Source§fn default() -> LammpsLJTable
fn default() -> LammpsLJTable
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LammpsLJTable
impl RefUnwindSafe for LammpsLJTable
impl Send for LammpsLJTable
impl Sync for LammpsLJTable
impl Unpin for LammpsLJTable
impl UnsafeUnpin for LammpsLJTable
impl UnwindSafe for LammpsLJTable
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.