xnn.common.models.dispersion#
Shared machinery of the dispersion add-ons (DFT-D3, DFT-D4).
The two Grimme dispersion models share most of their structure: a real-space
cutoff with an optional quintic switching window, Gaussian coordination-number
weights over tabulated reference systems (D3 paper eq 16, D4 paper eq 8), an
Axilrod-Teller-Muto three-body term with zero damping over the atom triples
of a neighbor list (D3 paper eqs 11-14, D4 paper eqs 22-27), and the same way
of attaching themselves to a short-range model. Those pieces live here, once;
d3 and d4 hold what is
specific to each model (the coordination-number counting function, the
reference data, the damping functions, D4’s charge scaling and EEQ charges).
DispersionCorrection is the model-agnostic wrapper both add-ons
derive from: standalone it is the dispersion energy, given a short-range
model it adds the dispersion energy to that model’s prediction while
handing the model only the edges within its own cutoff. The deploy channels
(torchscript, lammps)
peel the wrapper off through the same interface.
Functions
|
Run a dispersion term's |
|
Normalized Gaussian weights of the reference systems in the coordination number. |
|
Pick the recognized keyword arguments out of a config |
|
Quintic switching window: 1 below |
|
Per-atom Axilrod-Teller-Muto three-body energy with zero damping. |
Classes
|
A dispersion term as an xnn potential, standalone or wrapped around a model. |