pub struct Quart<T> { /* private fields */ }Expand description
Quartic bond potential.
§Parameters
k2: Quadratic force constant (energy/length^2 units)k3: Cubic correction (energy/length^3 units)k4: Quartic correction (energy/length^4 units)r0: Equilibrium distance (length units)
Implementations§
Trait Implementations§
Source§impl<T: Vector> Potential2<T> for Quart<T>
impl<T: Vector> Potential2<T> for Quart<T>
Source§fn energy(&self, r_sq: T) -> T
fn energy(&self, r_sq: T) -> T
Computes the potential energy.
V(r) = k2*(r-r0)^2 + k3*(r-r0)^3 + k4*(r-r0)^4Source§fn force_factor(&self, r_sq: T) -> T
fn force_factor(&self, r_sq: T) -> T
Computes the force factor.
dV/dr = 2*k2*(r-r0) + 3*k3*(r-r0)^2 + 4*k4*(r-r0)^3
S = -(dV/dr)/rSource§fn energy_force(&self, r_sq: T) -> (T, T)
fn energy_force(&self, r_sq: T) -> (T, T)
Computes energy and force factor together (optimized).
Shares the computation of r, r_inv, dr, and dr_sq.
impl<T: Copy> Copy for Quart<T>
impl<T> StructuralPartialEq for Quart<T>
Auto Trait Implementations§
impl<T> Freeze for Quart<T>where
T: Freeze,
impl<T> RefUnwindSafe for Quart<T>where
T: RefUnwindSafe,
impl<T> Send for Quart<T>where
T: Send,
impl<T> Sync for Quart<T>where
T: Sync,
impl<T> Unpin for Quart<T>where
T: Unpin,
impl<T> UnwindSafe for Quart<T>where
T: UnwindSafe,
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