Dispersion energy

Dispersion energy#

This module provides the dispersion energy evaluation for the pairwise interactions. It contains the main entrypoint for the dispersion energy (dftd4()).

tad_dftd4.disp.dftd4(numbers, positions, charge, param, *, model='d4', rcov=None, r4r2=None, rvdw=None, q=None, cutoff=None, cn_function=<function cn_d4>, counting_function=<function erf_count>, damping_function=<tad_dftd4.damping.functions.RationalDamping object>)[source]#

Evaluate DFT-D4 dispersion energy for a (batch of) molecule(s).

Parameters:
  • numbers (Tensor) – Atomic numbers for all atoms in the system of shape (..., nat).

  • positions (Tensor) – Cartesian coordinates of all atoms (shape: (..., nat, 3)).

  • charge (Tensor) – Total charge of the system.

  • param (Param) – DFT-D4 damping parameters.

  • model (D4Model | D4SModel | None, optional) – The DFT-D4 dispersion model for the evaluation of the C6 coefficients. Defaults to None, which creates tad_dftd4.model.d4.D4Model.

  • rcov (Tensor | None, optional) – Covalent radii of the atoms in the system. Defaults to None, i.e., default values are used.

  • r4r2 (Tensor | None, optional) – r⁴ over r² expectation values of the atoms in the system. Defaults to None, i.e., default values are used.

  • rvdw (Tensor | None, optional) – Pairwise van der Waals radii of the atoms in the system. Defaults to None, i.e., default values are used.

  • q (Tensor | None, optional) – Atomic partial charges. Defaults to None, i.e., EEQ charges are calculated using the total charge.

  • cutoff (Cutoff | None, optional) – Collection of real-space cutoffs. Defaults to None, i.e., tad_dftd4.cutoff.Cutoff is initialized with its defaults.

  • cn_function (CNFunction, optional) – Function to calculate the coordination number. Defaults to tad_mctc.ncoord.d4.cn_d4(), which uses the tad_mctc.ncoord.count.erf_count() counting function.

  • counting_function (CountingFunction, optional) – Counting function used for the DFT-D4 coordination number. Defaults to the error function counting function tad_mctc.ncoord.count.erf_count().

  • damping_function (DampingFunction, optional) – Damping function to evaluate distance dependent contributions. Defaults to the Becke-Johnson rational damping function tad_dftd4.damping.functions.RationalDamping.

Returns:

Atom-resolved DFT-D4 dispersion energy.

Return type:

Tensor

Raises:

ValueError – Shape inconsistencies between numbers, positions, r4r2, or, rcov.

Parameters:
tad_dftd4.disp.get_properties(numbers, positions, charge=None, cutoff=None)[source]#

Wrapper to evaluate properties related to this dispersion model.

Parameters:
  • numbers (Tensor) – Atomic numbers for all atoms in the system of shape (..., nat).

  • positions (Tensor) – Cartesian coordinates of all atoms (shape: (..., nat, 3)).

  • charge (Tensor | None) – Total charge of the system. Defaults to None, i.e., 0.

  • cutoff (Cutoff | None) – Real-space cutoff. Defaults to None, i.e., the defaults for all cutoffs are used.

Returns:

Properties related to the dispersion model: - DFT-D4 coordination number - Atomic partial charges - Atom-resolved C6 dispersion coefficients - Static polarizabilities

Return type:

(Tensor, Tensor, Tensor, Tensor)

Parameters: