pub struct Opls<T> { /* private fields */ }Expand description
Implementations§
Trait Implementations§
Source§impl<T: Vector> Potential4<T> for Opls<T>
impl<T: Vector> Potential4<T> for Opls<T>
Source§fn energy(&self, cos_phi: T, _sin_phi: T) -> T
fn energy(&self, cos_phi: T, _sin_phi: T) -> T
Computes the potential energy.
V = offset + c1*cos(phi) - c2*cos(2phi) + c3*cos(3phi) - c4*cos(4phi)Uses Chebyshev polynomials for cos(n*phi):
- cos(2phi) = 2*cos^2(phi) - 1
- cos(3phi) = 4cos^3(phi) - 3cos(phi)
- cos(4phi) = 8cos^4(phi) - 8cos^2(phi) + 1
Source§fn derivative(&self, cos_phi: T, sin_phi: T) -> T
fn derivative(&self, cos_phi: T, sin_phi: T) -> T
Computes dV/d(phi).
dV/dphi = -c1*sin(phi) + 2*c2*sin(2phi) - 3*c3*sin(3phi) + 4*c4*sin(4phi)Source§fn energy_derivative(&self, cos_phi: T, sin_phi: T) -> (T, T)
fn energy_derivative(&self, cos_phi: T, sin_phi: T) -> (T, T)
Computes energy and derivative together (optimized).
Shares the computation of cos^n and sin(n*phi) terms.
impl<T: Copy> Copy for Opls<T>
impl<T> StructuralPartialEq for Opls<T>
Auto Trait Implementations§
impl<T> Freeze for Opls<T>where
T: Freeze,
impl<T> RefUnwindSafe for Opls<T>where
T: RefUnwindSafe,
impl<T> Send for Opls<T>where
T: Send,
impl<T> Sync for Opls<T>where
T: Sync,
impl<T> Unpin for Opls<T>where
T: Unpin,
impl<T> UnwindSafe for Opls<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