CP2K 2.4 (Revision 12889)
Functions | Variables

xc_xpbe_hole_t_c_lr Namespace Reference

Calculates the exchange energy for the pbe hole model in a truncated coulomb potential, considering the long range part only. Can be used as longrange correction to a truncated Hartree Fock calculation. More...

Functions

subroutine, public xpbe_hole_t_c_lr_lda_info (reference, shortform, needs, max_deriv, error)
 returns various information on the functional
subroutine, public xpbe_hole_t_c_lr_lsd_info (reference, shortform, needs, max_deriv, error)
 returns various information on the functional
subroutine, public xpbe_hole_t_c_lr_lda_eval (rho_set, deriv_set, order, params, error)
 evaluates the pbe-hole exchange in a truncated coulomb potential
subroutine xpbe_hole_t_c_lr_lda_calc (npoints, order, rho, norm_drho, e_0, e_rho, e_ndrho, epsilon_rho, epsilon_norm_drho, sx, R, error)
 intermediate level routine in order to decide which branch has to be taken
subroutine, public xpbe_hole_t_c_lr_lsd_eval (rho_set, deriv_set, order, params, error)
 evaluates the pbe-hole exchange in a truncated coulomb potential
subroutine xpbe_hole_t_c_lr_lsd_calc (npoints, order, rho, norm_drho, e_0, e_rho, e_ndrho, epsilon_rho, epsilon_norm_drho, sx, R, error)
 intermediate level routine in order to decide which branch has to be taken
subroutine, public xpbe_hole_t_c_lr_lda_calc_1 (e_0, e_rho, e_ndrho, rho, ndrho, sscale, sx, R, order)
 low level routine that calculates the energy derivatives in one point
subroutine, public xpbe_hole_t_c_lr_lda_calc_2 (e_0, e_rho, e_ndrho, rho, ndrho, sscale, sx, R, order)
 low level routine that calculates the energy derivatives in one point
REAL(dp) exei (P, Q)
 These functions evaluate products exp(x)*Ei(x) and pi*exp(x)*erfc(sqrt(x)), as well as their derivatives with respect to various combinations of rho and norm_drho.
REAL(dp) dexeirho (P, Q, dPrho, dQrho)
REAL(dp) dexeindrho (P, Q, dPndrho, dQndrho)
REAL(dp) red (rho, ndrho)
REAL(dp) dsdrho (rho, ndrho)
REAL(dp) dsdndrho (rho, ndrho)

Variables

REAL(KIND=dp), parameter a1 = 0.00979681_dp
REAL(KIND=dp), parameter a2 = 0.04108340_dp
REAL(KIND=dp), parameter a3 = 0.18744000_dp
REAL(KIND=dp), parameter a4 = 0.00120824_dp
REAL(KIND=dp), parameter a5 = 0.0347188_dp
REAL(KIND=dp), parameter A = 1.0161144_dp
REAL(KIND=dp), parameter B = -0.37170836_dp
REAL(KIND=dp), parameter C = -0.077215461_dp
REAL(KIND=dp), parameter D = 0.57786348_dp
REAL(KIND=dp), parameter E = -0.051955731_dp
REAL(KIND=dp), parameter F2 = 0.47965830_dp
REAL(KIND=dp), parameter F1 = 6.4753871_dp
REAL(KIND=dp), parameter clda = -0.73855876638202240588423_dp
REAL(KIND=dp), parameter expcutoff = 700.0_dp
REAL(KIND=dp), parameter smax = 8.572844_dp
REAL(KIND=dp), parameter sconst = 18.79622316_dp
REAL(KIND=dp), parameter scutoff = 8.3_dp
REAL(KIND=dp), parameter gcutoff = 0.08_dp
REAL(KIND=dp), parameter g1 = -0.02628417880_dp/E
REAL(KIND=dp), parameter g2 = -0.07117647788_dp/E
REAL(KIND=dp), parameter g3 = 0.08534541323_dp/E
REAL(KIND=dp), parameter g4 = 0.0_dp
REAL(KIND=dp), parameter wcutoff = 14.0_dp
REAL(KIND=dp), parameter EPS_RHO = 0.00000001_dp
CHARACTER(len=*), parameter,
private 
moduleN = 'xc_xpbe_hole_t_c_lr'

