m_psml_api Module

Procedures to handle the PSML pseudopotential format.



Contents


Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: dp = selected_real_kind(14)
logical, public :: global_debug = .false.
logical, public :: global_use_effective_range = .true.
character(len=1), public, dimension(0:4) :: sym = (/"s", "p", "d", "f", "g"/)

Interfaces

public interface ps_Potential_Filter

  • public subroutine ps_SemilocalPotentials_Filter(ps, indexes_in, l, j, n, set, indexes, number)

    Arguments

    Type IntentOptional Attributes Name
    type(ps_t), intent(in), target :: ps
    integer, intent(in), optional :: indexes_in(:)
    integer, intent(in), optional :: l
    real(kind=dp), intent(in), optional :: j
    integer, intent(in), optional :: n
    integer, intent(in), optional :: set
    integer, intent(out), optional, allocatable :: indexes(:)
    integer, intent(out), optional :: number

public interface ps_Projector_Filter

  • public subroutine ps_NonlocalProjectors_Filter(ps, indexes_in, l, j, seq, set, indexes, number)

    Arguments

    Type IntentOptional Attributes Name
    type(ps_t), intent(in), target :: ps
    integer, intent(in), optional :: indexes_in(:)
    integer, intent(in), optional :: l
    real(kind=dp), intent(in), optional :: j
    integer, intent(in), optional :: seq
    integer, intent(in), optional :: set
    integer, intent(out), optional, allocatable :: indexes(:)
    integer, intent(out), optional :: number

public interface ps_PseudoWf_Filter

  • public subroutine ps_PseudoWaveFunctions_Filter(ps, indexes_in, l, j, n, set, indexes, number)

    Arguments

    Type IntentOptional Attributes Name
    type(ps_t), intent(in), target :: ps
    integer, intent(in), optional :: indexes_in(:)
    integer, intent(in), optional :: l
    real(kind=dp), intent(in), optional :: j
    integer, intent(in), optional :: n
    integer, intent(in), optional :: set
    integer, intent(out), optional, allocatable :: indexes(:)
    integer, intent(out), optional :: number

Functions

public function ps_GetLibPSMLVersion() result(v)

Returns the library version in integer format

Arguments

None

Return Value integer

public function ps_Provenance_Depth(ps) result(n)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps

Return Value integer

public function ps_ValenceCharge_Value(ps, r) result(val)

Computes the value of the valence charge at r @param ps is a handle to the psml information @param r is the radius It returns the valence charge density integrated over solid angle, so that Q_val = int{ valrr }

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
real(kind=dp), intent(in) :: r

Return Value real(kind=dp)

public function ps_CoreCharge_Value(ps, r) result(val)

Computes the value of the pseudo-core charge at r @param ps is a handle to the psml information @param r is the radius It returns the pseudo-core charge density integrated over solid angle, so that Q_core = int{ valrr }

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
real(kind=dp), intent(in) :: r

Return Value real(kind=dp)

public function ps_ValenceKineticDensity_Value(ps, r) result(val)

Computes the value of the valence kinetic energy density at r @param ps is a handle to the psml information @param r is the radius ??? It returns the valence kinetic energy density integrated over ??? solid angle, so that KE_val = int{ valrr }

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
real(kind=dp), intent(in) :: r

Return Value real(kind=dp)

public function ps_CoreKineticDensity_Value(ps, r) result(val)

Computes the value of the pseudo-core kinetic energy density at r @param ps is a handle to the psml information @param r is the radius ??? It returns the pseudo-core kinetic energy density integrated over ??? solid angle, so that Q_core = int{ valrr }

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
real(kind=dp), intent(in) :: r

Return Value real(kind=dp)

public function ps_GridAnnotation(ps, radfunc) result(annotation)

Returns the annotation associated to a grid. If a radial function handle is given, the annotation for that radial function's grid is returned. Otherwise, the return value is the annotation for the global grid. If there is no appropriate annotation, an empty structure is returned. @param ps is a handle to the psml information @param radfunc is a handle to a radial function structure

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
type(ps_radfunc_t), intent(in), optional :: radfunc

Return Value type(assoc_list_t)

public function ps_GetValue(f, r) result(val)

Arguments

Type IntentOptional Attributes Name
type(ps_radfunc_t), intent(in) :: f
real(kind=dp), intent(in) :: r

Return Value real(kind=dp)

public function ps_Potential_Value(ps, i, r) result(val)

Evaluator by storage index

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
integer, intent(in) :: i
real(kind=dp), intent(in) :: r

Return Value real(kind=dp)

public function ps_PseudoWf_Value(ps, i, r) result(val)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
integer, intent(in) :: i
real(kind=dp), intent(in) :: r

