Commit df91b524 authored by Daniel Wortmann's avatar Daniel Wortmann

Refactoring of xcpot data type:

-removing of variable icorr, use of member-functions instead
-removal of icorrkeys module
-removal of hybridmix module
-cleanup at several places
parent 663597ac
...@@ -42,14 +42,14 @@ global/constants.f inpgen/element.f inpgen/atom_input.f inpgen/crystal.f inpgen/ ...@@ -42,14 +42,14 @@ global/constants.f inpgen/element.f inpgen/atom_input.f inpgen/crystal.f inpgen/
inpgen/atom_sym.f inpgen/generator.f inpgen/read_record.f inpgen/soc_or_ssdw.f inpgen/symproperties.f inpgen/atom_sym.f inpgen/generator.f inpgen/read_record.f inpgen/soc_or_ssdw.f inpgen/symproperties.f
inpgen/bravais_symm.f inpgen/set_atom_core.f inpgen/spg_gen.f global/triang.f inpgen/bravais_symm.f inpgen/set_atom_core.f inpgen/spg_gen.f global/triang.f
inpgen/closure.f inpgen/lapw_input.f inpgen/struct_input.f inpgen/write_struct.f inpgen/closure.f inpgen/lapw_input.f inpgen/struct_input.f inpgen/write_struct.f
global/hybridmix.f io/calculator.f global/ss_sym.f global/soc_sym.f math/inv3.f io/rw_symfile.f io/calculator.f global/ss_sym.f global/soc_sym.f math/inv3.f io/rw_symfile.f
global/sort.f init/kptgen_hybrid.f init/od_kptsgen.f init/bravais.f init/divi.f init/brzone.f global/sort.f init/kptgen_hybrid.f init/od_kptsgen.f init/bravais.f init/divi.f init/brzone.f
init/kptmop.f init/kpttet.f init/bandstr1.F init/ordstar.f init/fulstar.f init/kprep.f init/kptmop.f init/kpttet.f init/bandstr1.F init/ordstar.f init/fulstar.f init/kprep.f
init/tetcon.f init/kvecon.f init/tetcon.f init/kvecon.f
) )
set(inpgen_F90 io/xsf_io.f90 set(inpgen_F90 io/xsf_io.f90
global/types.F90 global/types_rcmat.F90 global/enpara.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 inpgen/inpgen_help.f90 io/rw_inp.f90 juDFT/juDFT.F90 global/types.F90 global/types_rcmat.F90 global/types_xcpot.F90 global/enpara.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 inpgen/inpgen_help.f90 io/rw_inp.f90 juDFT/juDFT.F90
juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 io/w_inpXML.f90 init/julia.f90 global/utility.F90 juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 io/w_inpXML.f90 init/julia.f90 global/utility.F90
init/compile_descr.F90 io/xmlOutput.F90 init/brzone2.f90) init/compile_descr.F90 io/xmlOutput.F90 init/brzone2.f90)
......
...@@ -86,7 +86,7 @@ CONTAINS ...@@ -86,7 +86,7 @@ CONTAINS
TYPE(t_hybrid) :: hybrid_temp TYPE(t_hybrid) :: hybrid_temp
TYPE(t_oneD) :: oneD_temp TYPE(t_oneD) :: oneD_temp
TYPE(t_wann) :: wann_temp TYPE(t_wann) :: wann_temp
LOGICAL :: l_kpts_temp, l_gga_temp LOGICAL :: l_kpts_temp
INTEGER :: numSpecies INTEGER :: numSpecies
INTEGER :: div(3) INTEGER :: div(3)
INTEGER, ALLOCATABLE :: xmlElectronStates(:,:) INTEGER, ALLOCATABLE :: xmlElectronStates(:,:)
...@@ -236,7 +236,7 @@ CONTAINS ...@@ -236,7 +236,7 @@ CONTAINS
banddos_temp,dimension_temp,cell_temp,sym_temp,xcpot_temp,noco_temp,Jij_temp,& banddos_temp,dimension_temp,cell_temp,sym_temp,xcpot_temp,noco_temp,Jij_temp,&
oneD_temp,hybrid_temp,kpts_temp,enpara_temp,wann_temp,noel_temp,& oneD_temp,hybrid_temp,kpts_temp,enpara_temp,wann_temp,noel_temp,&
namex_temp,relcor_temp,a1_temp,a2_temp,a3_temp,scale_temp,dtild_temp,xmlElectronStates,& namex_temp,relcor_temp,a1_temp,a2_temp,a3_temp,scale_temp,dtild_temp,xmlElectronStates,&
xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,l_kpts_temp,l_gga_temp) xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,l_kpts_temp)
numSpecies = SIZE(speciesRepAtomType) numSpecies = SIZE(speciesRepAtomType)
filename = 'inp_new.xml' filename = 'inp_new.xml'
input_temp%l_f = input%l_f input_temp%l_f = input%l_f
......
...@@ -2,8 +2,6 @@ set(fleur_F77 ${fleur_F77} ...@@ -2,8 +2,6 @@ set(fleur_F77 ${fleur_F77}
global/constants.f global/constants.f
global/differ.f global/differ.f
global/fitchk.f global/fitchk.f
global/hybridmix.f
global/icorrkeys.f
global/nmat_rot.f global/nmat_rot.f
global/od_cylbes.f global/od_cylbes.f
global/od_phasy.f global/od_phasy.f
...@@ -30,5 +28,6 @@ global/qfix.f90 ...@@ -30,5 +28,6 @@ global/qfix.f90
global/radflo.F90 global/radflo.F90
global/types.F90 global/types.F90
global/types_rcmat.F90 global/types_rcmat.F90
global/types_xcpot.F90
global/utility.F90 global/utility.F90
) )
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_hybridmix
IMPLICIT NONE
REAL, PARAMETER :: amix_pbe0 = 0.25
REAL, PARAMETER :: amix_hse = 0.25
REAL, PARAMETER :: omega_hse = 0.11
REAL, PARAMETER :: amix_hf = 1.00
CONTAINS
! functions for variable HSE functional
! if a value for x is given, aMix is overwritten
! return the current value of aMix
REAL FUNCTION aMix_VHSE(x) RESULT (res)
REAL, INTENT(IN), OPTIONAL :: x
REAL, SAVE :: aMix = aMix_HSE
IF ( PRESENT(x) ) aMix = x
res = aMix
END FUNCTION aMix_VHSE
! if a value for x is given, omega is overwritten
! return the current value of omega
REAL FUNCTION omega_VHSE(x) RESULT (res)
REAL, INTENT(IN), OPTIONAL :: x
REAL, SAVE :: omega = omega_HSE
IF ( PRESENT(x) ) omega = x
res = omega
END FUNCTION omega_VHSE
END MODULE m_hybridmix
MODULE m_icorrkeys
INTEGER, PARAMETER :: icorr_exx = -3
INTEGER, PARAMETER :: icorr_pbe0 = 12
INTEGER, PARAMETER :: icorr_hf = -2
!HSE, hybrid exchange functional: J. Chem. Phys. 118, 8207 (2003)
INTEGER, PARAMETER :: icorr_hse = 13
! only local part of HSE
INTEGER, PARAMETER :: icorr_hseloc = 14
! hybrid functional similar to HSE but with variable screening and mixing parameter
INTEGER, PARAMETER :: icorr_vhse = 15
CONTAINS
FUNCTION get_exchange_weight(icorr) result(a_ex)
USE m_hybridmix
USE m_judft
IMPLICIT NONE
INTEGER,INTENT(IN)::icorr
REAL a_ex
SELECT CASE (icorr)
CASE (icorr_pbe0)
a_ex = amix_pbe0
CASE (icorr_hf )
a_ex = amix_hf
CASE ( icorr_hse)
a_ex = aMix_HSE
CASE (icorr_vhse )
a_ex = aMix_VHSE()
CASE DEFAULT
call judft_error('xc functional can not be identified')
END SELECT
END FUNCTION
END MODULE m_icorrkeys
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
MODULE m_types MODULE m_types
USE m_types_rcmat USE m_types_rcmat
USE m_types_xcpot
!************************************************************* !*************************************************************
! This module contains definitions for all kind of types ! This module contains definitions for all kind of types
!************************************************************* !*************************************************************
...@@ -526,14 +527,6 @@ MODULE m_types ...@@ -526,14 +527,6 @@ MODULE m_types
REAL :: phi REAL :: phi
END TYPE t_noco END TYPE t_noco
TYPE t_xcpot
INTEGER :: icorr,igrd
INTEGER,ALLOCATABLE :: icorr_mt(:)
REAL :: gmaxxc
INTEGER :: krla !relativistic corrections
END TYPE t_xcpot
TYPE t_input TYPE t_input
LOGICAL :: strho LOGICAL :: strho
LOGICAL :: cdinf LOGICAL :: cdinf
......
MODULE m_types_xcpot
IMPLICIT NONE
PRIVATE
CHARACTER(len=4),PARAMETER:: xc_names(19)=[&
'l91 ','x-a ','wign','mjw ','hl ','bh ','vwn ','pz ', &
'pw91','pbe ','rpbe','Rpbe','wc ','PBEs', &
'hse ','vhse','lhse','exx ','hf ']
LOGICAL,PARAMETER:: priv_gga(19)=[&
.TRUE.,.FALSE.,.FALSE.,.FALSE.,.FALSE.,.FALSE.,.FALSE.,.FALSE.,&
.TRUE.,.TRUE.,.TRUE.,.TRUE.,.TRUE.,.TRUE.,&
.TRUE.,.TRUE.,.TRUE.,.FALSE.,.FALSE.]
LOGICAL,PARAMETER:: priv_hybrid(19)=[&
.FALSE.,.FALSE.,.FALSE.,.FALSE.,.FALSE.,.FALSE.,.FALSE.,.FALSE.,&
.FALSE.,.FALSE.,.FALSE.,.FALSE.,.FALSE.,.FALSE.,&
.TRUE.,.TRUE.,.TRUE.,.TRUE.,.TRUE.]
REAL, PARAMETER :: amix_pbe0 = 0.25
REAL, PARAMETER :: amix_hse = 0.25
REAL, PARAMETER :: amix_hf = 1.00
INTEGER,PARAMETER:: ILLEGAL_XCPOT=0
TYPE t_xcpot
INTEGER,PRIVATE :: icorr
INTEGER,ALLOCATABLE :: icorr_mt(:)
REAL :: gmaxxc
INTEGER :: krla !relativistic corrections
CONTAINS
PROCEDURE :: is_gga=>xcpot_is_gga
PROCEDURE,NOPASS :: from_name=>xcpot_from_name
PROCEDURE :: init=>xcpot_init
PROCEDURE :: is_hybrid=>xcpot_is_hybrid
PROCEDURE :: is_name=>xcpot_is_name
PROCEDURE :: get_exchange_weight=>xcpot_get_exchange_weight
END TYPE t_xcpot
PUBLIC t_xcpot,ILLEGAL_XCPOT
CONTAINS
PURE INTEGER FUNCTION xcpot_from_name(name)
IMPLICIT NONE
CHARACTER(len=*),INTENT(IN) :: name
INTEGER :: n
xcpot_from_name=ILLEGAL_XCPOT
DO n=1,SIZE(xc_names)
IF (TRIM(ADJUSTL(name))==TRIM(xc_names(n))) xcpot_from_name=n
ENDDO
END FUNCTION xcpot_from_name
SUBROUTINE xcpot_init(xcpot,namex,relcor)
IMPLICIT NONE
CLASS(t_xcpot),INTENT(INOUT) :: xcpot
CHARACTER(len=*),INTENT(IN) :: namex
LOGICAL,INTENT(IN) :: relcor
xcpot%icorr=xcpot%from_name(namex)
xcpot%krla=MERGE(1,0,relcor)
END SUBROUTINE xcpot_init
PURE LOGICAL FUNCTION xcpot_is_name(xcpot,name)
CLASS(t_xcpot),INTENT(IN):: xcpot
CHARACTER(len=*),INTENT(IN) :: name
xcpot_is_name=(xcpot%icorr/=ILLEGAL_XCPOT.AND.xcpot%icorr==xcpot_from_name(name))
END FUNCTION xcpot_is_name
ELEMENTAL LOGICAL FUNCTION xcpot_is_gga(xcpot,icorr)
IMPLICIT NONE
CLASS(t_xcpot),INTENT(IN):: xcpot
INTEGER,OPTIONAL,INTENT(IN):: icorr
IF (PRESENT(icorr)) THEN
xcpot_is_gga=priv_gga(icorr)
ELSE
xcpot_is_gga=priv_gga(xcpot%icorr)
ENDIF
END FUNCTION xcpot_is_gga
ELEMENTAL LOGICAL FUNCTION xcpot_is_hybrid(xcpot,icorr)
IMPLICIT NONE
CLASS(t_xcpot),INTENT(IN):: xcpot
INTEGER,OPTIONAL,INTENT(IN):: icorr
IF (PRESENT(icorr)) THEN
xcpot_is_hybrid=priv_hybrid(icorr)
ELSE
xcpot_is_hybrid=priv_hybrid(xcpot%icorr)
ENDIF
END FUNCTION xcpot_is_hybrid
FUNCTION xcpot_get_exchange_weight(xcpot) RESULT(a_ex)
USE m_judft
IMPLICIT NONE
CLASS(t_xcpot),INTENT(IN):: xcpot
REAL:: a_ex
a_ex=-1
IF (xcpot%is_name("pbe0")) a_ex=amix_pbe0
IF (xcpot%is_name("hf")) a_ex=amix_hf
IF (xcpot%is_name("hse")) a_ex=amix_hse
IF (xcpot%is_name("vhse")) a_ex=amix_hse
IF (a_ex==-1) CALL judft_error('xc functional can not be identified')
END FUNCTION xcpot_get_exchange_weight
END MODULE m_types_xcpot
...@@ -45,8 +45,6 @@ MODULE m_add_vnonlocal ...@@ -45,8 +45,6 @@ MODULE m_add_vnonlocal
USE m_symmetrizeh USE m_symmetrizeh
USE m_wrapper USE m_wrapper
USE m_hsefunctional ,ONLY: exchange_vccvHSE,exchange_ccccHSE USE m_hsefunctional ,ONLY: exchange_vccvHSE,exchange_ccccHSE
USE m_hybridmix
USE m_icorrkeys
USE m_types USE m_types
USE m_io_hybrid USE m_io_hybrid
IMPLICIT NONE IMPLICIT NONE
...@@ -77,7 +75,7 @@ MODULE m_add_vnonlocal ...@@ -77,7 +75,7 @@ MODULE m_add_vnonlocal
! !
! initialize weighting factor for HF exchange part ! initialize weighting factor for HF exchange part
! !
a_ex=get_exchange_weight(xcpot%icorr) a_ex=xcpot%get_exchange_weight()
v_x%l_real=hamovlp%l_real v_x%l_real=hamovlp%l_real
......
...@@ -44,7 +44,6 @@ CONTAINS ...@@ -44,7 +44,6 @@ CONTAINS
USE m_util , ONLY : sphbessel,intgrf,intgrf_init, harmonicsr,primitivef USE m_util , ONLY : sphbessel,intgrf,intgrf_init, harmonicsr,primitivef
USE m_hsefunctional, ONLY : change_coulombmatrix USE m_hsefunctional, ONLY : change_coulombmatrix
USE m_wrapper USE m_wrapper
USE m_icorrkeys
USE m_io_hybrid USE m_io_hybrid
USE m_types USE m_types
...@@ -1127,7 +1126,7 @@ CONTAINS ...@@ -1127,7 +1126,7 @@ CONTAINS
1 DEALLOCATE (qnrm,pqnrm) 1 DEALLOCATE (qnrm,pqnrm)
CALL cpu_TIME(time1) CALL cpu_TIME(time1)
IF ( xcpot%icorr == icorr_hse .OR. xcpot%icorr == icorr_vhse ) THEN IF ( xcpot%is_name("hse") .OR. xcpot%is_name("vhse")) THEN
! !
! The HSE functional is realized subtracting erf/r from ! The HSE functional is realized subtracting erf/r from
! the normal Coulomb matrix ! the normal Coulomb matrix
......
...@@ -69,7 +69,6 @@ ...@@ -69,7 +69,6 @@
USE m_mpi_tags USE m_mpi_tags
#endif #endif
USE m_io_hybrid USE m_io_hybrid
USE m_icorrkeys
USE m_kp_perturbation USE m_kp_perturbation
USE m_types USE m_types
IMPLICIT NONE IMPLICIT NONE
...@@ -324,7 +323,7 @@ endif ...@@ -324,7 +323,7 @@ endif
! are Fourier transformed, so that the exchange can be calculated ! are Fourier transformed, so that the exchange can be calculated
! in Fourier space ! in Fourier space
#ifndef CPP_NOSPMVEC #ifndef CPP_NOSPMVEC
IF ( xcpot%icorr == icorr_hse .OR. xcpot%icorr == icorr_vhse ) THEN IF ( xcpot%is_name("hse") .OR. xcpot%is_name("vhse") ) THEN
iband1 = hybrid%nobd(nkqpt) iband1 = hybrid%nobd(nkqpt)
exch_vv = exch_vv + dynamic_hse_adjustment(& exch_vv = exch_vv + dynamic_hse_adjustment(&
atoms%rmsh,atoms%rmt,atoms%dx,atoms%jri,atoms%jmtd,kpts%bkf(:,ikpt0),ikpt0,kpts%nkptf,& atoms%rmsh,atoms%rmt,atoms%dx,atoms%jri,atoms%jmtd,kpts%bkf(:,ikpt0),ikpt0,kpts%nkptf,&
...@@ -418,7 +417,7 @@ endif ...@@ -418,7 +417,7 @@ endif
! valence-valence-valence-valence exchange ! valence-valence-valence-valence exchange
IF ( xcpot%icorr .NE. icorr_hse .AND. xcpot%icorr .NE. icorr_vhse ) THEN ! no gamma point correction needed for HSE functional IF ( (.not.xcpot%is_name("hse")) .AND. (.not.xcpot%is_name("vhse")) ) THEN ! no gamma point correction needed for HSE functional
IF( zero_order .and. .not. ibs_corr ) THEN IF( zero_order .and. .not. ibs_corr ) THEN
WRITE(6,'(A)') ' Take zero order terms into account.' WRITE(6,'(A)') ' Take zero order terms into account.'
ELSE IF( zero_order .and. ibs_corr ) THEN ELSE IF( zero_order .and. ibs_corr ) THEN
......
...@@ -10,14 +10,13 @@ ...@@ -10,14 +10,13 @@
MODULE m_hsefunctional MODULE m_hsefunctional
USE m_judft USE m_judft
IMPLICIT NONE IMPLICIT NONE
#ifdef __PGI #ifdef __PGI
REAL,EXTERNAL ::erfc REAL,EXTERNAL ::erfc
#endif #endif
! Constant omega of the HSE exchange functional ! Constant omega of the HSE exchange functional
! REAL, PARAMETER :: omega_HSE = 0.11 REAL, PARAMETER :: omega_HSE = 0.11
! Mixing parameter of HSE and PBE exchange
! REAL, PARAMETER :: aMix_HSE = 0.25
! Constant for the maximum number of G points ! Constant for the maximum number of G points
INTEGER, PARAMETER :: maxNoGPts = 50 INTEGER, PARAMETER :: maxNoGPts = 50
...@@ -69,8 +68,7 @@ CONTAINS ...@@ -69,8 +68,7 @@ CONTAINS
! d2Fx_ds2 - second derivative with respect to s ! d2Fx_ds2 - second derivative with respect to s
SUBROUTINE calculateEnhancementFactor(kF, s_inp, F_x, dFx_Ds, d2Fx_Ds2, dFx_dkF, d2Fx_dsdkF) SUBROUTINE calculateEnhancementFactor(kF, s_inp, F_x, dFx_Ds, d2Fx_Ds2, dFx_dkF, d2Fx_dsdkF)
USE m_hybridmix
IMPLICIT NONE IMPLICIT NONE
REAL, INTENT(IN) :: kF, s_inp REAL, INTENT(IN) :: kF, s_inp
...@@ -120,7 +118,7 @@ CONTAINS ...@@ -120,7 +118,7 @@ CONTAINS
! Calculate different helper variables ! Calculate different helper variables
r1_kF = 1.0 / kF r1_kF = 1.0 / kF
omega_kF = omega_VHSE() * r1_kF omega_kF = omega_hse * r1_kF !was omega_VHSE()
omega_kF_Sqr = omega_kF * omega_kF omega_kF_Sqr = omega_kF * omega_kF
! calculate the functions H and F in [3] and its derivatives ! calculate the functions H and F in [3] and its derivatives
...@@ -975,7 +973,6 @@ CONTAINS ...@@ -975,7 +973,6 @@ CONTAINS
potential,muffintin,interstitial) potential,muffintin,interstitial)
USE m_constants USE m_constants
USE m_hybridmix
USE m_olap, ONLY : gptnorm USE m_olap, ONLY : gptnorm
USE m_util, ONLY : sphbessel,pure_intgrf,intgrf_init,intgrf_out,NEGATIVE_EXPONENT_WARNING,NEGATIVE_EXPONENT_ERROR USE m_util, ONLY : sphbessel,pure_intgrf,intgrf_init,intgrf_out,NEGATIVE_EXPONENT_WARNING,NEGATIVE_EXPONENT_ERROR
...@@ -1040,7 +1037,7 @@ CONTAINS ...@@ -1040,7 +1037,7 @@ CONTAINS
sVol = SQRT(vol) sVol = SQRT(vol)
r4Pi_sVol = r4Pi / sVol r4Pi_sVol = r4Pi / sVol
r4Pi_Vol = r4Pi / Vol r4Pi_Vol = r4Pi / Vol
omega = omega_VHSE() omega = omega_hse!omega_VHSE()
r1_omega2 = 1.0 / omega**2 r1_omega2 = 1.0 / omega**2
r1_4omega2 = 0.25 * r1_omega2 r1_4omega2 = 0.25 * r1_omega2
pi_omega2 = pi_const * r1_omega2 pi_omega2 = pi_const * r1_omega2
...@@ -1309,7 +1306,6 @@ CONTAINS ...@@ -1309,7 +1306,6 @@ CONTAINS
potential, fourier_trafo) potential, fourier_trafo)
USE m_constants USE m_constants
USE m_hybridmix
USE m_util, ONLY : sphbessel,pure_intgrf,intgrf_init,intgrf_out,NEGATIVE_EXPONENT_WARNING,NEGATIVE_EXPONENT_ERROR USE m_util, ONLY : sphbessel,pure_intgrf,intgrf_init,intgrf_out,NEGATIVE_EXPONENT_WARNING,NEGATIVE_EXPONENT_ERROR
USE m_trafo, ONLY : symmetrize USE m_trafo, ONLY : symmetrize
...@@ -1403,7 +1399,7 @@ CONTAINS ...@@ -1403,7 +1399,7 @@ CONTAINS
sVol = SQRT(vol) sVol = SQRT(vol)
r4Pi_sVol = r4Pi / sVol r4Pi_sVol = r4Pi / sVol
r4Pi_Vol = r4Pi / Vol r4Pi_Vol = r4Pi / Vol
omega = omega_VHSE() omega = omega_hse!omega_VHSE()
r1_omega2 = 1.0 / omega**2 r1_omega2 = 1.0 / omega**2
r1_4omega2 = 0.25 * r1_omega2 r1_4omega2 = 0.25 * r1_omega2
pi_omega2 = pi_const * r1_omega2 pi_omega2 = pi_const * r1_omega2
...@@ -2599,8 +2595,7 @@ CONTAINS ...@@ -2599,8 +2595,7 @@ CONTAINS
FUNCTION calculate_coefficients(rmsh,lmax,ncut,fac) RESULT (d_ln) FUNCTION calculate_coefficients(rmsh,lmax,ncut,fac) RESULT (d_ln)
USE m_constants USE m_constants
USE m_hybridmix
IMPLICIT NONE IMPLICIT NONE
REAL, INTENT(IN) :: rmsh(:) REAL, INTENT(IN) :: rmsh(:)
...@@ -2631,7 +2626,7 @@ CONTAINS ...@@ -2631,7 +2626,7 @@ CONTAINS
r1_spi = 1.0 / SQRT( pi_const ) r1_spi = 1.0 / SQRT( pi_const )
! Calculate x and x^2 and the functions erfc(x) and exp(x^2) ! Calculate x and x^2 and the functions erfc(x) and exp(x^2)
rx = omega_VHSE() * rmsh rx = omega_HSe * rmsh
x2 = rx**2 x2 = rx**2
erfc_x = erfc(rx) erfc_x = erfc(rx)
exp_x2 = EXP(-x2) exp_x2 = EXP(-x2)
......
...@@ -54,8 +54,6 @@ MODULE m_hsfock ...@@ -54,8 +54,6 @@ MODULE m_hsfock
USE m_symmetrizeh USE m_symmetrizeh
USE m_wrapper USE m_wrapper
USE m_hsefunctional ,ONLY: exchange_vccvHSE,exchange_ccccHSE USE m_hsefunctional ,ONLY: exchange_vccvHSE,exchange_ccccHSE
USE m_hybridmix
USE m_icorrkeys
USE m_types USE m_types
USE m_io_hybrid USE m_io_hybrid
IMPLICIT NONE IMPLICIT NONE
...@@ -133,7 +131,7 @@ MODULE m_hsfock ...@@ -133,7 +131,7 @@ MODULE m_hsfock
! !
! initialize weighting factor for HF exchange part ! initialize weighting factor for HF exchange part
! !
a_ex=get_exchange_weight(xcpot%icorr) a_ex=xcpot%get_exchange_weight()
! write k1,k2,k3 in gpt ! write k1,k2,k3 in gpt
...@@ -205,7 +203,7 @@ MODULE m_hsfock ...@@ -205,7 +203,7 @@ MODULE m_hsfock
! calculate contribution from the core states to the HF exchange ! calculate contribution from the core states to the HF exchange
IF ( xcpot%icorr.eq.icorr_hse .OR. xcpot%icorr.eq.icorr_vhse ) THEN IF ( xcpot%is_name("hse") .OR. xcpot%is_name("vhse") ) THEN
#ifdef CPP_NEVER #ifdef CPP_NEVER
CALL exchange_vccvHSE(& CALL exchange_vccvHSE(&
& nk,atoms,& & nk,atoms,&
......
...@@ -11,7 +11,6 @@ CONTAINS ...@@ -11,7 +11,6 @@ CONTAINS
USE m_eig66_io USE m_eig66_io
USE m_apws USE m_apws
USE m_io_hybrid USE m_io_hybrid
USE m_icorrkeys
IMPLICIT NONE IMPLICIT NONE
TYPE(t_xcpot),INTENT(IN) :: xcpot TYPE(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_mpi),INTENT(IN) :: mpi TYPE(t_mpi),INTENT(IN) :: mpi
...@@ -49,7 +48,7 @@ CONTAINS ...@@ -49,7 +48,7 @@ CONTAINS
!Check if new non-local potential shall be generated !Check if new non-local potential shall be generated
hybrid%l_subvxc = ( hybrid%l_hybrid.AND.xcpot%icorr /= icorr_exx ) hybrid%l_subvxc = ( hybrid%l_hybrid.AND..not.xcpot%is_name("exx") )
!If this is the first iteration loop we can not calculate a new !If this is the first iteration loop we can not calculate a new
!non-local potential !non-local potential
IF (.NOT.ALLOCATED(v%pw)) THEN IF (.NOT.ALLOCATED(v%pw)) THEN
......
...@@ -40,7 +40,6 @@ CONTAINS ...@@ -40,7 +40,6 @@ CONTAINS
USE m_util, ONLY : intgrf_init,intgrf,rorderpf USE m_util, ONLY : intgrf_init,intgrf,rorderpf
USE m_read_core USE m_read_core
USE m_wrapper USE m_wrapper
USE m_icorrkeys
USE m_eig66_io USE m_eig66_io
USE m_types USE m_types
IMPLICIT NONE IMPLICIT NONE
...@@ -127,7 +126,7 @@ CONTAINS ...@@ -127,7 +126,7 @@ CONTAINS
IF ( mpi%irank == 0 ) WRITE(6,'(//A,I2,A)') '### subroutine: mixedbasis ###' IF ( mpi%irank == 0 ) WRITE(6,'(//A,I2,A)') '### subroutine: mixedbasis ###'
exx = ( xcpot%icorr .EQ. icorr_exx ) exx = xcpot%is_name("exx")
if (exx) call judft_erro