Detailed Description

Calculates the exchange energy for the pbe hole model in a truncated coulomb potential, considering the long range part only. Can be used as longrange correction to a truncated Hartree Fock calculation.

History
Manuel Guidon (01.2009) : initial version
Author:
Manuel Guidon (01.2009)

Function Documentation

REAL(dp) xc_xpbe_hole_t_c_lr::dexeindrho ( REAL(dp),intent(in)  P,
REAL(dp),intent(in)  Q,
REAL(dp),intent(in)  dPndrho,
REAL(dp),intent(in)  dQndrho 
) [private]

Definition at line 1248 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc_1(), and xpbe_hole_t_c_lr_lda_calc_2().

Here is the caller graph for this function:

REAL(dp) xc_xpbe_hole_t_c_lr::dexeirho ( REAL(dp),intent(in)  P,
REAL(dp),intent(in)  Q,
REAL(dp),intent(in)  dPrho,
REAL(dp),intent(in)  dQrho 
) [private]

Definition at line 1241 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc_1(), and xpbe_hole_t_c_lr_lda_calc_2().

Here is the caller graph for this function:

REAL(dp) xc_xpbe_hole_t_c_lr::dsdndrho ( REAL(dp),intent(in)  rho,
REAL(dp),intent(in)  ndrho 
) [private]

Definition at line 1273 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc_1(), and xpbe_hole_t_c_lr_lda_calc_2().

Here is the caller graph for this function:

REAL(dp) xc_xpbe_hole_t_c_lr::dsdrho ( REAL(dp),intent(in)  rho,
REAL(dp),intent(in)  ndrho 
) [private]

Definition at line 1264 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc_1(), and xpbe_hole_t_c_lr_lda_calc_2().

Here is the caller graph for this function:

REAL(dp) xc_xpbe_hole_t_c_lr::exei ( REAL(dp),intent(in)  P,
REAL(dp),intent(in)  Q 
) [private]

These functions evaluate products exp(x)*Ei(x) and pi*exp(x)*erfc(sqrt(x)), as well as their derivatives with respect to various combinations of rho and norm_drho.

Parameters:
Q,dQrho,dQndrho,P,dPrho,dPndrhowhere Q = s^2*H*R^2*kf^2, P = 9/4*s^2*H/A and dX = dP(Q)/drho(ndrho)
Note:
  • In order to avoid numerical instabilities, these routines use Taylor- expansions for the above core-products for large arguments.
  • red calculates the reduced gradient in a save way (i.e. using a fixed cutoff EPS_RHO)
History
01.2009 created [Manuel Guidon]
Author:
Manuel Guidon

Definition at line 1198 of file xc_xpbe_hole_t_c_lr.f90.

References EPS_RHO.

Referenced by xpbe_hole_t_c_lr_lda_calc_1(), and xpbe_hole_t_c_lr_lda_calc_2().

Here is the caller graph for this function:

REAL(dp) xc_xpbe_hole_t_c_lr::red ( REAL(dp),intent(in)  rho,
REAL(dp),intent(in)  ndrho 
) [private]

Definition at line 1255 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc_1(), and xpbe_hole_t_c_lr_lda_calc_2().

Here is the caller graph for this function:

subroutine xc_xpbe_hole_t_c_lr::xpbe_hole_t_c_lr_lda_calc ( INTEGER,intent(in)  npoints,
INTEGER,intent(in)  order,
REAL(kind=dp),dimension(1:npoints),intent(inout)  rho,
REAL(kind=dp),dimension(1:npoints),intent(inout)  norm_drho,
REAL(kind=dp),dimension(1:npoints),intent(inout)  e_0,
REAL(kind=dp),dimension(1:npoints),intent(inout)  e_rho,
REAL(kind=dp),dimension(1:npoints),intent(inout)  e_ndrho,
REAL(kind=dp),intent(in)  epsilon_rho,
REAL(kind=dp),intent(in)  epsilon_norm_drho,
REAL(kind=dp),intent(in)  sx,
REAL(kind=dp),intent(in)  R,
TYPE(cp_error_type),intent(inout)  error 
) [private]

