Skip to content

E7: DFT-D4 Dispersion Correction

Module: sci_form::experimental::d4Feature flag: experimental-d4


Overview

Implements the DFT-D4 dispersion correction with geometry-dependent C6/C8 coefficients and Becke-Johnson (BJ) damping. Augments EHT, UFF, and MMFF94 with quantum-precision van der Waals interactions. Includes optional three-body Axilrod-Teller-Muto (ATM) terms.


Theory

Dynamic C6 Coefficients

Unlike fixed-parameter methods (D3), D4 uses coordination-number-dependent dispersion coefficients:

C6AB=a,bWaWbC6AB,refab

where weights Wa are Gaussian functions of the D4 coordination number deviation from reference values.

D4 Coordination Number

CNiD4=ji11+exp(16(rcov,ijrij1))

Two-Body Dispersion

Edisp(2)=A<B[s6C6ABr6fdamp(6)+s8C8ABr8fdamp(8)]

with Becke-Johnson damping:

fdamp(n)(r)=rnrn+(a1C8/C6+a2)n

Three-Body ATM Term

Edisp(3)=s9A<B<CC9ABC3cosθAcosθBcosθC+1(rABrBCrCA)3

API

rust
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

ParameterValueDescription
s61.0C6 scaling
s80.95C8 scaling
a10.45BJ damping parameter
a24.0BJ damping radius (Bohr)
s91.0Three-body scaling
three_bodyfalseEnable 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

bash
cargo test --features experimental-d4 --test regression -- test_d4

8 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.

Released under the MIT License.