Commit 90330e62 authored by Matthias Redies's avatar Matthias Redies

rename hybrid => hybinp

parent 3ac4539e
......@@ -298,25 +298,25 @@
mpbasis%g_cutoff = input%rkmax - 0.5
mpbasis%linear_dep_tol = 1e-4
taual_hyb = atoms%taual
ALLOCATE(hybrid%lcutwf(atoms%ntype))
ALLOCATE(hybrid%lcutm1(atoms%ntype))
ALLOCATE(hybrid%select1(4,atoms%ntype))
hybrid%lcutwf = atoms%lmax - atoms%lmax / 10
hybrid%ewaldlambda = 3
hybrid%lexp = 16
hybrid%lcutm1 = 4
hybrid%select1(1,:) = 4
hybrid%select1(2,:) = 0
hybrid%select1(3,:) = 4
hybrid%select1(4,:) = 2
ALLOCATE(hybinp%lcutwf(atoms%ntype))
ALLOCATE(hybinp%lcutm1(atoms%ntype))
ALLOCATE(hybinp%select1(4,atoms%ntype))
hybinp%lcutwf = atoms%lmax - atoms%lmax / 10
hybinp%ewaldlambda = 3
hybinp%lexp = 16
hybinp%lcutm1 = 4
hybinp%select1(1,:) = 4
hybinp%select1(2,:) = 0
hybinp%select1(3,:) = 4
hybinp%select1(4,:) = 2
bands = max( nint(input%zelec)*10, 60 )
l_gamma = .false.
hybrid%l_hybrid = l_hyb
hybinp%l_hybrid = l_hyb
IF (l_hyb) THEN
input%ellow = input%ellow - 2.0
input%elup = input%elup + 10.0
input%gw_neigd = bands
hybrid%bands1 = ceiling(0.75*bands)
hybinp%bands1 = ceiling(0.75*bands)
l_gamma = .true.
input%minDistance = 1.0e-5
ELSE
......
......@@ -233,7 +233,7 @@ CONTAINS
ALLOCATE(noel(atoms%ntype),atomTypeSpecies(atoms%ntype),speciesRepAtomType(atoms%ntype))
ALLOCATE(xmlElectronStates(29,atoms%ntype),xmlPrintCoreStates(29,atoms%ntype))
ALLOCATE(xmlCoreOccs(1,1,1),atoms%label(atoms%nat))
ALLOCATE(hybrid%lcutm1(atoms%ntype),hybrid%lcutwf(atoms%ntype),hybrid%select1(4,atoms%ntype))
ALLOCATE(hybinp%lcutm1(atoms%ntype),hybinp%lcutwf(atoms%ntype),hybinp%select1(4,atoms%ntype))
filename = 'inpConverted.xml'
xmlElectronStates = noState_const
xmlPrintCoreStates = .FALSE.
......@@ -245,15 +245,15 @@ CONTAINS
atomTypeSpecies(iType) = iType
speciesRepAtomType(iType) = iType
hybrid%lcutm1(iType) = 4
hybrid%lcutwf(iType) = atoms%lmax(iType) - atoms%lmax(iType) / 10
hybrid%select1(:,iType) = (/4, 0, 4, 2 /)
hybinp%lcutm1(iType) = 4
hybinp%lcutwf(iType) = atoms%lmax(iType) - atoms%lmax(iType) / 10
hybinp%select1(:,iType) = (/4, 0, 4, 2 /)
END DO
mpbasis%g_cutoff = input%rkmax - 0.5
mpbasis%linear_dep_tol = 1.0e-4
hybrid%ewaldlambda = 3
hybrid%lexp = 16
hybrid%bands1 = max( nint(input%zelec)*10, 60 )
hybinp%ewaldlambda = 3
hybinp%lexp = 16
hybinp%bands1 = max( nint(input%zelec)*10, 60 )
numSpecies = SIZE(speciesRepAtomType)
ALLOCATE(atoms%speciesName(numSpecies))
......
......@@ -169,8 +169,8 @@ SUBROUTINE initParallelProcesses(atoms,vacuum,input,stars,sliceplot,banddos,&
ALLOCATE(oneD%igfft1(0:oneD%odd%nn2d-1,2),oneD%pgfft1(0:oneD%odd%nn2d-1))
ALLOCATE(mpbasis%num_radfun_per_l(0:atoms%lmaxd,atoms%ntype))
ALLOCATE(hybrid%select1(4,atoms%ntype),hybrid%lcutm1(atoms%ntype))
ALLOCATE(hybrid%lcutwf(atoms%ntype))
ALLOCATE(hybinp%select1(4,atoms%ntype),hybinp%lcutm1(atoms%ntype))
ALLOCATE(hybinp%lcutwf(atoms%ntype))
IF (xcpot%needs_grad()) THEN
ALLOCATE (stars%ft2_gfx(0:stars%kimax2),stars%ft2_gfy(0:stars%kimax2))
......
......@@ -17,20 +17,20 @@
!
! calculate d_wgn
!
ALLOCATE (hybrid%d_wgn2(-atoms%lmaxd:atoms%lmaxd,-atoms%lmaxd:atoms%lmaxd,0:atoms%lmaxd,sym%nsym))
CALL d_wigner(sym%nop,sym%mrot,cell%bmat,atoms%lmaxd,hybrid%d_wgn2(:,:,1:,:sym%nop))
hybrid%d_wgn2(:,:,0,:) = 1
ALLOCATE (hybinp%d_wgn2(-atoms%lmaxd:atoms%lmaxd,-atoms%lmaxd:atoms%lmaxd,0:atoms%lmaxd,sym%nsym))
CALL d_wigner(sym%nop,sym%mrot,cell%bmat,atoms%lmaxd,hybinp%d_wgn2(:,:,1:,:sym%nop))
hybinp%d_wgn2(:,:,0,:) = 1
DO isym = sym%nop+1,sym%nsym
iisym = isym - sym%nop
DO l = 0,atoms%lmaxd
DO m2 = -l,l
DO m1 = -l,-1
cdum = hybrid%d_wgn2( m1,m2,l,iisym)
hybrid%d_wgn2( m1,m2,l,isym) = hybrid%d_wgn2(-m1,m2,l,iisym)*(-1)**m1
hybrid%d_wgn2(-m1,m2,l,isym) = cdum *(-1)**m1
cdum = hybinp%d_wgn2( m1,m2,l,iisym)
hybinp%d_wgn2( m1,m2,l,isym) = hybinp%d_wgn2(-m1,m2,l,iisym)*(-1)**m1
hybinp%d_wgn2(-m1,m2,l,isym) = cdum *(-1)**m1
END DO
hybrid%d_wgn2(0,m2,l,isym) = hybrid%d_wgn2(0,m2,l,iisym)
hybinp%d_wgn2(0,m2,l,isym) = hybinp%d_wgn2(0,m2,l,iisym)
END DO
END DO
END DO
......@@ -812,9 +812,9 @@ CONTAINS
IF(numberNodes.EQ.1) THEN
xcpot%gmaxxc = evaluateFirstOnly(xmlGetAttributeValue(xPathA))
END IF
hybrid%l_hybrid=xcpot%is_hybrid()
hybinp%l_hybrid=xcpot%is_hybrid()
ALLOCATE(hybrid%lcutm1(atoms%ntype),hybrid%lcutwf(atoms%ntype),hybrid%select1(4,atoms%ntype))
ALLOCATE(hybinp%lcutm1(atoms%ntype),hybinp%lcutwf(atoms%ntype),hybinp%select1(4,atoms%ntype))
obsolete%lwb=.FALSE.
IF (xcpot%needs_grad()) THEN
......@@ -828,19 +828,19 @@ CONTAINS
mpbasis%g_cutoff = input%rkmax - 0.5
mpbasis%linear_dep_tol = 1.0e-4
hybrid%ewaldlambda = 3
hybrid%lexp = 16
hybrid%bands1 = DIMENSION%neigd
hybinp%ewaldlambda = 3
hybinp%lexp = 16
hybinp%bands1 = DIMENSION%neigd
numberNodes = xmlGetNumberOfNodes('/fleurInput/calculationSetup/prodBasis')
IF (numberNodes==0) THEN
IF (hybrid%l_hybrid) CALL judft_error("Mixed product basis input missing in inp.xml")
IF (hybinp%l_hybrid) CALL judft_error("Mixed product basis input missing in inp.xml")
ELSE
mpbasis%g_cutoff=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@gcutm'))
mpbasis%linear_dep_tol=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@tolerance'))
hybrid%ewaldlambda=evaluateFirstIntOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@ewaldlambda'))
hybrid%lexp=evaluateFirstIntOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@lexp'))
hybrid%bands1=evaluateFirstIntOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@bands'))
hybinp%ewaldlambda=evaluateFirstIntOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@ewaldlambda'))
hybinp%lexp=evaluateFirstIntOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@lexp'))
hybinp%bands1=evaluateFirstIntOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@bands'))
ENDIF
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......@@ -1152,7 +1152,7 @@ CONTAINS
speciesEParams(3) = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/energyParameters/@f'))
! Parameters for hybrid functionals
IF (hybrid%l_hybrid) THEN
IF (hybinp%l_hybrid) THEN
WRITE(xPathA,*) '/fleurInput/atomSpecies/species[',iSpecies,']/prodBasis'
numberNodes = xmlGetNumberOfNodes(TRIM(ADJUSTL(xPathA)))
IF (numberNodes.NE.1) CALL judft_error("Parameters for mixed basis are missing for some specified")
......@@ -1375,13 +1375,13 @@ CONTAINS
END DO
END DO
!Hybrid functional stuff
hybrid%lcutm1(iType) = 4
hybrid%lcutwf(iType) = atoms%lmax(iType) - atoms%lmax(iType) / 10
hybrid%select1(:,iType) = (/4, 0, 4, 2 /)
IF (hybrid%l_hybrid) THEN
hybrid%lcutm1(iType)=lcutm
hybrid%lcutwf(iType)=lcutwf
hybrid%select1(:,iType)=hybSelect
hybinp%lcutm1(iType) = 4
hybinp%lcutwf(iType) = atoms%lmax(iType) - atoms%lmax(iType) / 10
hybinp%select1(:,iType) = (/4, 0, 4, 2 /)
IF (hybinp%l_hybrid) THEN
hybinp%lcutm1(iType)=lcutm
hybinp%lcutwf(iType)=lcutwf
hybinp%select1(:,iType)=hybSelect
ENDIF
! Explicit xc functional
SELECT TYPE(xcpot)
......
MODULE m_types_hybrid
MODULE m_types_hybinp
IMPLICIT NONE
......@@ -104,4 +104,4 @@ contains
END FUNCTION gptnorm
END MODULE m_types_hybrid
END MODULE m_types_hybinp
......@@ -19,7 +19,7 @@ CONTAINS
!> The matrices generated and diagonalized here are of type m_mat as defined in m_types_mat.
!>@author D. Wortmann
SUBROUTINE eigen(mpi,stars,sphhar,atoms,xcpot,sym,kpts,vacuum,input,&
cell,enpara,banddos,noco,oneD,mpdata,hybrid,iter,eig_id,results,inden,v,vx,hub1)
cell,enpara,banddos,noco,oneD,mpdata,hybinp,iter,eig_id,results,inden,v,vx,hub1)
#include"cpp_double.h"
USE m_types
......@@ -31,7 +31,7 @@ CONTAINS
!USE m_hsefunctional
USE m_mt_setup
USE m_util
USE m_io_hybrid
USE m_io_hybinp
!USE m_icorrkeys
USE m_eig66_io, ONLY : open_eig, write_eig, close_eig,read_eig
USE m_xmlOutput
......@@ -49,7 +49,7 @@ CONTAINS
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_mpdata), intent(inout) :: mpdata
TYPE(t_hybrid),INTENT(INOUT) :: hybrid
TYPE(t_hybinp),INTENT(INOUT) :: hybinp
TYPE(t_enpara),INTENT(INOUT) :: enpara
TYPE(t_input),INTENT(IN) :: input
TYPE(t_vacuum),INTENT(IN) :: vacuum
......@@ -101,7 +101,7 @@ CONTAINS
CLASS(t_mat), ALLOCATABLE :: hmat,smat
CLASS(t_mat), ALLOCATABLE :: smat_unfold !used for unfolding bandstructure
! Variables for HF or hybrid functional calculation
! Variables for HF or hybinp functional calculation
INTEGER :: comm(kpts%nkpt),irank2(kpts%nkpt),isize2(kpts%nkpt), dealloc_stat
character(len=300) :: errmsg
......@@ -143,27 +143,27 @@ CONTAINS
! Set up lapw list
CALL lapw%init(input,noco, kpts,atoms,sym,nk,cell,l_zref, mpi)
call timestart("Setup of H&S matrices")
CALL eigen_hssetup(jsp,mpi,hybrid,enpara,input,vacuum,noco,sym,&
CALL eigen_hssetup(jsp,mpi,hybinp,enpara,input,vacuum,noco,sym,&
stars,cell,sphhar,atoms,ud,td,v,lapw,l_real,smat,hmat)
CALL timestop("Setup of H&S matrices")
nvBuffer(nk,jsp) = lapw%nv(jsp)
IF(hybrid%l_hybrid.OR.input%l_rdmft) THEN
IF(hybinp%l_hybrid.OR.input%l_rdmft) THEN
! Write overlap matrix smat to direct access file olap
! print *,"Wrong overlap matrix used, fix this later"
CALL write_olap(smat,(jsp-1)*kpts%nkpt+nk) ! Note: At this moment this only works without MPI parallelization
END IF ! hybrid%l_hybrid.OR.input%l_rdmft
END IF ! hybinp%l_hybrid.OR.input%l_rdmft
IF(hybrid%l_hybrid) THEN
IF (hybrid%l_addhf) CALL add_Vnonlocal(nk,lapw,atoms,hybrid,input,kpts,jsp,results,xcpot,noco,hmat)
IF(hybinp%l_hybrid) THEN
IF (hybinp%l_addhf) CALL add_Vnonlocal(nk,lapw,atoms,hybinp,input,kpts,jsp,results,xcpot,noco,hmat)
IF(hybrid%l_subvxc) THEN
CALL subvxc(lapw,kpts%bk(:,nk),input,jsp,v%mt(:,0,:,:),atoms,ud,mpdata,hybrid,enpara%el0,enpara%ello0,&
IF(hybinp%l_subvxc) THEN
CALL subvxc(lapw,kpts%bk(:,nk),input,jsp,v%mt(:,0,:,:),atoms,ud,mpdata,hybinp,enpara%el0,enpara%ello0,&
sym,cell,sphhar,stars,xcpot,mpi,oneD,hmat,vx)
END IF
END IF ! hybrid%l_hybrid
END IF ! hybinp%l_hybrid
l_wu=.FALSE.
ne_all=input%neig
......@@ -277,11 +277,11 @@ CONTAINS
END DO
END IF
!IF (hybrid%l_hybrid.OR.hybrid%l_calhf) CALL close_eig(eig_id)
!IF (hybinp%l_hybrid.OR.hybinp%l_calhf) CALL close_eig(eig_id)
IF( input%jspins .EQ. 1 .AND. hybrid%l_hybrid ) THEN
IF( input%jspins .EQ. 1 .AND. hybinp%l_hybrid ) THEN
results%te_hfex%valence = 2*results%te_hfex%valence
IF(hybrid%l_calhf) results%te_hfex%core = 2*results%te_hfex%core
IF(hybinp%l_calhf) results%te_hfex%core = 2*results%te_hfex%core
END IF
enpara%epara_min = MINVAL(enpara%el0)
enpara%epara_min = MIN(MINVAL(enpara%ello0),enpara%epara_min)
......
......@@ -15,7 +15,7 @@ CONTAINS
!! 4. The vacuum part is added (in hsvac())
!! 5. The matrices are copied to the final matrix, in the noco-case the full matrix is constructed from the 4-parts.
SUBROUTINE eigen_hssetup(isp,mpi,hybrid,enpara,input,vacuum,noco,sym,&
SUBROUTINE eigen_hssetup(isp,mpi,hybinp,enpara,input,vacuum,noco,sym,&
stars,cell,sphhar,atoms,ud,td,v,lapw,l_real,smat_final,hmat_final)
USE m_types
USE m_types_mpimat
......@@ -29,7 +29,7 @@ CONTAINS
INTEGER,INTENT(IN) :: isp
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_hybrid),INTENT(IN) :: hybrid
TYPE(t_hybinp),INTENT(IN) :: hybinp
TYPE(t_enpara),INTENT(IN) :: enpara
TYPE(t_input),INTENT(IN) :: input
TYPE(t_vacuum),INTENT(IN) :: vacuum
......
......@@ -8,7 +8,7 @@ include("../cmake/Generate_Schema.cmake")
add_library(fleurinput STATIC
fleurinput_read_xml.f90 fleurinput_mpi_bc.f90
types_fleurinput_base.f90 types_input.f90 types_oneD.f90
types_coreSpecInput.f90 types_hybrid.f90 types_noco.f90
types_coreSpecInput.f90 types_hybinp.f90 types_noco.f90
types_vacuum.f90 types_banddos.f90 types_wannier.f90
types_cell.f90 types_kpts.f90 types_fleurinput.f90
types_sliceplot.f90 types_sym.f90 types_atoms.F90
......
......@@ -3,7 +3,7 @@ MODULE m_fleurinput_mpi_bc
IMPLICIT NONE
CONTAINS
SUBROUTINE fleurinput_mpi_bc(cell,sym,atoms,input,noco,vacuum,field,&
sliceplot,banddos,hybrid,oneD,coreSpecInput,wann,&
sliceplot,banddos,hybinp,oneD,coreSpecInput,wann,&
xcpot,forcetheo_data,kpts,enparaXML,mpi_comm,rank)
USE m_types_xml
......@@ -16,7 +16,7 @@ CONTAINS
TYPE(t_field),INTENT(INOUT)::field
TYPE(t_sliceplot),INTENT(INOUT)::sliceplot
TYPE(t_banddos),INTENT(INOUT)::banddos
TYPE(t_hybrid),INTENT(INOUT)::hybrid
TYPE(t_hybinp),INTENT(INOUT)::hybinp
TYPE(t_oneD),INTENT(INOUT)::oneD
TYPE(t_coreSpecInput),INTENT(INOUT)::coreSpecInput
TYPE(t_wann),INTENT(INOUT)::wann
......@@ -37,7 +37,7 @@ CONTAINS
CALL field%mpi_bc(mpi_comm,rank)
CALL sliceplot%mpi_bc(mpi_comm,rank)
CALL banddos%mpi_bc(mpi_comm,rank)
CALL hybrid%mpi_bc(mpi_comm,rank)
CALL hybinp%mpi_bc(mpi_comm,rank)
CALL oneD%mpi_bc(mpi_comm,rank)
CALL coreSpecInput%mpi_bc(mpi_comm,rank)
CALL wann%mpi_bc(mpi_comm,rank)
......
......@@ -3,7 +3,7 @@ MODULE m_fleurinput_read_xml
IMPLICIT NONE
CONTAINS
SUBROUTINE fleurinput_read_xml(cell,sym,atoms,input,noco,vacuum,field,&
sliceplot,banddos,hybrid,oneD,coreSpecInput,wann,&
sliceplot,banddos,hybinp,oneD,coreSpecInput,wann,&
xcpot,forcetheo_data,kpts,enparaXML)
USE m_types_xml
......@@ -16,7 +16,7 @@ CONTAINS
TYPE(t_field),INTENT(OUT),OPTIONAL::field
TYPE(t_sliceplot),INTENT(OUT),OPTIONAL::sliceplot
TYPE(t_banddos),INTENT(OUT),OPTIONAL::banddos
TYPE(t_hybrid),INTENT(OUT),OPTIONAL::hybrid
TYPE(t_hybinp),INTENT(OUT),OPTIONAL::hybinp
TYPE(t_oneD),INTENT(OUT),OPTIONAL::oneD
TYPE(t_coreSpecInput),INTENT(OUT),OPTIONAL::coreSpecInput
TYPE(t_wann),INTENT(OUT),OPTIONAL::wann
......@@ -40,7 +40,7 @@ CONTAINS
if (present(field)) call field%read_xml(xml)
if (present(sliceplot)) call sliceplot%read_xml(xml)
if (present(banddos)) call banddos%read_xml(xml)
if (present(hybrid)) call hybrid%read_xml(xml)
if (present(hybinp)) call hybinp%read_xml(xml)
if (present(oneD)) call oneD%read_xml(xml)
if (present(coreSpecInput)) call coreSpecInput%read_xml(xml)
if (present(wann)) call wann%read_xml(xml)
......
......@@ -15,7 +15,7 @@ MODULE m_types_fleurinput
USE m_types_field
USE m_types_sliceplot
USE m_types_banddos
USE m_types_hybrid
USE m_types_hybinp
USE m_types_oneD
USE m_types_coreSpecInput
USE m_types_wannier
......@@ -28,7 +28,7 @@ MODULE m_types_fleurinput
CONTAINS
!Subroutine does nothing, only here for copy-paste code...
SUBROUTINE dummy_subroutine_that_should_never_be_used(cell,sym,atoms,input,noco,vacuum,field,&
sliceplot,banddos,hybrid,oneD,coreSpecInput,wann,&
sliceplot,banddos,hybinp,oneD,coreSpecInput,wann,&
xcpot,forcetheo_data,kpts,enparaXML)
TYPE(t_cell),INTENT(IN)::cell
TYPE(t_sym),INTENT(IN)::sym
......@@ -39,7 +39,7 @@ CONTAINS
TYPE(t_field),INTENT(IN)::field
TYPE(t_sliceplot),INTENT(IN)::sliceplot
TYPE(t_banddos),INTENT(IN)::banddos
TYPE(t_hybrid),INTENT(IN)::hybrid
TYPE(t_hybinp),INTENT(IN)::hybinp
TYPE(t_oneD),INTENT(IN)::oneD
TYPE(t_coreSpecInput),INTENT(IN)::coreSpecInput
TYPE(t_wann),INTENT(IN)::wann
......
......@@ -4,13 +4,13 @@
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_types_hybrid
MODULE m_types_hybinp
USE m_judft
USE m_types_fleurinput_base
IMPLICIT NONE
PRIVATE
TYPE, EXTENDS(t_fleurinput_base):: t_hybrid
TYPE, EXTENDS(t_fleurinput_base):: t_hybinp
LOGICAL :: l_hybrid = .false.
LOGICAL :: l_subvxc = .false.
LOGICAL :: l_calhf = .false.
......@@ -35,16 +35,16 @@ MODULE m_types_hybrid
INTEGER, ALLOCATABLE :: nobd(:, :)
REAL, ALLOCATABLE :: div_vv(:, :, :)
CONTAINS
PROCEDURE :: read_xml => read_xml_hybrid
PROCEDURE :: mpi_bc => mpi_bc_hybrid
END TYPE t_hybrid
PUBLIC t_hybrid
PROCEDURE :: read_xml => read_xml_hybinp
PROCEDURE :: mpi_bc => mpi_bc_hybinp
END TYPE t_hybinp
PUBLIC t_hybinp
CONTAINS
SUBROUTINE mpi_bc_hybrid(this, mpi_comm, irank)
SUBROUTINE mpi_bc_hybinp(this, mpi_comm, irank)
USE m_mpi_bc_tool
CLASS(t_hybrid), INTENT(INOUT)::this
CLASS(t_hybinp), INTENT(INOUT)::this
INTEGER, INTENT(IN):: mpi_comm
INTEGER, INTENT(IN), OPTIONAL::irank
INTEGER ::rank
......@@ -93,10 +93,10 @@ CONTAINS
CALL mpi_bc(this%nobd, rank, mpi_comm)
CALL mpi_bc(this%div_vv, rank, mpi_comm)
END SUBROUTINE mpi_bc_hybrid
SUBROUTINE read_xml_hybrid(this, xml)
END SUBROUTINE mpi_bc_hybinp
SUBROUTINE read_xml_hybinp(this, xml)
USE m_types_xml
CLASS(t_hybrid), INTENT(INout):: this
CLASS(t_hybinp), INTENT(INout):: this
TYPE(t_xml), INTENT(in) :: xml
INTEGER::numberNodes, ntype, itype
......@@ -136,5 +136,5 @@ CONTAINS
else
this%l_hybrid = .False.
endif
END SUBROUTINE read_xml_hybrid
END MODULE m_types_hybrid
END SUBROUTINE read_xml_hybinp
END MODULE m_types_hybinp
......@@ -48,7 +48,7 @@ MODULE m_types_sym
INTEGER, ALLOCATABLE ::invsat(:)
!
! Hybrid specific stuff TODO
! hybinp specific stuff TODO
!
INTEGER ::nsymt
INTEGER :: nsym
......
MODULE m_hf_init
!
! preparations for HF and hybrid functional calculation
! preparations for HF and hybinp functional calculation
!
CONTAINS
SUBROUTINE hf_init(mpdata, hybrid, atoms, input, hybdat)
SUBROUTINE hf_init(mpdata, hybinp, atoms, input, hybdat)
USE m_types
USE m_hybrid_core
USE m_hybinp_core
USE m_util
use m_intgrf
USE m_io_hybrid
USE m_io_hybinp
USE m_types_hybdat
IMPLICIT NONE
TYPE(t_mpdata), intent(inout) :: mpdata
TYPE(t_hybrid), INTENT(INOUT) :: hybrid
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_input), INTENT(IN) :: input
TYPE(t_hybdat), INTENT(OUT) :: hybdat
......@@ -43,7 +43,7 @@ CONTAINS
! pre-calculate gaunt coefficients
hybdat%maxfac = max(2*atoms%lmaxd + maxval(hybrid%lcutm1) + 1, 2*hybdat%lmaxcd + 2*atoms%lmaxd + 1)
hybdat%maxfac = max(2*atoms%lmaxd + maxval(hybinp%lcutm1) + 1, 2*hybdat%lmaxcd + 2*atoms%lmaxd + 1)
allocate(hybdat%fac(0:hybdat%maxfac), hybdat%sfac(0:hybdat%maxfac), stat=ok, source=0.0)
IF (ok /= 0) call judft_error('eigen_hf: failure allocation fac,hybdat%sfac')
hybdat%fac(0) = 1
......@@ -53,14 +53,14 @@ CONTAINS
hybdat%sfac(i) = hybdat%sfac(i - 1)*sqrt(i*1.0) ! hybdat%sfac(i) = sqrt(i!)
END DO
ALLOCATE(hybdat%gauntarr(2, 0:atoms%lmaxd, 0:atoms%lmaxd, 0:maxval(hybrid%lcutm1),&
-atoms%lmaxd:atoms%lmaxd, -maxval(hybrid%lcutm1):maxval(hybrid%lcutm1)),&
ALLOCATE(hybdat%gauntarr(2, 0:atoms%lmaxd, 0:atoms%lmaxd, 0:maxval(hybinp%lcutm1),&
-atoms%lmaxd:atoms%lmaxd, -maxval(hybinp%lcutm1):maxval(hybinp%lcutm1)),&
stat=ok, source=0.0)
IF (ok /= 0) call judft_error('eigen: failure allocation hybdat%gauntarr')
DO l2 = 0, atoms%lmaxd
DO l1 = 0, atoms%lmaxd
DO l = abs(l1 - l2), min(l1 + l2, maxval(hybrid%lcutm1))
DO l = abs(l1 - l2), min(l1 + l2, maxval(hybinp%lcutm1))
DO m = -l, l
DO m1 = -l1, l1
m2 = m1 + m ! Gaunt condition -m1+m2-m = 0
......
......@@ -42,7 +42,7 @@ MODULE m_add_vnonlocal
! c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c
CONTAINS
SUBROUTINE add_vnonlocal(nk, lapw, atoms, hybrid, input, kpts, jsp, results, xcpot, noco, hmat)
SUBROUTINE add_vnonlocal(nk, lapw, atoms, hybinp, input, kpts, jsp, results, xcpot, noco, hmat)
USE m_symm_hf, ONLY: symm_hf
USE m_intgrf, ONLY: intgrf, intgrf_init
......@@ -52,14 +52,14 @@ CONTAINS
USE m_wrapper
USE m_hsefunctional, ONLY: exchange_vccvHSE, exchange_ccccHSE
USE m_types
USE m_io_hybrid
USE m_io_hybinp
IMPLICIT NONE
TYPE(t_results), INTENT(INOUT) :: results
CLASS(t_xcpot), INTENT(IN) :: xcpot
TYPE(t_input), INTENT(IN) :: input
TYPE(t_hybrid), INTENT(INOUT) :: hybrid
TYPE(t_hybinp), INTENT(INOUT) :: hybinp
TYPE(t_kpts), INTENT(IN) :: kpts
TYPE(t_lapw), INTENT(IN) :: lapw
TYPE(t_atoms), INTENT(IN) :: atoms
......@@ -95,7 +95,7 @@ CONTAINS
END DO
END DO
! calculate HF energy
IF (hybrid%l_calhf) THEN
IF (hybinp%l_calhf) THEN
WRITE (6, '(A)') new_line('n')//new_line('n')//' ### '//' diagonal HF exchange elements (eV) ###'
WRITE (6, '(A)') new_line('n')//' k-point '//'band tail pole total(valence+core)'
......@@ -118,19 +118,19 @@ CONTAINS
CALL v_x%multiply(z, tmp)
DO iband = 1, hybrid%nbands(nk)
DO iband = 1, hybinp%nbands(nk)
IF (z%l_real) THEN
exch(iband, iband) = dot_product(z%data_r(:z%matsize1, iband), tmp%data_r(:, iband))
ELSE
exch(iband, iband) = dot_product(z%data_c(:z%matsize1, iband), tmp%data_c(:, iband))
END IF
IF (iband <= hybrid%nobd(nk,jsp)) THEN
IF (iband <= hybinp%nobd(nk,jsp)) THEN
results%te_hfex%valence = results%te_hfex%valence - a_ex*results%w_iks(iband, nk, jsp)*exch(iband, iband)
END IF
IF (hybrid%l_calhf) THEN
IF (hybinp%l_calhf) THEN
WRITE (6, '( '' ('',F5.3,'','',F5.3,'','',F5.3,'')'',I4,4X,3F15.5)') &
kpts%bkf(:, nk), iband, (REAL(exch(iband, iband)) - hybrid%div_vv(iband, nk, jsp))*(-27.211608), &
hybrid%div_vv(iband, nk, jsp)*(-27.211608), REAL(exch(iband, iband))*(-27.211608)
kpts%bkf(:, nk), iband, (REAL(exch(iband, iband)) - hybinp%div_vv(iband, nk, jsp))*(-27.211608), &
hybinp%div_vv(iband, nk, jsp)*(-27.211608), REAL(exch(iband, iband))*(-27.211608)
END IF
END DO
END SUBROUTINE add_vnonlocal
......
......@@ -3,7 +3,7 @@
CONTAINS
SUBROUTINE checkolap(atoms, hybdat,&
mpdata,hybrid,&