intermediate level routine in order to decide which branch has to be taken

Parameters:
npointsnumber of points on the grid
orderorder of the derivatives
rho,norm_drhovalues of density and gradient on the grid
e_0,e_rho,e_ndrhoderivatives of the energy on the grid
epsilon_rho,epsilon_norm_drhocutoffs
sx,Rfunctional parameters
errorvariable to control error logging, stopping,... see module cp_error_handling
Note:
For numerical reasons there are two different branches
History
01.2009 created [Manuel Guidon]
Author:
Manuel Guidon

Definition at line 280 of file xc_xpbe_hole_t_c_lr.f90.

References error, gcutoff, sconst, scutoff, smax, xpbe_hole_t_c_lr_lda_calc_1(), and xpbe_hole_t_c_lr_lda_calc_2().

Referenced by xpbe_hole_t_c_lr_lda_eval().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public xc_xpbe_hole_t_c_lr::xpbe_hole_t_c_lr_lda_calc_1 ( REAL(KIND=dp),intent(inout)  e_0,
REAL(KIND=dp),intent(inout)  e_rho,
REAL(KIND=dp),intent(inout)  e_ndrho,
REAL(KIND=dp),intent(in)  rho,
REAL(KIND=dp),intent(in)  ndrho,
REAL(KIND=dp),intent(in)  sscale,
REAL(KIND=dp),intent(in)  sx,
REAL(KIND=dp),intent(in)  R,
INTEGER,intent(in)  order 
)

low level routine that calculates the energy derivatives in one point

Parameters:
e_0,e_rho,e_ndrhoderivatives of the energy on the grid
rho,ndrhovalues of density and gradient on the grid
sscale,sx,Rfunctional parameters
orderorder of the derivatives
errorvariable to control error logging, stopping,... see module cp_error_handling
History
01.2009 created [Manuel Guidon]
Author:
Manuel Guidon

Definition at line 558 of file xc_xpbe_hole_t_c_lr.f90.

References A, a1, a2, a3, a4, a5, B, C, D, dexeindrho(), dexeirho(), dsdndrho(), dsdrho(), E, exei(), mathlib::expint(), F1, F2, and red().

Referenced by xc_xbr_pbe_lda_hole_t_c_lr::xbr_pbe_lda_hole_tc_lr_lda_calc(), xc_xbr_pbe_lda_hole_t_c_lr::xbr_pbe_lda_hole_tc_lr_lsd_calc(), xpbe_hole_t_c_lr_lda_calc(), and xpbe_hole_t_c_lr_lsd_calc().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public xc_xpbe_hole_t_c_lr::xpbe_hole_t_c_lr_lda_calc_2 ( REAL(KIND=dp),intent(inout)  e_0,
REAL(KIND=dp),intent(inout)  e_rho,
REAL(KIND=dp),intent(inout)  e_ndrho,
REAL(KIND=dp),intent(in)  rho,
REAL(KIND=dp),intent(in)  ndrho,
REAL(KIND=dp),intent(in)  sscale,
REAL(KIND=dp),intent(in)  sx,
REAL(KIND=dp),intent(in)  R,
INTEGER,intent(in)  order 
)

low level routine that calculates the energy derivatives in one point

Parameters:
e_0,e_rho,e_ndrhoderivatives of the energy on the grid
rho,ndrhovalues of density and gradient on the grid
sscale,sx,Rfunctional parameters
orderorder of the derivatives
errorvariable to control error logging, stopping,... see module cp_error_handling
History
01.2009 created [Manuel Guidon]
Author:
Manuel Guidon

Definition at line 927 of file xc_xpbe_hole_t_c_lr.f90.

References A, a1, a2, a3, a4, a5, B, C, D, dexeindrho(), dexeirho(), dsdndrho(), dsdrho(), E, mathconstants::euler, exei(), expcutoff, mathlib::expint(), F1, F2, g1, g2, g3, g4, and red().

