Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | needgrd | = | .false. | ||
logical, | public | :: | needtau | = | .false. | ||
logical, | public | :: | needlapl | = | .false. |
@brief Destroy internal variables @author Igor S. Gerasimov @date Dec, 2020 --Initial release-- @date Mar, 2021 Add destruction of functionals_list pointers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(functional_t), | intent(inout) | :: | this |
@brief Checking that at least one functional is selected @author Igor S. Gerasimov @date Sep, 2019 --Initial release--
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(functional_t), | intent(inout) | :: | this |
@brief Add functional into internal array of functionals @author Igor S. Gerasimov @date July, 2019 --Initial release-- @date March, 2021 Add optional hfex, alpha, beta, omega parameters @date July, 2021 Using messages module @params func_id - (in) internal key of functional in libxc @params coeff - (in) coefficient before functional for parametric schemes like B3LYP of PBE0 @params external_parameters - (in, optional) setting external parameters for some LibXC functionals @params hfex - (out, optional) returns % of HF of added functional (should be used only for hybrid functionals) @params alpha - (out, optional) returns short-range % of HF of added range-saparated functional (should be used only for range-saparated hybrid functionals) @params beta - (out, optional) returns long-range % of HF of added range-saparated functional (should be used only for range-saparated hybrid functionals) @params omega - (out, optional) returns error function parameter of added range-saparated functional (should be used only for range-saparated hybrid functionals)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(functional_t), | intent(inout) | :: | this | |||
integer(kind=C_INT), | intent(in) | :: | func_id | |||
real(kind=fp), | intent(in) | :: | coeff | |||
real(kind=fp), | intent(in), | optional, | dimension(:) | :: | external_parameters | |
real(kind=fp), | intent(out), | optional | :: | hfex | ||
real(kind=fp), | intent(out), | optional | :: | alpha | ||
real(kind=fp), | intent(out), | optional | :: | beta | ||
real(kind=fp), | intent(out), | optional | :: | omega |
@brief Perform DFT energy and its first, second and third derivatives calculation @author Igor S. Gerasimov @date Sep, 2019 @params npoints - (in) number of points @params rho - (in) density at point @params sigma - (in) gradient of density at point @params tau - (in) local kinetic energy at point @params lapl - (in) laplacian of density at point @params energy - (out) energy at point @params dedrho - (out) first derivatives energy by density @params dedsigma - (out) first derivatives energy by normed gradient @params dedlapl - (out) first derivatives energy by laplacian @params dedtau - (out) first derivatives energy by kinetic energy @params v2rho2 - (out) second derivatives by density and density @params v2rhosigma - (out) second derivatives by density and normed gradient @params v2rholapl - (out) second derivatives by density and laplacian @params v2rhotau - (out) second derivatives by density and kinetic energy @params v2sigma2 - (out) second derivatives by normed gradient and normed gradient @params v2sigmalapl - (out) second derivatives by normed gradient and laplacian @params v2sigmatau - (out) second derivatives by normed gradient and kinetic energy @params v2lapl2 - (out) second derivatives by laplacian and laplacian @params v2lapltau - (out) second derivatives by laplacian and kinetic energy @params v2tau2 - (out) second derivatives by kinetic energy and kinetic energy @params v3rho3 - (out) third derivatives by density and density and density @params v3rho2sigma - (out) third derivatives by density and density and normed gradient @params v3rho2lapl - (out) third derivatives by density and density and laplacian @params v3rho2tau - (out) third derivatives by density and density and kinetic energy @params v3rhosigma2 - (out) third derivatives by density and normed gradient and normed gradient @params v3rhosigmalapl - (out) third derivatives by density and normed gradient and laplacian @params v3rhosigmatau - (out) third derivatives by density and normed gradient and density @params v3rholapl2 - (out) third derivatives by density and laplacian and laplacian @params v3rholapltau - (out) third derivatives by density and laplacian and density @params v3rhotau2 - (out) third derivatives by density and kinetic energy and kinetic energy @params v3sigma3 - (out) third derivatives by normed gradient and normed gradient and normed gradient @params v3sigma2lapl - (out) third derivatives by normed gradient and normed gradient and laplacian @params v3sigma2tau - (out) third derivatives by normed gradient and normed gradient and kinetic energy @params v3sigmalapl2 - (out) third derivatives by normed gradient and laplacian and laplacian @params v3sigmalapltau - (out) third derivatives by normed gradient and laplacian and kinetic energy @params v3sigmatau2 - (out) third derivatives by normed gradient and kinetic energy and kinetic energy @params v3lapl3 - (out) third derivatives by laplacian and laplacian and laplacian @params v3lapl2tau - (out) third derivatives by laplacian and laplacian and kinetic energy @params v3lapltau2 - (out) third derivatives by laplacian and kinetic energy and kinetic energy @params v3tau3 - (out) third derivatives by kinetic energy and kinetic energy and kinetic energy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(functional_t), | intent(inout) | :: | this | |||
integer, | intent(in) | :: | NPoints | |||
real(kind=fp), | intent(in), | dimension(*) | :: | rho | ||
real(kind=fp), | intent(in), | dimension(*) | :: | sigma | ||
real(kind=fp), | intent(in), | dimension(*) | :: | tau | ||
real(kind=fp), | intent(in), | dimension(*) | :: | lapl | ||
real(kind=fp), | intent(out), | dimension(*) | :: | energy | ||
real(kind=fp), | intent(out), | dimension(*) | :: | dedrho | ||
real(kind=fp), | intent(out), | dimension(*) | :: | dedsigma | ||
real(kind=fp), | intent(out), | dimension(*) | :: | dedlapl | ||
real(kind=fp), | intent(out), | dimension(*) | :: | dedtau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2rho2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2rhosigma | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2rholapl | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2rhotau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2sigma2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2sigmalapl | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2sigmatau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2lapl2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2lapltau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2tau2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3rho3 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3rho2sigma | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3rho2lapl | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3rho2tau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3rhosigma2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3rhosigmalapl | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3rhosigmatau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3rholapl2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3rholapltau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3rhotau2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3sigma3 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3sigma2lapl | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3sigma2tau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3sigmalapl2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3sigmalapltau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3sigmatau2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3lapl3 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3lapl2tau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3lapltau2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v3tau3 |
@brief Perform DFT energy and its first and second derivatives calculation @author Igor S. Gerasimov @date Sep, 2019 @params NPoints - (in) number of points @params rho - (in) density at point @params sigma - (in) gradient of density at point @params tau - (in) local kinetic energy at point @params lapl - (in) laplacian of density at point @params energy - (out) energy at point @params dedrho - (out) first derivatives energy by density @params dedsigma - (out) first derivatives energy by normed gradient @params dedtau - (out) first derivatives energy by kinetic energy @params dedlapl - (out) first derivatives energy by laplacian @params v2rho2 - (out) second derivatives by density and density @params v2sigma2 - (out) second derivatives by normed gradient and normed gradient @params v2tau2 - (out) second derivatives by kinetic energy and kinetic energy @params v2lapl2 - (out) second derivatives by laplacian and laplacian @params v2rhosigma - (out) second derivatives by density and normed gradient @params v2rhotau - (out) second derivatives by density and kinetic energy @params v2rholapl - (out) second derivatives by density and laplacian @params v2sigmatau - (out) second derivatives by normed gradient and kinetic energy @params v2sigmalapl - (out) second derivatives by normed gradient and laplacian @params v2lapltau - (out) second derivatives by laplacian and kinetic energy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(functional_t), | intent(inout) | :: | this | |||
integer, | intent(in) | :: | NPoints | |||
real(kind=fp), | intent(in), | dimension(*) | :: | rho | ||
real(kind=fp), | intent(in), | dimension(*) | :: | sigma | ||
real(kind=fp), | intent(in), | dimension(*) | :: | tau | ||
real(kind=fp), | intent(in), | dimension(*) | :: | lapl | ||
real(kind=fp), | intent(out), | dimension(*) | :: | energy | ||
real(kind=fp), | intent(out), | dimension(*) | :: | dedrho | ||
real(kind=fp), | intent(out), | dimension(*) | :: | dedsigma | ||
real(kind=fp), | intent(out), | dimension(*) | :: | dedtau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | dedlapl | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2rho2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2sigma2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2tau2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2lapl2 | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2rhosigma | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2rhotau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2rholapl | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2sigmatau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2sigmalapl | ||
real(kind=fp), | intent(out), | dimension(*) | :: | v2lapltau |
@brief Perform DFT energy and its first derivatives calculation @author Igor S. Gerasimov @date July, 2019 @params NPoints - (in) number of points @params rho - (in) density at points @params sigma - (in) gradient of density at points @params tau - (in) local kinetic energy at points @params lapl - (in) laplacian of density at points @params energy - (out) energy at points @params dedrho - (out) first derivative energy by density @params dedsigma - (out) first derivative energy by normed gradient @params dedtau - (out) first derivative energy by kinetic energy @params dedlapl - (out) first derivative energy by laplacian
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(functional_t), | intent(inout) | :: | this | |||
integer, | intent(in) | :: | NPoints | |||
real(kind=fp), | intent(in), | dimension(*) | :: | rho | ||
real(kind=fp), | intent(in), | dimension(*) | :: | sigma | ||
real(kind=fp), | intent(in), | dimension(*) | :: | tau | ||
real(kind=fp), | intent(in), | dimension(*) | :: | lapl | ||
real(kind=fp), | intent(out), | dimension(*) | :: | energy | ||
real(kind=fp), | intent(out), | dimension(*) | :: | dedrho | ||
real(kind=fp), | intent(out), | dimension(*) | :: | dedsigma | ||
real(kind=fp), | intent(out), | dimension(*) | :: | dedtau | ||
real(kind=fp), | intent(out), | dimension(*) | :: | dedlapl |
type functional_t type(xc_f03_func_t), dimension(:), allocatable, private :: functionals_list type(xc_f03_func_info_t), dimension(:), allocatable, private :: functionals_info real(kind=fp), dimension(:), allocatable, private :: coefficients logical :: needgrd = .false. !< toggles calculation of density gradient logical :: needtau = .false. !< toggles calculation of tau (\sum dot_product(\nabla \phi, \nabla \phi)) logical :: needlapl = .false. !< toggles calculation of lapl (\nabla^2 \rho) contains procedure :: add_functional, can_calculate, destroy procedure :: calc_evxc, calc_evfxc, calc_xc end type functional_t