damping_param Derived Type

type, public, abstract :: damping_param


Type-Bound Procedures

procedure(damping_kernel_interface), public, deferred :: get_damping_kernel

Pair kernel and its derivatives w.r.t. squared distance and C6 coefficient

  • pure subroutine damping_kernel_interface(self, izp, jzp, rvdw, r4r2, r2, c6, e, er, ec, err, erc, ecc) Prototype

    Pair dispersion kernel and its partial derivatives.

    Returns the pair energy contribution as a function of the squared distance and the C6 coefficient together with all first and second partial derivatives. The smooth cutoff and multiplicity are applied by the caller.

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    integer, intent(in) :: izp

    Species indices of the pair

    integer, intent(in) :: jzp

    Species indices of the pair

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for C8 extrapolation

    real(kind=wp), intent(in) :: r2

    Squared distance of the pair

    real(kind=wp), intent(in) :: c6

    C6 coefficient of the pair

    real(kind=wp), intent(out) :: e

    Pair energy and its derivatives

    real(kind=wp), intent(out) :: er

    Pair energy and its derivatives

    real(kind=wp), intent(out) :: ec

    Pair energy and its derivatives

    real(kind=wp), intent(out) :: err

    Pair energy and its derivatives

    real(kind=wp), intent(out) :: erc

    Pair energy and its derivatives

    real(kind=wp), intent(out) :: ecc

    Pair energy and its derivatives