Referenced by xpbe_hole_t_c_lr_lda_calc(), and xpbe_hole_t_c_lr_lsd_calc().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public xc_xpbe_hole_t_c_lr::xpbe_hole_t_c_lr_lda_eval ( TYPE(xc_rho_set_type),pointer  rho_set,
TYPE(xc_derivative_set_type),pointer  deriv_set,
INTEGER,intent(in)  order,
TYPE(section_vals_type),pointer  params,
TYPE(cp_error_type),intent(inout)  error 
)

evaluates the pbe-hole exchange in a truncated coulomb potential

Parameters:
rho_setthe density where you want to evaluate the functional
deriv_setplace where to store the functional derivatives (they are added to the derivatives)
orderdegree of the derivative that should be evalated, if positive all the derivatives up to the given degree are evaluated, if negative only the given degree is calculated
paramsinput parameters (scaling,cutoff)
errorvariable to control error logging, stopping,... see module cp_error_handling
Note:
History
01.2009 created [Manuel Guidon]
Author:
Manuel Guidon

Definition at line 160 of file xc_xpbe_hole_t_c_lr.f90.

References CPPostcondition, CPPostconditionNoFail, timings::timeset(), xc_derivative_types::xc_derivative_get(), xc_rho_set_types::xc_rho_set_get(), and xpbe_hole_t_c_lr_lda_calc().

Referenced by xc_derivatives::xc_functional_eval().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public xc_xpbe_hole_t_c_lr::xpbe_hole_t_c_lr_lda_info ( CHARACTER(LEN=*),intent(out),optional  reference,
CHARACTER(LEN=*),intent(out),optional  shortform,
TYPE(xc_rho_cflags_type),intent(inout),optional  needs,
INTEGER,intent(out),optional  max_deriv,
TYPE(cp_error_type),intent(inout)  error 
)

returns various information on the functional

Parameters:
referencestring with the reference of the actual functional
shortformstring with the shortform of the functional name
needsthe components needed by this functional are set to true (does not set the unneeded components to false)
max_derivcontrols the number of derivatives
errorvariable to control error logging, stopping,... see module cp_error_handling
History
01.2009 created [mguidon]
Author:
mguidon

Definition at line 89 of file xc_xpbe_hole_t_c_lr.f90.

subroutine xc_xpbe_hole_t_c_lr::xpbe_hole_t_c_lr_lsd_calc ( INTEGER,intent(in)  npoints,
INTEGER,intent(in)  order,
REAL(kind=dp),dimension(1:npoints),intent(inout)  rho,
REAL(kind=dp),dimension(1:npoints),intent(inout)  norm_drho,
REAL(kind=dp),dimension(1:npoints),intent(inout)  e_0,
REAL(kind=dp),dimension(1:npoints),intent(inout)  e_rho,
REAL(kind=dp),dimension(1:npoints),intent(inout)  e_ndrho,
REAL(kind=dp),intent(in)  epsilon_rho,
REAL(kind=dp),intent(in)  epsilon_norm_drho,
REAL(kind=dp),intent(in)  sx,
REAL(kind=dp),intent(in)  R,
TYPE(cp_error_type),intent(inout)  error 
) [private]

intermediate level routine in order to decide which branch has to be taken

Parameters:
npointsnumber of points on the grid
orderorder of the derivatives
rho,norm_drhovalues of density and gradient on the grid
e_0,e_rho,e_ndrhoderivatives of the energy on the grid
epsilon_rho,epsilon_norm_drhocutoffs
sx,Rfunctional parameters
errorvariable to control error logging, stopping,... see module cp_error_handling
Note:
For numerical reasons there are two different branches. This code calls the lda version applying spin scaling relations
History
01.2009 created [Manuel Guidon]
Author:
Manuel Guidon

Definition at line 486 of file xc_xpbe_hole_t_c_lr.f90.

References error, gcutoff, sconst, scutoff, smax, xpbe_hole_t_c_lr_lda_calc_1(), and xpbe_hole_t_c_lr_lda_calc_2().

Referenced by xpbe_hole_t_c_lr_lsd_eval().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public xc_xpbe_hole_t_c_lr::xpbe_hole_t_c_lr_lsd_eval ( TYPE(xc_rho_set_type),pointer  rho_set,
TYPE(xc_derivative_set_type),pointer  deriv_set,
INTEGER,intent(in)  order,
TYPE(section_vals_type),pointer  params,
TYPE(cp_error_type),intent(inout)  error 
)