Return Value real(kind=dp)

public function ps_HasProjectors(ps) result(p)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps

Return Value logical

public function ps_HasLocalPotential(ps) result(p)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps

Return Value logical

public function ps_LocalPotential_Value(ps, r) result(val)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
real(kind=dp), intent(in) :: r

Return Value real(kind=dp)

public function ps_HasPSOperator(ps) result(psop)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps

Return Value logical

public function ps_HasSemilocalPotentials(ps) result(p)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps

Return Value logical

public function ps_Projector_Value(ps, i, r) result(val)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
integer, intent(in) :: i
real(kind=dp), intent(in) :: r

Return Value real(kind=dp)

private function l_of_sym(str, name) result(l)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str
character(len=*), intent(in) :: name

Return Value integer

private function max_range(f) result(range)

Returns the maximum radius in a radfunc's data

Arguments

Type IntentOptional Attributes Name
type(ps_radfunc_t), intent(in) :: f

Return Value real(kind=dp)

private function eval_radfunc(f, r, debug) result(val)

Arguments

Type IntentOptional Attributes Name
type(ps_radfunc_t), intent(in) :: f
real(kind=dp), intent(in) :: r
logical, intent(in) :: debug

Return Value real(kind=dp)


Subroutines

public subroutine ps_SetEvaluatorOptions(quality_level, debug, use_effective_range, custom_interpolator)

Sets various parameters for the operation of the evaluator

Arguments

Type IntentOptional Attributes Name
integer, intent(in), optional :: quality_level
logical, intent(in), optional :: debug
logical, intent(in), optional :: use_effective_range
procedure(interp), optional :: custom_interpolator

public subroutine ps_RootAttributes_Get(ps, uuid, version, namespace, annotation)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
character(len=*), intent(out), optional :: uuid
character(len=*), intent(out), optional :: version
character(len=*), intent(out), optional :: namespace
type(assoc_list_t), intent(out), optional :: annotation

public subroutine ps_Provenance_Get(ps, level, creator, date, annotation, number_of_input_files)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
integer, intent(in) :: level
character(len=*), intent(out), optional :: creator
character(len=*), intent(out), optional :: date
type(assoc_list_t), intent(out), optional :: annotation
integer, intent(out), optional :: number_of_input_files

public subroutine ps_PseudoAtomSpec_Get(ps, atomic_symbol, atomic_label, atomic_number, z_pseudo, pseudo_flavor, relativity, spin_dft, core_corrections, meta_gga, annotation)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
character(len=*), intent(out), optional :: atomic_symbol
character(len=*), intent(out), optional :: atomic_label
real(kind=dp), intent(out), optional :: atomic_number
real(kind=dp), intent(out), optional :: z_pseudo
character(len=*), intent(out), optional :: pseudo_flavor
character(len=*), intent(out), optional :: relativity
logical, intent(out), optional :: spin_dft
logical, intent(out), optional :: core_corrections
logical, intent(out), optional :: meta_gga
type(assoc_list_t), intent(out), optional :: annotation

public subroutine ps_ValenceConfiguration_Get(ps, nshells, charge, annotation)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
integer, intent(out), optional :: nshells
real(kind=dp), intent(out), optional :: charge
type(assoc_list_t), intent(out), optional :: annotation

public subroutine ps_ValenceShell_Get(ps, i, n, l, occupation, occ_up, occ_down)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
integer, intent(in) :: i
integer, intent(out), optional :: n
integer, intent(out), optional :: l
real(kind=dp), intent(out), optional :: occupation
real(kind=dp), intent(out), optional :: occ_up
real(kind=dp), intent(out), optional :: occ_down

public subroutine ps_ValenceCharge_Get(ps, total_charge, is_unscreening_charge, rescaled_to_z_pseudo, annotation, func)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
real(kind=dp), intent(out), optional :: total_charge
character(len=*), intent(out), optional :: is_unscreening_charge
character(len=*), intent(out), optional :: rescaled_to_z_pseudo
type(assoc_list_t), intent(out), optional :: annotation
type(ps_radfunc_t), intent(out), optional :: func

public subroutine ps_CoreCharge_Get(ps, rc, nderivs, annotation, func)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
real(kind=dp), intent(out), optional :: rc
integer, intent(out), optional :: nderivs
type(assoc_list_t), intent(out), optional :: annotation
type(ps_radfunc_t), intent(out), optional :: func

public subroutine ps_ValenceKineticDensity_Get(ps, annotation, func)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
type(assoc_list_t), intent(out), optional :: annotation
type(ps_radfunc_t), intent(out), optional :: func

