dftd4_compat Module

This is a compatibility module for dftd4 2.5.0 reproducing enough of the old API to compile the interface with Vasp.


Uses


Derived Types

type, public ::  dftd_options

Components

Type Visibility Attributes Name Initial
real(kind=wp), public :: g_a
real(kind=wp), public :: g_c
logical, public :: lenergy
logical, public :: lgradient
logical, public :: lhessian
integer, public :: lmbd = 3
logical, public :: lmolpol
integer, public :: print_level
integer, public :: refq = 5
real(kind=wp), public :: wf = 6.0_wp

type, public ::  dftd_parameter

Components

Type Visibility Attributes Name Initial
real(kind=wp), public :: a1
real(kind=wp), public :: a2
real(kind=wp), public :: alp = 16.0_wp
real(kind=wp), public :: s6
real(kind=wp), public :: s8
real(kind=wp), public :: s9 = 1.0_wp

type, public ::  dftd_results

Components

Type Visibility Attributes Name Initial
real(kind=wp), public, allocatable :: energy
real(kind=wp), public, allocatable :: gradient(:,:)
real(kind=wp), public, allocatable :: lattice_gradient(:,:)

type, public ::  mctc_logger

Components

Type Visibility Attributes Name Initial
logical, public :: sane = .true.

type, public ::  molecule

Components

Type Visibility Attributes Name Initial
integer, public, allocatable :: at(:)
real(kind=wp), public, allocatable :: cellpar(:)
real(kind=wp), public, allocatable :: chrg
real(kind=wp), public, allocatable :: lattice(:,:)
integer, public, allocatable :: npbc
logical, public, allocatable :: pbc
real(kind=wp), public, allocatable :: rec_lat(:,:)
real(kind=wp), public, allocatable :: volume
type(ws_cell), public :: wsc
real(kind=wp), public, allocatable :: xyz(:,:)

Type-Bound Procedures

procedure, public :: allocate
procedure, public :: calculate_distances
procedure, public :: wrap_back

type, public ::  ws_cell


Functions

public function dlat_to_dvol(lattice) result(vol)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: lattice(3,3)

Return Value real(kind=wp)


Subroutines

private subroutine allocate(self, n, l)

Arguments

Type IntentOptional Attributes Name
class(molecule), intent(inout) :: self
integer, intent(in) :: n
logical, intent(in) :: l

private subroutine calculate_distances(self)

Arguments

Type IntentOptional Attributes Name
class(molecule), intent(inout) :: self

public subroutine d4_calculation(io, env, options, mol_, param_, res)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: io
type(mctc_logger), intent(inout) :: env
type(dftd_options), intent(in) :: options
type(molecule), intent(in) :: mol_
type(dftd_parameter), intent(in) :: param_
type(dftd_results), intent(out) :: res

public subroutine d4par(fname, param_, lmbd, env)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fname
type(dftd_parameter), intent(out) :: param_
integer, intent(in) :: lmbd
type(mctc_logger) :: env

public subroutine dlat_to_cell(lattice, cellpar)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: lattice(3,3)
real(kind=wp), intent(out), optional :: cellpar(6)

public subroutine dlat_to_rlat(lattice, reclatt)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: lattice(3,3)
real(kind=wp), intent(out), optional :: reclatt(3,3)

private subroutine wrap_back(self)

Arguments

Type IntentOptional Attributes Name
class(molecule), intent(inout) :: self