pub struct HydrogenBond<const N: usize>;Expand description
DREIDING Hydrogen Bond potential (12-10).
§Physics
Models the explicit hydrogen bonding interaction (typically D-H…A) using a specific 12-10 Radial potential modulated by a $\cos^N\theta$ Angular term. Standard DREIDING uses $N=4$.
- Formula: $$ E = D_{hb} \left[ 5 \left(\frac{R_{hb}}{r}\right)^{12} - 6 \left(\frac{R_{hb}}{r}\right)^{10} \right] \cos^N \theta $$
- Derivative Factor (Radial): $$ D_{rad} = - \frac{1}{r} \frac{\partial E}{\partial r} = \frac{60 D_{hb}}{r^2} \left[ \left(\frac{R_{hb}}{r}\right)^{12} - \left(\frac{R_{hb}}{r}\right)^{10} \right] \cos^N \theta $$
- Derivative Factor (Angular): $$ D_{ang} = \frac{\partial E}{\partial (\cos\theta)} = N \cdot E_{rad} \cos^{N-1} \theta $$
§Parameters
d_hb: The energy well depth $D_{hb}$.r_hb_sq: The squared equilibrium distance $R_{hb}^2$.N: The cosine power exponent (const generic).
§Inputs
r_sq: Squared distance $r^2$ between Donor (D) and Acceptor (A).cos_theta: Cosine of the angle $\theta_{DHA}$ (at Hydrogen).
§Implementation Notes
- Cutoff: If $\cos\theta \le 0$, energy and forces represent 0.
- Optimization: Uses $s = (R_{hb}/r)^2$ recurrence to compute $r^{-10}$ and $r^{-12}$ efficiently.
- Generics: Uses
const N: usizeto unroll power calculations at compile time.
Trait Implementations§
Source§impl<const N: usize> Clone for HydrogenBond<N>
impl<const N: usize> Clone for HydrogenBond<N>
Source§fn clone(&self) -> HydrogenBond<N>
fn clone(&self) -> HydrogenBond<N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const N: usize> Debug for HydrogenBond<N>
impl<const N: usize> Debug for HydrogenBond<N>
Source§impl<const N: usize> Default for HydrogenBond<N>
impl<const N: usize> Default for HydrogenBond<N>
Source§fn default() -> HydrogenBond<N>
fn default() -> HydrogenBond<N>
Returns the “default value” for a type. Read more
Source§impl<T: Real, const N: usize> HybridKernel<T> for HydrogenBond<N>
impl<T: Real, const N: usize> HybridKernel<T> for HydrogenBond<N>
Source§fn energy(r_sq: T, cos_theta: T, (d_hb, r_hb_sq): Self::Params) -> T
fn energy(r_sq: T, cos_theta: T, (d_hb, r_hb_sq): Self::Params) -> T
Computes only the potential energy.
§Formula
$$ E = D_{hb} (5s^6 - 6s^5) \cos^N \theta, \quad \text{where } s = (R_{hb}/r)^2 $$
Source§fn diff(r_sq: T, cos_theta: T, (d_hb, r_hb_sq): Self::Params) -> (T, T)
fn diff(r_sq: T, cos_theta: T, (d_hb, r_hb_sq): Self::Params) -> (T, T)
Computes only the derivative factors.
§Formula
$$ D_{rad} = \frac{60 D_{hb}}{r^2} (s^6 - s^5) \cos^N \theta, \quad \text{where } s = (R_{hb}/r)^2 $$ $$ D_{ang} = N E_{rad} \cos^{N-1} \theta $$
force_factor_rad($D_{rad}$): Used to compute the central force along the D-A axis: $ \vec{F}_{rad} = -D_{rad} \cdot \vec{r}_{DA} $force_factor_ang($D_{ang}$): Used to compute torque-like forces on the D-H-A angle via the Wilson B-matrix gradient chain rule: $ \vec{F}_i = -D_{ang} \cdot \nabla_i (\cos\theta) $
Source§fn compute(
r_sq: T,
cos_theta: T,
(d_hb, r_hb_sq): Self::Params,
) -> HybridEnergyDiff<T>
fn compute( r_sq: T, cos_theta: T, (d_hb, r_hb_sq): Self::Params, ) -> HybridEnergyDiff<T>
Computes both energy and derivative factors efficiently.
This method reuses intermediate calculations to minimize operations.
impl<const N: usize> Copy for HydrogenBond<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for HydrogenBond<N>
impl<const N: usize> RefUnwindSafe for HydrogenBond<N>
impl<const N: usize> Send for HydrogenBond<N>
impl<const N: usize> Sync for HydrogenBond<N>
impl<const N: usize> Unpin for HydrogenBond<N>
impl<const N: usize> UnwindSafe for HydrogenBond<N>
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