pub struct Buckingham;Expand description
Buckingham (Exponential-6) potential for Van der Waals interactions.
§Physics
Models short-range repulsion exponentially and long-range attraction with an $r^{-6}$ term, providing a more physically accurate repulsion wall than Lennard-Jones.
- Formula: $$ E = D_0 \left[ \frac{6}{\zeta-6} \exp\left(\zeta(1 - \frac{r}{R_0})\right) - \frac{\zeta}{\zeta-6} \left(\frac{R_0}{r}\right)^6 \right] $$
- Derivative Factor (
diff): $$ D = -\frac{1}{r} \frac{dE}{dr} = \frac{6\zeta D_0}{r(\zeta-6)R_0} \left[ \exp\left(\zeta(1 - \frac{r}{R_0})\right) - \left(\frac{R_0}{r}\right)^7 \right] $$
§Parameters
For computational efficiency, the physical parameters ($D_0, R_0, \zeta$) are pre-computed into the standard Buckingham form ($A, B, C$):
a: The repulsion pre-factor $A = \frac{6 D_0}{\zeta-6} e^{\zeta}$.b: The repulsion decay constant $B = \zeta / R_0$.c: The attraction pre-factor $C = \frac{\zeta D_0 R_0^6}{\zeta-6}$.r_max_sq: The squared distance of the local energy maximum $r_{\text{max}}^2$.two_e_max: Twice the energy at the local maximum, $2 E(r_{\text{max}})$.
§Inputs
r_sq: Squared distance $r^2$ between two atoms.
§Implementation Notes
- The kernel operates on the computationally efficient $A, B, C$ form.
- For $r < r_{\text{max}}$, the energy is reflected about the local maximum: $E_{\text{ref}}(r) = 2 E_{\text{max}} - E(r)$. This produces a repulsive wall that diverges to $+\infty$ as $r \to 0$ via the $C/r^6$ attraction term, while maintaining $C^1$ continuity at $r_{\text{max}}$ (where $E’(r_{\text{max}}) = 0$).
- A branchless sign-flip replaces the traditional constant penalty, providing physically correct short-range behavior at zero additional runtime cost.
- Requires one
sqrtand oneexpcall, making it computationally more demanding than LJ. - Power chain
inv_r2 -> inv_r6 -> inv_r8is used for the attractive term.
Trait Implementations§
Source§impl Clone for Buckingham
impl Clone for Buckingham
Source§fn clone(&self) -> Buckingham
fn clone(&self) -> Buckingham
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Buckingham
impl Debug for Buckingham
Source§impl Default for Buckingham
impl Default for Buckingham
Source§fn default() -> Buckingham
fn default() -> Buckingham
Source§impl<T: Real> PairKernel<T> for Buckingham
impl<T: Real> PairKernel<T> for Buckingham
Source§fn energy(r_sq: T, (a, b, c, r_max_sq, two_e_max): Self::Params) -> T
fn energy(r_sq: T, (a, b, c, r_max_sq, two_e_max): Self::Params) -> T
Computes only the potential energy.
§Formula
$$ E(r) = \begin{cases} A e^{-Br} - C/r^6 & r \ge r_{\text{max}} \ 2 E_{\text{max}} - (A e^{-Br} - C/r^6) & r < r_{\text{max}} \end{cases} $$
Source§fn diff(r_sq: T, (a, b, c, r_max_sq, _two_e_max): Self::Params) -> T
fn diff(r_sq: T, (a, b, c, r_max_sq, _two_e_max): Self::Params) -> T
Computes only the force pre-factor $D$.
§Formula
$$ D(r) = \text{sign}(r) \left( \frac{A B e^{-Br}}{r} - \frac{6C}{r^8} \right) $$
where $\text{sign}(r) = +1$ for $r \ge r_{\text{max}}$ and $-1$ otherwise. At the maximum, $D(r_{\text{max}}) = 0$ from both sides, ensuring $C^1$ continuity.
This factor is defined such that the force vector can be computed by a single vector multiplication: $\vec{F} = -D \cdot \vec{r}$.
Source§fn compute(
r_sq: T,
(a, b, c, r_max_sq, two_e_max): Self::Params,
) -> EnergyDiff<T>
fn compute( r_sq: T, (a, b, c, r_max_sq, two_e_max): Self::Params, ) -> EnergyDiff<T>
Computes both energy and force pre-factor efficiently.
This method reuses intermediate calculations to minimize operations.