E7: DFT-D4 Dispersion Correction
Module: sci_form::experimental::d4Feature flag: experimental-d4
Overview
Implements the DFT-D4 dispersion correction with geometry-dependent
Theory
Dynamic Coefficients
Unlike fixed-parameter methods (D3), D4 uses coordination-number-dependent dispersion coefficients:
where weights
D4 Coordination Number
Two-Body Dispersion
with Becke-Johnson damping:
Three-Body ATM Term
API
use sci_form::experimental::d4::*;
// D4 coordination numbers
let cn = d4_coordination_number(&elements, &positions);
// Reference C6 coefficients
let c6 = get_c6_reference(6, 8); // C-O pair
// Full D4 energy
let config = D4Config {
s6: 1.0, s8: 0.95,
a1: 0.45, a2: 4.0,
three_body: false,
..Default::default()
};
let result = compute_d4_energy(&elements, &positions, &config);
// result.two_body_energy: f64 (Hartree)
// result.three_body_energy: f64
// result.total_energy: f64
// Numerical gradient
let gradient = compute_d4_gradient(&elements, &positions, &config);Default Parameters
| Parameter | Value | Description |
|---|---|---|
s6 | 1.0 | |
s8 | 0.95 | |
a1 | 0.45 | BJ damping parameter |
a2 | 4.0 | BJ damping radius (Bohr) |
s9 | 1.0 | Three-body scaling |
three_body | false | Enable ATM three-body term |
Element Coverage
H, B, C, N, O, F, Si, P, S, Cl, Br, I plus xTB transition metals: Ti, Cr, Mn, Fe, Co, Ni, Cu, Zn, Ru, Pd, Ag, Pt, Au.
Tests
cargo test --features experimental-d4 --test regression -- test_d48 integration tests covering: coordination numbers, C6 reference values, C6 symmetry, BJ damping behavior, two-body energy negativity, three-body terms, gradient accuracy, and multi-element systems.