xnn.common.models.d3.D3Dispersion#

class xnn.common.models.d3.D3Dispersion(model=None, **d3_options)[source]#

Bases: DispersionCorrection

DFT-D3 dispersion as an xnn potential, standalone or wrapped around a model.

See DispersionCorrection for the wrapper semantics and DFTD3 for the options. Enable from a config with model.extra["dispersion"] = {"name": "d3", ...} or wrap directly:

model = D3Dispersion(build_model(cfg.model), damping="bj", s9=1.0,
                     cutoff_pair=12.0, switch_width_pair=2.0)
Parameters:
  • model (InteratomicPotential or None, optional) – The short-range model to correct; None for pure dispersion.

  • **d3_options – Keyword arguments of DFTD3.

Variables:

d3 (DFTD3) – The dispersion evaluator (alias of term).

property d3: DFTD3#

The DFTD3 evaluator.

classmethod from_config(cfg)[source]#

Build a standalone D3 model; DFTD3 options come from cfg.extra.

cfg.cutoff is ignored: the neighbor-list radius follows from the D3 cutoffs. To correct another model with D3 put the same keys (plus name: d3) under that model’s extra["dispersion"].

Return type:

D3Dispersion