generic, public :: get_dispersion2 => get_dispersion2_impl, get_dispersion2_compat

  • private subroutine get_dispersion2(self, mol, trans, cutoff, width, rvdw, r4r2, c6, dc6dcn, energy, dEdcn, gradient, sigma, partition)

    Evaluation of the dispersion energy expression

    Arguments

    Type IntentOptional Attributes Name
    class(zero_damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: width

    Width of smooth cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for C8 extrapolation

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(in), optional :: dc6dcn(:,:)

    Derivative of the C6 w.r.t. the coordination number

    real(kind=wp), intent(inout) :: energy(:)

    Dispersion energy

    real(kind=wp), intent(inout), optional :: dEdcn(:)

    Derivative of the energy w.r.t. the coordination number

    real(kind=wp), intent(inout), optional :: gradient(:,:)

    Dispersion gradient

    real(kind=wp), intent(inout), optional :: sigma(:,:)

    Dispersion virial

    type(work_partition), intent(in), optional :: partition

    Work partition of the atom pairs, defaults to the complete work

  • private subroutine get_dispersion2_compat(self, mol, trans, cutoff, rvdw, r4r2, c6, dc6dcn, energy, dEdcn, gradient, sigma)

    Evaluation of the dispersion energy expression

    deprecated: removed with the v2 API, use the interface with an explicit width

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for C8 extrapolation

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(in), optional :: dc6dcn(:,:)

    Derivative of the C6 w.r.t. the coordination number

    real(kind=wp), intent(inout) :: energy(:)

    Dispersion energy

    real(kind=wp), intent(inout), optional :: dEdcn(:)

    Derivative of the energy w.r.t. the coordination number

    real(kind=wp), intent(inout), optional :: gradient(:,:)

    Dispersion gradient

    real(kind=wp), intent(inout), optional :: sigma(:,:)

    Dispersion virial

procedure, public :: get_dispersion2_compat

  • private subroutine get_dispersion2_compat(self, mol, trans, cutoff, rvdw, r4r2, c6, dc6dcn, energy, dEdcn, gradient, sigma)

    Evaluation of the dispersion energy expression

    deprecated: removed with the v2 API, use the interface with an explicit width

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for C8 extrapolation

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(in), optional :: dc6dcn(:,:)

    Derivative of the C6 w.r.t. the coordination number

    real(kind=wp), intent(inout) :: energy(:)

    Dispersion energy

    real(kind=wp), intent(inout), optional :: dEdcn(:)

    Derivative of the energy w.r.t. the coordination number

    real(kind=wp), intent(inout), optional :: gradient(:,:)

    Dispersion gradient

    real(kind=wp), intent(inout), optional :: sigma(:,:)

    Dispersion virial

procedure, public :: get_dispersion2_ewald

Evaluate the two-body dispersion energy by Ewald summation

  • private subroutine get_dispersion2_ewald(self, mol, disp, gwvec, gwdcn, energies, dEdcn, gradient, sigma, error, partition)

    Evaluate the two-body dispersion energy by summation over the reciprocal lattice.

    Requires a separable representation of the C6 coefficients in the dispersion model and a damping function supporting the Ewald summation.

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    class(d3_model), intent(in) :: disp

    Dispersion model

    real(kind=wp), intent(in) :: gwvec(:,:)

    Weighting function for the atomic reference systems

    real(kind=wp), intent(in), optional :: gwdcn(:,:)

    Derivative of the weighting function w.r.t. the coordination number

    real(kind=wp), intent(inout) :: energies(:)

    Dispersion energy

    real(kind=wp), intent(inout), optional :: dEdcn(:)

    Derivative of the energy w.r.t. the coordination number

    real(kind=wp), intent(inout), optional :: gradient(:,:)

    Dispersion gradient

    real(kind=wp), intent(inout), optional :: sigma(:,:)

    Dispersion virial

    type(error_type), intent(out), allocatable :: error

    Error handling

    type(work_partition), intent(in), optional :: partition

    Work partition of the reciprocal space summation

procedure(dispersion_interface), public, deferred :: get_dispersion2_impl

  • subroutine dispersion_interface(self, mol, trans, cutoff, width, rvdw, r4r2, c6, dc6dcn, energy, dEdcn, gradient, sigma, partition) Prototype

    Evaluation of the dispersion energy expression

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: width

    Width of smooth cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for C8 extrapolation

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(in), optional :: dc6dcn(:,:)

    Derivative of the C6 w.r.t. the coordination number

    real(kind=wp), intent(inout) :: energy(:)

    Dispersion energy

    real(kind=wp), intent(inout), optional :: dEdcn(:)

    Derivative of the energy w.r.t. the coordination number

    real(kind=wp), intent(inout), optional :: gradient(:,:)

    Dispersion gradient

    real(kind=wp), intent(inout), optional :: sigma(:,:)

    Dispersion virial

    type(work_partition), intent(in), optional :: partition

    Work partition of the atom pairs, defaults to the complete work

generic, public :: get_dispersion3 => get_dispersion3_impl, get_dispersion3_compat

  • private subroutine get_dispersion3(self, mol, trans, cutoff, width, rvdw, r4r2, c6, dc6dcn, energy, dEdcn, gradient, sigma, partition)

    Evaluation of the dispersion energy expression

    Arguments

    Type IntentOptional Attributes Name
    class(zero_damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: width

    Width of smooth cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for C8 extrapolation

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(in), optional :: dc6dcn(:,:)

    Derivative of the C6 w.r.t. the coordination number

    real(kind=wp), intent(inout) :: energy(:)

    Dispersion energy

    real(kind=wp), intent(inout), optional :: dEdcn(:)

    Derivative of the energy w.r.t. the coordination number

    real(kind=wp), intent(inout), optional :: gradient(:,:)

    Dispersion gradient

    real(kind=wp), intent(inout), optional :: sigma(:,:)

    Dispersion virial

    type(work_partition), intent(in), optional :: partition

    Work partition of the atom pairs, defaults to the complete work

  • private subroutine get_dispersion3_compat(self, mol, trans, cutoff, rvdw, r4r2, c6, dc6dcn, energy, dEdcn, gradient, sigma)

    Evaluation of the dispersion energy expression

    deprecated: removed with the v2 API, use the interface with an explicit width

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for C8 extrapolation

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(in), optional :: dc6dcn(:,:)

    Derivative of the C6 w.r.t. the coordination number

    real(kind=wp), intent(inout) :: energy(:)

    Dispersion energy

    real(kind=wp), intent(inout), optional :: dEdcn(:)

    Derivative of the energy w.r.t. the coordination number

    real(kind=wp), intent(inout), optional :: gradient(:,:)

    Dispersion gradient

    real(kind=wp), intent(inout), optional :: sigma(:,:)

    Dispersion virial

procedure, public :: get_dispersion3_compat

  • private subroutine get_dispersion3_compat(self, mol, trans, cutoff, rvdw, r4r2, c6, dc6dcn, energy, dEdcn, gradient, sigma)

    Evaluation of the dispersion energy expression

    deprecated: removed with the v2 API, use the interface with an explicit width

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for C8 extrapolation

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(in), optional :: dc6dcn(:,:)

    Derivative of the C6 w.r.t. the coordination number

    real(kind=wp), intent(inout) :: energy(:)

    Dispersion energy

    real(kind=wp), intent(inout), optional :: dEdcn(:)

    Derivative of the energy w.r.t. the coordination number

    real(kind=wp), intent(inout), optional :: gradient(:,:)

    Dispersion gradient

    real(kind=wp), intent(inout), optional :: sigma(:,:)

    Dispersion virial

procedure(dispersion3_hessian_interface), public, deferred :: get_dispersion3_hessian

Evaluate three-body contribution to the hessian

  • subroutine dispersion3_hessian_interface(self, mol, trans, cutoff, width, rvdw, r4r2, c6, dc6dcn, d2c6dcn2, d2c6dcnij, hessian, dEdcn, dEdcndr, dEdcndcn, partition) Prototype

    Evaluation of the three-body contribution to the hessian

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: width

    Width of smooth cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for C8 extrapolation

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(in) :: dc6dcn(:,:)

    Derivatives of the C6 w.r.t. the coordination number

    real(kind=wp), intent(in) :: d2c6dcn2(:,:)

    Derivatives of the C6 w.r.t. the coordination number

    real(kind=wp), intent(in) :: d2c6dcnij(:,:)

    Derivatives of the C6 w.r.t. the coordination number

    real(kind=wp), intent(inout) :: hessian(:,:)

    Second derivative of the energy w.r.t. the Cartesian coordinates

    real(kind=wp), intent(inout) :: dEdcn(:)

    Derivative of the energy w.r.t. the coordination number

    real(kind=wp), intent(inout) :: dEdcndr(:,:)

    Mixed derivative w.r.t. coordination number and Cartesian coordinates

    real(kind=wp), intent(inout) :: dEdcndcn(:,:)

    Second derivative w.r.t. the coordination numbers

    type(work_partition), intent(in), optional :: partition

    Work partition of the atom pairs, defaults to the complete work

procedure(dispersion_interface), public, deferred :: get_dispersion3_impl

  • subroutine dispersion_interface(self, mol, trans, cutoff, width, rvdw, r4r2, c6, dc6dcn, energy, dEdcn, gradient, sigma, partition) Prototype

    Evaluation of the dispersion energy expression

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: width

    Width of smooth cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for C8 extrapolation

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(in), optional :: dc6dcn(:,:)

    Derivative of the C6 w.r.t. the coordination number

    real(kind=wp), intent(inout) :: energy(:)

    Dispersion energy

    real(kind=wp), intent(inout), optional :: dEdcn(:)

    Derivative of the energy w.r.t. the coordination number

    real(kind=wp), intent(inout), optional :: gradient(:,:)

    Dispersion gradient

    real(kind=wp), intent(inout), optional :: sigma(:,:)

    Dispersion virial

    type(work_partition), intent(in), optional :: partition

    Work partition of the atom pairs, defaults to the complete work

procedure, public :: get_fourier_terms

Reciprocal space representation of the damped pair potential

  • private pure subroutine get_fourier_terms(self, izp, jzp, rvdw, r4r2, terms, nterm)

    Reciprocal space representation of the damped pair potential.

    Only meaningful for damping functions reporting support for the Ewald summation, all others contribute no terms.

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    integer, intent(in) :: izp

    Species indices of the pair

    integer, intent(in) :: jzp

    Species indices of the pair

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for C8 extrapolation

    type(fourier_term), intent(out) :: terms(:)

    Terms of the damped pair potential

    integer, intent(out) :: nterm

    Number of terms of the damped pair potential

generic, public :: get_pairwise_dispersion2 => get_pairwise_dispersion2_impl, get_pairwise_dispersion2_compat

  • private subroutine get_pairwise_dispersion2(self, mol, trans, cutoff, width, rvdw, r4r2, c6, energy)

    Evaluation of the dispersion energy expression projected on atomic pairs

    Arguments

    Type IntentOptional Attributes Name
    class(zero_damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: width

    Width of smooth cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for r4 over r2 operator

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(inout) :: energy(:,:)

    Dispersion energy

  • private subroutine get_pairwise_dispersion2_compat(self, mol, trans, cutoff, rvdw, r4r2, c6, energy)

    Evaluation of the pairwise representation of the dispersion energy

    deprecated: removed with the v2 API, use the interface with an explicit width

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for r4 over r2 operator

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(inout) :: energy(:,:)

    Pairwise representation of the dispersion energy

procedure, public :: get_pairwise_dispersion2_compat

  • private subroutine get_pairwise_dispersion2_compat(self, mol, trans, cutoff, rvdw, r4r2, c6, energy)

    Evaluation of the pairwise representation of the dispersion energy

    deprecated: removed with the v2 API, use the interface with an explicit width

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for r4 over r2 operator

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(inout) :: energy(:,:)

    Pairwise representation of the dispersion energy

procedure(pairwise_dispersion_interface), public, deferred :: get_pairwise_dispersion2_impl

  • subroutine pairwise_dispersion_interface(self, mol, trans, cutoff, width, rvdw, r4r2, c6, energy) Prototype

    Evaluation of the pairwise representation of the dispersion energy

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: width

    Width of smooth cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for r4 over r2 operator

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(inout) :: energy(:,:)

    Pairwise representation of the dispersion energy

generic, public :: get_pairwise_dispersion3 => get_pairwise_dispersion3_impl, get_pairwise_dispersion3_compat

  • private subroutine get_pairwise_dispersion3(self, mol, trans, cutoff, width, rvdw, r4r2, c6, energy)

    Evaluation of the dispersion energy expression

    Arguments

    Type IntentOptional Attributes Name
    class(zero_damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: width

    Width of smooth cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for r4 over r2 operator

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(inout) :: energy(:,:)

    Dispersion energy

  • private subroutine get_pairwise_dispersion3_compat(self, mol, trans, cutoff, rvdw, r4r2, c6, energy)

    Evaluation of the pairwise representation of the dispersion energy

    deprecated: removed with the v2 API, use the interface with an explicit width

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for r4 over r2 operator

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(inout) :: energy(:,:)

    Pairwise representation of the dispersion energy

procedure, public :: get_pairwise_dispersion3_compat

  • private subroutine get_pairwise_dispersion3_compat(self, mol, trans, cutoff, rvdw, r4r2, c6, energy)

    Evaluation of the pairwise representation of the dispersion energy

    deprecated: removed with the v2 API, use the interface with an explicit width

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for r4 over r2 operator

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(inout) :: energy(:,:)

    Pairwise representation of the dispersion energy

procedure(pairwise_dispersion_interface), public, deferred :: get_pairwise_dispersion3_impl

  • subroutine pairwise_dispersion_interface(self, mol, trans, cutoff, width, rvdw, r4r2, c6, energy) Prototype

    Evaluation of the pairwise representation of the dispersion energy

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    class(structure_type), intent(in) :: mol

    Molecular structure data

    real(kind=wp), intent(in) :: trans(:,:)

    Lattice points

    real(kind=wp), intent(in) :: cutoff

    Real space cutoff

    real(kind=wp), intent(in) :: width

    Width of smooth cutoff

    real(kind=wp), intent(in) :: rvdw(:,:)

    Van-der-Waals radii for damping function

    real(kind=wp), intent(in) :: r4r2(:)

    Expectation values for r4 over r2 operator

    real(kind=wp), intent(in) :: c6(:,:)

    C6 coefficients for all atom pairs.

    real(kind=wp), intent(inout) :: energy(:,:)

    Pairwise representation of the dispersion energy

procedure, public :: has_threebody

Whether the three-body term contributes to the energy

  • private pure function has_threebody(self) result(has)

    Whether the three-body term contributes to the energy.

    The three-body term reads the C6 coefficients of pairs outside the work partition, a damping function without it only needs its own pairs. Assume the worst for damping functions that do not answer.

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    Return Value logical

    Whether the three-body term contributes

procedure, public :: supports_ewald

Whether the damping function can be evaluated by Ewald summation

  • private pure function supports_ewald(self) result(supported)

    Whether the damping function has a known reciprocal space representation.

    Damping functions which are not rational in the interatomic distance, or whose damping radius depends on the C6 coefficient, cannot be brought into the separable form required by the Ewald summation.

    Arguments

    Type IntentOptional Attributes Name
    class(damping_param), intent(in) :: self

    Damping parameters

    Return Value logical

    Whether the damping function can be evaluated in reciprocal space

Source Code

   type, abstract :: damping_param
   contains
      generic :: get_dispersion2 => get_dispersion2_impl, get_dispersion2_compat
      procedure(dispersion_interface), deferred :: get_dispersion2_impl
      procedure :: get_dispersion2_compat => get_dispersion2_compat
      generic :: get_dispersion3 => get_dispersion3_impl, get_dispersion3_compat
      procedure(dispersion_interface), deferred :: get_dispersion3_impl
      procedure :: get_dispersion3_compat => get_dispersion3_compat
      generic :: get_pairwise_dispersion2 => get_pairwise_dispersion2_impl, get_pairwise_dispersion2_compat
      procedure(pairwise_dispersion_interface), deferred :: get_pairwise_dispersion2_impl
      procedure :: get_pairwise_dispersion2_compat => get_pairwise_dispersion2_compat
      generic :: get_pairwise_dispersion3 => get_pairwise_dispersion3_impl, get_pairwise_dispersion3_compat
      procedure(pairwise_dispersion_interface), deferred :: get_pairwise_dispersion3_impl
      procedure :: get_pairwise_dispersion3_compat => get_pairwise_dispersion3_compat
      !> Pair kernel and its derivatives w.r.t. squared distance and C6 coefficient
      procedure(damping_kernel_interface), deferred :: get_damping_kernel
      !> Evaluate three-body contribution to the hessian
      procedure(dispersion3_hessian_interface), deferred :: get_dispersion3_hessian
      !> Whether the damping function can be evaluated by Ewald summation
      procedure :: supports_ewald
      !> Whether the three-body term contributes to the energy
      procedure :: has_threebody
      !> Reciprocal space representation of the damped pair potential
      procedure :: get_fourier_terms
      !> Evaluate the two-body dispersion energy by Ewald summation
      procedure :: get_dispersion2_ewald
   end type damping_param