pub struct Morse { /* private fields */ }Expand description
Morse potential U = D(1 − e^{−a(r − r_e)})² − D (minimum −D at r_e).
Implementations§
Source§impl Morse
impl Morse
Sourcepub fn new(
well_depth: Fix128,
width: Fix128,
equilibrium_distance: Fix128,
) -> Result<Self, PairPotentialError>
pub fn new( well_depth: Fix128, width: Fix128, equilibrium_distance: Fix128, ) -> Result<Self, PairPotentialError>
Well depth D ≥ 0, width parameter a > 0 (1/length) and
equilibrium distance r_e > 0.
§Errors
PairPotentialError::NegativeWellDepth,
PairPotentialError::NonPositiveWidth,
PairPotentialError::NonPositiveEquilibriumDistance.
Sourcepub fn harmonic_force_constant(&self) -> Fix128
pub fn harmonic_force_constant(&self) -> Fix128
Harmonic force constant at the minimum, 2 D a².
Trait Implementations§
impl Copy for Morse
impl Eq for Morse
Source§impl PairPotential for Morse
impl PairPotential for Morse
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.impl StructuralPartialEq for Morse
Auto Trait Implementations§
impl Freeze for Morse
impl RefUnwindSafe for Morse
impl Send for Morse
impl Sync for Morse
impl Unpin for Morse
impl UnsafeUnpin for Morse
impl UnwindSafe for Morse
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