pub struct Cos<T> { /* private fields */ }Expand description
Harmonic cosine angle potential.
§Parameters
k: Force constant (energy units)cos0: Equilibrium angle cosine
Implementations§
Trait Implementations§
impl<T: Copy> Copy for Cos<T>
Source§impl<T: Vector> Potential3<T> for Cos<T>
impl<T: Vector> Potential3<T> for Cos<T>
Source§fn energy(&self, _r_ij_sq: T, _r_jk_sq: T, cos_theta: T) -> T
fn energy(&self, _r_ij_sq: T, _r_jk_sq: T, cos_theta: T) -> T
Computes the potential energy.
V = k * (cos(theta) - cos0)^2No acos required!
Source§fn derivative(&self, _r_ij_sq: T, _r_jk_sq: T, cos_theta: T) -> T
fn derivative(&self, _r_ij_sq: T, _r_jk_sq: T, cos_theta: T) -> T
Computes dV/d(cos_theta).
dV/d(cos_theta) = 2 * k * (cos_theta - cos0)Source§fn energy_derivative(&self, _r_ij_sq: T, _r_jk_sq: T, cos_theta: T) -> (T, T)
fn energy_derivative(&self, _r_ij_sq: T, _r_jk_sq: T, cos_theta: T) -> (T, T)
Computes energy and derivative together (optimized).
Shares the computation of delta.
impl<T: PartialEq> StructuralPartialEq for Cos<T>
Auto Trait Implementations§
impl<T> Freeze for Cos<T>where
T: Freeze,
impl<T> RefUnwindSafe for Cos<T>where
T: RefUnwindSafe,
impl<T> Send for Cos<T>where
T: Send,
impl<T> Sync for Cos<T>where
T: Sync,
impl<T> Unpin for Cos<T>where
T: Unpin,
impl<T> UnsafeUnpin for Cos<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Cos<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