public subroutine ps_CoreKineticDensity_Get(ps, rc, nderivs, annotation, func)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
real(kind=dp), intent(out), optional :: rc
integer, intent(out), optional :: nderivs
type(assoc_list_t), intent(out), optional :: annotation
type(ps_radfunc_t), intent(out), optional :: func

public subroutine ps_ExchangeCorrelation_Get(ps, annotation, n_libxc_functionals)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
type(assoc_list_t), intent(out), optional :: annotation
integer, intent(out), optional :: n_libxc_functionals

public subroutine ps_LibxcFunctional_Get(ps, i, name, code, type, weight)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
integer, intent(in) :: i
character(len=*), intent(out), optional :: name
integer, intent(out), optional :: code
character(len=*), intent(out), optional :: type
real(kind=dp), intent(out), optional :: weight

public subroutine ps_Potential_Get(ps, i, l, j, n, rc, set, flavor, eref, annotation, func)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in), target :: ps
integer, intent(in) :: i
integer, intent(out), optional :: l
real(kind=dp), intent(out), optional :: j
integer, intent(out), optional :: n
real(kind=dp), intent(out), optional :: rc
integer, intent(out), optional :: set
character(len=*), intent(out), optional :: flavor
real(kind=dp), intent(out), optional :: eref
type(assoc_list_t), intent(out), optional :: annotation
type(ps_radfunc_t), intent(out), optional :: func

public subroutine ps_SemilocalPotentials_Filter(ps, indexes_in, l, j, n, set, indexes, number)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in), target :: ps
integer, intent(in), optional :: indexes_in(:)
integer, intent(in), optional :: l
real(kind=dp), intent(in), optional :: j
integer, intent(in), optional :: n
integer, intent(in), optional :: set
integer, intent(out), optional, allocatable :: indexes(:)
integer, intent(out), optional :: number

public subroutine ps_GetRawData(f, raw_r, raw_data)

Arguments

Type IntentOptional Attributes Name
type(ps_radfunc_t), intent(in) :: f
real(kind=dp), intent(out), allocatable :: raw_r(:)
real(kind=dp), intent(out), allocatable :: raw_data(:)

public subroutine ps_PseudoWaveFunctions_Filter(ps, indexes_in, l, j, n, set, indexes, number)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in), target :: ps
integer, intent(in), optional :: indexes_in(:)
integer, intent(in), optional :: l
real(kind=dp), intent(in), optional :: j
integer, intent(in), optional :: n
integer, intent(in), optional :: set
integer, intent(out), optional, allocatable :: indexes(:)
integer, intent(out), optional :: number

public subroutine ps_PseudoWf_Get(ps, i, l, j, n, set, energy_level, annotation, func)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in), target :: ps
integer, intent(in) :: i
integer, intent(out), optional :: l
real(kind=dp), intent(out), optional :: j
integer, intent(out), optional :: n
integer, intent(out), optional :: set
real(kind=dp), intent(out), optional :: energy_level
type(assoc_list_t), intent(out), optional :: annotation
type(ps_radfunc_t), intent(out), optional :: func

public subroutine ps_LocalPotential_Get(ps, type, annotation, func, has_local_charge, func_local_charge)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in) :: ps
character(len=*), intent(out), optional :: type
type(assoc_list_t), intent(out), optional :: annotation
type(ps_radfunc_t), intent(out), optional :: func
logical, intent(out), optional :: has_local_charge
type(ps_radfunc_t), intent(out), optional :: func_local_charge

public subroutine ps_NonlocalProjectors_Filter(ps, indexes_in, l, j, seq, set, indexes, number)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in), target :: ps
integer, intent(in), optional :: indexes_in(:)
integer, intent(in), optional :: l
real(kind=dp), intent(in), optional :: j
integer, intent(in), optional :: seq
integer, intent(in), optional :: set
integer, intent(out), optional, allocatable :: indexes(:)
integer, intent(out), optional :: number

public subroutine ps_Projector_Get(ps, i, l, j, seq, set, ekb, eref, type, annotation, func)

Arguments

Type IntentOptional Attributes Name
type(ps_t), intent(in), target :: ps
integer, intent(in) :: i
integer, intent(out), optional :: l
real(kind=dp), intent(out), optional :: j
integer, intent(out), optional :: seq
integer, intent(out), optional :: set
real(kind=dp), intent(out), optional :: ekb
real(kind=dp), intent(out), optional :: eref
character(len=*), intent(out), optional :: type
type(assoc_list_t), intent(out), optional :: annotation
type(ps_radfunc_t), intent(out), optional :: func

private subroutine check_index(i, n, str)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: i
integer, intent(in) :: n
character(len=*), intent(in) :: str

private subroutine assert(cond, message)

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: cond
character(len=*) :: message