dftd3_fourier_kernel Module

Reciprocal space representation of the damped dispersion potential.

All damping functions of the rational family reduce the pair potential to a sum of terms of the shape

phi(r) = prefactor * rm / (ralpha + radius**alpha)

with even m and even alpha. Since the poles of the denominator are known, the three-dimensional Fourier transform

phi_hat(k) = 4pi/k * integral_0^infinity rsin(kr)phi(r) dr

follows from contour integration over the alpha/2 poles in the upper half plane and decays exponentially with exp(-kradiussin(pi/alpha)).


Uses


Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: max_fourier_terms = 2

Maximum number of terms needed to represent a damped pair potential


Derived Types

type, public ::  fourier_term

Single term of the damped pair potential

Components

Type Visibility Attributes Name Initial
integer, public :: alpha = 0

Power of the denominator

integer, public :: m = 0

Power of the numerator

real(kind=wp), public :: prefactor = 0.0_wp

Scaling of the term

real(kind=wp), public :: radius = 0.0_wp

Damping radius entering the denominator


Functions

public pure function get_potential_zero(term) result(phi)

Value of the damped pair potential at vanishing distance

Arguments

Type IntentOptional Attributes Name
type(fourier_term), intent(in) :: term

Term of the damped pair potential

Return Value real(kind=wp)

Value of the term at the origin

public pure function get_reciprocal_cutoff(term, tolerance) result(kcut)

Wave number beyond which the term is damped below the requested tolerance

Arguments

Type IntentOptional Attributes Name
type(fourier_term), intent(in) :: term

Term of the damped pair potential

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

Requested relative accuracy

Return Value real(kind=wp)

Reciprocal space cutoff

public pure function is_supported_term(term) result(supported)

Check whether the closed form of the Fourier transform is applicable

Arguments

Type IntentOptional Attributes Name
type(fourier_term), intent(in) :: term

Term of the damped pair potential

Return Value logical

Whether the term can be transformed analytically


Subroutines

public pure subroutine get_fourier_transform(term, kval, phi, dphi)

Fourier transform of a single term and its derivative w.r.t. the wave number

Arguments

Type IntentOptional Attributes Name
type(fourier_term), intent(in) :: term

Term of the damped pair potential

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

Wave number

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

Fourier transform of the term

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

Derivative of the Fourier transform w.r.t. the wave number