evaluates the pbe-hole exchange in a truncated coulomb potential

Parameters:
rho_setthe density where you want to evaluate the functional
deriv_setplace where to store the functional derivatives (they are added to the derivatives)
orderdegree of the derivative that should be evalated, if positive all the derivatives up to the given degree are evaluated, if negative only the given degree is calculated
paramsinput parameters (scaling,cutoff)
errorvariable to control error logging, stopping,... see module cp_error_handling
Note:
History
01.2009 created [Manuel Guidon]
Author:
Manuel Guidon

Definition at line 352 of file xc_xpbe_hole_t_c_lr.f90.

References CPPostcondition, CPPostconditionNoFail, timings::timeset(), xc_derivative_types::xc_derivative_get(), xc_rho_set_types::xc_rho_set_get(), and xpbe_hole_t_c_lr_lsd_calc().

Here is the call graph for this function:

subroutine,public xc_xpbe_hole_t_c_lr::xpbe_hole_t_c_lr_lsd_info ( CHARACTER(LEN=*),intent(out),optional  reference,
CHARACTER(LEN=*),intent(out),optional  shortform,
TYPE(xc_rho_cflags_type),intent(inout),optional  needs,
INTEGER,intent(out),optional  max_deriv,
TYPE(cp_error_type),intent(inout)  error 
)

returns various information on the functional

Parameters:
referencestring with the reference of the actual functional
shortformstring with the shortform of the functional name
needsthe components needed by this functional are set to true (does not set the unneeded components to false)
max_derivcontrols the number of derivatives
errorvariable to control error logging, stopping,... see module cp_error_handling
History
01.2009 created [mguidon]
Author:
mguidon

Definition at line 123 of file xc_xpbe_hole_t_c_lr.f90.


Variable Documentation

REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::A = 1.0161144_dp
REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::a1 = 0.00979681_dp
REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::a2 = 0.04108340_dp
REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::a3 = 0.18744000_dp
REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::a4 = 0.00120824_dp
REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::a5 = 0.0347188_dp
REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::B = -0.37170836_dp
REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::C = -0.077215461_dp
REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::clda = -0.73855876638202240588423_dp

Definition at line 50 of file xc_xpbe_hole_t_c_lr.f90.

REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::D = 0.57786348_dp
REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::E = -0.051955731_dp
REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::EPS_RHO = 0.00000001_dp

Definition at line 69 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by exei().

REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::expcutoff = 700.0_dp

Definition at line 58 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc_2().

REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::F1 = 6.4753871_dp
REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::F2 = 0.47965830_dp
REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::g1 = -0.02628417880_dp/E

Definition at line 62 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc_2().

REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::g2 = -0.07117647788_dp/E

Definition at line 62 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc_2().

REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::g3 = 0.08534541323_dp/E

Definition at line 62 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc_2().

REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::g4 = 0.0_dp

Definition at line 62 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc_2().

REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::gcutoff = 0.08_dp

Definition at line 62 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc(), and xpbe_hole_t_c_lr_lsd_calc().

CHARACTER(len=*),parameter,private xc_xpbe_hole_t_c_lr::moduleN = 'xc_xpbe_hole_t_c_lr'

Definition at line 71 of file xc_xpbe_hole_t_c_lr.f90.

REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::sconst = 18.79622316_dp

Definition at line 59 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc(), and xpbe_hole_t_c_lr_lsd_calc().

REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::scutoff = 8.3_dp

Definition at line 59 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc(), and xpbe_hole_t_c_lr_lsd_calc().

REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::smax = 8.572844_dp

Definition at line 59 of file xc_xpbe_hole_t_c_lr.f90.

Referenced by xpbe_hole_t_c_lr_lda_calc(), and xpbe_hole_t_c_lr_lsd_calc().

REAL(KIND=dp),parameter xc_xpbe_hole_t_c_lr::wcutoff = 14.0_dp

Definition at line 67 of file xc_xpbe_hole_t_c_lr.f90.