Releases: caltechmsc/dreid-kernel
Releases · caltechmsc/dreid-kernel
v0.4.1
🩹 Fixes
-
Unified Force Constant Nomenclature
- Renamed angle/inversion parameters from
k→cto reflect that these are stiffness coefficients in cosine-space, not traditional spring constants. -
Rationale: Physical clarity.
$K$ denotes force constants for geometric coordinates ($K(R-R_0)^2$ ,$K(\theta-\theta_0)^2$ ), while$C$ denotes coefficients for transformed spaces ($C(\cos\theta - \cos\theta_0)^2$ ). The effective restoring force for$C$ -type potentials is geometry-dependent ($C\sin^2\theta$ ), fundamentally different from linear springs.
- Renamed angle/inversion parameters from
Contributors
- @TKanX Lead Developer
Full Changelog: v0.4.0...v0.4.1
v0.4.0
🚀 Features
-
New Parameter Pre-computation Methods
-
Convenience Layer: New
precompute()methods convert physical constants (force fields, equilibrium geometries) into optimized kernel parameters. -
9 Kernels Enhanced:
-
Harmonic:$(K, R_0) \to (K/2, R_0)$ -
CosineHarmonic:$(C, \theta_0°) \to (C/2, \cos_0)$ -
ThetaHarmonic:$(K, \theta_0°) \to (K/2, \theta_{0,rad})$ -
Torsion:$(V, n, \phi_0°) \to (V/2, n, \cos_{n\phi_0}, \sin_{n\phi_0})$ -
PlanarInversion:$C \to C/2$ -
UmbrellaInversion:$(C, \psi_0°) \to (C/2, \cos_{\psi,0})$ -
LennardJones:$(D_0, R_0) \to (D_0, R_0^2)$ -
Buckingham:$(D_0, R_0, \zeta) \to (A, B, C, r_{max}^2, 2E_{max})$ -
HydrogenBond:$(D_{hb}, R_{hb}) \to (D_{hb}, R_{hb}^2)$
-
-
Verified: 18 new unit tests (
precompute_values+precompute_round_trip) ensure correctness.
-
Convenience Layer: New
Contributors
- @TKanX Lead Developer
Full Changelog: v0.3.0...v0.4.0
v0.3.0
🚀 Features
-
Enhanced Buckingham Potential with Energy Reflection
- Upgraded from constant penalty to energy reflection at the local maximum (
$r = r_{\text{max}}$ ) to handle short-range divergence. - Parameters expanded from 4-tuple to 5-tuple:
(A, B, C, r_max², 2E_max). - C¹ continuous: Force is continuous and equals zero at the boundary from both sides.
-
Correct physics: Energy diverges to
$+\infty$ as$r \to 0$ (Pauli repulsion). - Branchless implementation: Uses arithmetic masking for SIMD-friendly vectorization.
- Upgraded from constant penalty to energy reflection at the local maximum (
🛠️ Improvements
- Removed SplinedBuckingham Potential
- Eliminated the C² continuous rational function variant.
- Rationale: 99% of MD simulations use Velocity Verlet integrators, which only require C¹ continuity (force continuity). C² is unnecessary for standard practice.
Contributors
- @TKanX Lead Developer
Full Changelog: v0.2.0...v0.3.0
v0.2.0
🚀 Features
- New
CosineLinearAngle Bending Kernel- Linear Geometry Support: Implements Eq. 10' from Mayo et al. (1990) — E = K(1 + cosθ) — for atoms with θ₀ = 180° equilibrium.
- Correct Curvature: Replaces
CosineHarmonicat the linear limit where it degenerates into a quartic well (∝ (π−θ)^4), restoring the physically correct quadratic restoring force (∝ (π−θ)^2). - Fastest Kernel: Constant derivative (Γ = K) yields ~1.5 Billion ops/sec — single multiply-add for energy, zero arithmetic for force.
- Verified: Unit + integration tests included (gold-standard values at 0°, 90°, 120°, 180°).
Contributors
- @TKanX Lead Developer
Full Changelog: v0.1.0...v0.2.0
v0.1.0
🚀 Features
-
Complete DREIDING Force Field Kernel Library
- 5 Non-Bonded Potentials: Lennard-Jones 12-6, Buckingham Exp-6, Splined Buckingham (C² continuous), Coulomb, Hydrogen Bond 12-10
- 2 Bond Stretch Potentials: Harmonic, Morse (anharmonic with dissociation)
- 2 Angle Bending Potentials: Cosine Harmonic, Theta Harmonic
- 1 Torsion Potential: Periodic Cosine with optimized multi-angle formulas (n=1,2,3 closed-form, Chebyshev for n≥4)
- 2 Inversion Potentials: Planar (sp² centers), Umbrella (sp³ centers)
-
High-Performance Architecture
- Zero Heap Allocation: All computations on the stack—suitable for tight MD loops and embedded systems.
- Branchless Kernels: Mask-based conditionals for SIMD-friendly vectorization.
- Optimized Algorithms: Precomputed coefficients, shared subexpressions, Horner's method, Chebyshev recursion.
- ~1.4 Billion ops/sec: Cosine Harmonic throughput; ~840M/sec for Lennard-Jones on Intel i7-13620H.
-
Mathematically Rigorous
- Analytically Verified: All force kernels are exact negative gradients of energy functions.
- 187 Tests: Stability checks, finite-difference validation (10⁻⁴ tolerance), and physics regression tests for every potential.
- DREIDING Compliant: Implements exact functional forms from Mayo et al. (1990).
-
Geometry-Agnostic Design
- Stateless Kernels: Pure functions with no object lifecycle—you provide state, we return scalars.
- Unified Force Interface: All kernels output diff factors for
F += -Factor * GeometricVectorpattern. - Separation of Concerns: Kernel layer computes derivatives; geometry layer applies coordinates.
-
Portability & Usability
#![no_std]Support: Fully compatible with embedded devices, OS kernels, and WASM (vialibmfeature).- Generic Precision: Unified API for both
f32andf64via theRealtrait. - Comprehensive Documentation: KaTeX-rendered LaTeX formulas in RustDoc for every potential.
New Contributors
- @TKanX Lead Developer
Full Changelog: https://github.com/caltechmsc/dreid-kernel/commits/v0.1.0