pub struct LennardJones { /* private fields */ }Expand description
Lennard-Jones 12-6 potential U = 4ε[(σ/r)¹² − (σ/r)⁶].
Implementations§
Source§impl LennardJones
impl LennardJones
Sourcepub fn new(epsilon: Fix128, sigma: Fix128) -> Result<Self, PairPotentialError>
pub fn new(epsilon: Fix128, sigma: Fix128) -> Result<Self, PairPotentialError>
Well depth ε ≥ 0 and zero-crossing distance σ > 0.
§Errors
PairPotentialError::NonPositiveSigma,
PairPotentialError::NegativeEpsilon.
Trait Implementations§
Source§impl Clone for LennardJones
impl Clone for LennardJones
impl Copy for LennardJones
Source§impl Debug for LennardJones
impl Debug for LennardJones
impl Eq for LennardJones
Source§impl PairPotential for LennardJones
impl PairPotential for LennardJones
Source§fn energy(&self, r: Fix128) -> Result<Fix128, PairPotentialError>
fn energy(&self, r: Fix128) -> Result<Fix128, PairPotentialError>
Potential energy
U(r) at distance r > 0.Source§fn force(&self, r: Fix128) -> Result<Fix128, PairPotentialError>
fn force(&self, r: Fix128) -> Result<Fix128, PairPotentialError>
Radial force
F(r) = −dU/dr at r > 0 (positive = repulsive).Source§fn force_on_first(&self, d: Vec3Fix) -> Result<Vec3Fix, PairPotentialError>
fn force_on_first(&self, d: Vec3Fix) -> Result<Vec3Fix, PairPotentialError>
Force on the first particle of a pair separated by
d = x_i − x_j:
F(|d|) d / |d|. The second particle receives the negative.Source§impl PartialEq for LennardJones
impl PartialEq for LennardJones
impl StructuralPartialEq for LennardJones
Auto Trait Implementations§
impl Freeze for LennardJones
impl RefUnwindSafe for LennardJones
impl Send for LennardJones
impl Sync for LennardJones
impl Unpin for LennardJones
impl UnsafeUnpin for LennardJones
impl UnwindSafe for LennardJones
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more