Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fleur
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
51
Issues
51
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
fleur
fleur
Commits
55be5526
Commit
55be5526
authored
Jan 05, 2020
by
Matthias Redies
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved l_subvxc, l_calchf, l_addhf from hybinp to hybdat. compiles now
parent
5066aaff
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
87 additions
and
85 deletions
+87
-85
eigen/eigen.F90
eigen/eigen.F90
+4
-4
fleurinput/types_hybinp.f90
fleurinput/types_hybinp.f90
+0
-6
hybrid/add_Vnonlocal.F90
hybrid/add_Vnonlocal.F90
+2
-2
hybrid/hf_setup.F90
hybrid/hf_setup.F90
+3
-3
hybrid/hsfock.F90
hybrid/hsfock.F90
+2
-2
hybrid/hybrid.F90
hybrid/hybrid.F90
+17
-16
io/broyd_io.F90
io/broyd_io.F90
+14
-14
main/fleur.F90
main/fleur.F90
+14
-11
main/totale.f90
main/totale.f90
+11
-11
main/vgen.F90
main/vgen.F90
+3
-3
rdmft/rdmft.F90
rdmft/rdmft.F90
+10
-9
types/types_hybdat.f90
types/types_hybdat.f90
+3
-0
vgen/vgen_xcpot.F90
vgen/vgen_xcpot.F90
+4
-4
No files found.
eigen/eigen.F90
View file @
55be5526
...
...
@@ -159,10 +159,10 @@ CONTAINS
END
IF
! hybinp%l_hybrid.OR.input%l_rdmft
IF
(
hybinp
%
l_hybrid
)
THEN
IF
(
hyb
inp
%
l_addhf
)
CALL
add_Vnonlocal
(
nk
,
lapw
,
atoms
,
hybinp
,
hybdat
,&
IF
(
hyb
dat
%
l_addhf
)
CALL
add_Vnonlocal
(
nk
,
lapw
,
atoms
,
hybinp
,
hybdat
,&
input
,
kpts
,
jsp
,
results
,
xcpot
,
noco
,
hmat
)
IF
(
hyb
inp
%
l_subvxc
)
THEN
IF
(
hyb
dat
%
l_subvxc
)
THEN
CALL
subvxc
(
lapw
,
kpts
%
bk
(:,
nk
),
input
,
jsp
,
v
%
mt
(:,
0
,:,:),
atoms
,
ud
,&
mpdata
,
hybinp
,
hybdat
,
enpara
%
el0
,
enpara
%
ello0
,
sym
,&
cell
,
sphhar
,
stars
,
xcpot
,
mpi
,
oneD
,
hmat
,
vx
)
...
...
@@ -281,11 +281,11 @@ CONTAINS
END
DO
END
IF
!IF (hybinp%l_hybrid.OR.hyb
inp
%l_calhf) CALL close_eig(eig_id)
!IF (hybinp%l_hybrid.OR.hyb
dat
%l_calhf) CALL close_eig(eig_id)
IF
(
input
%
jspins
.EQ.
1
.AND.
hybinp
%
l_hybrid
)
THEN
results
%
te_hfex
%
valence
=
2
*
results
%
te_hfex
%
valence
IF
(
hyb
inp
%
l_calhf
)
results
%
te_hfex
%
core
=
2
*
results
%
te_hfex
%
core
IF
(
hyb
dat
%
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
)
...
...
fleurinput/types_hybinp.f90
View file @
55be5526
...
...
@@ -12,9 +12,6 @@ MODULE m_types_hybinp
TYPE
,
EXTENDS
(
t_fleurinput_base
)::
t_hybinp
LOGICAL
::
l_hybrid
=
.false.
LOGICAL
::
l_subvxc
=
.false.
LOGICAL
::
l_calhf
=
.false.
LOGICAL
::
l_addhf
=
.false.
INTEGER
::
ewaldlambda
=
-1
INTEGER
::
lexp
=
-1
INTEGER
::
bands1
=
-1
!Only read in
...
...
@@ -46,9 +43,6 @@ CONTAINS
rank
=
0
END
IF
CALL
mpi_bc
(
this
%
l_hybrid
,
rank
,
mpi_comm
)
CALL
mpi_bc
(
this
%
l_subvxc
,
rank
,
mpi_comm
)
CALL
mpi_bc
(
this
%
l_calhf
,
rank
,
mpi_comm
)
CALL
mpi_bc
(
this
%
l_addhf
,
rank
,
mpi_comm
)
CALL
mpi_bc
(
this
%
ewaldlambda
,
rank
,
mpi_comm
)
CALL
mpi_bc
(
this
%
lexp
,
rank
,
mpi_comm
)
CALL
mpi_bc
(
this
%
bands1
,
rank
,
mpi_comm
)
...
...
hybrid/add_Vnonlocal.F90
View file @
55be5526
...
...
@@ -96,7 +96,7 @@ CONTAINS
END
DO
END
DO
! calculate HF energy
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
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)'
...
...
@@ -128,7 +128,7 @@ CONTAINS
IF
(
iband
<=
hybdat
%
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
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
WRITE
(
6
,
'(
''
(
''
,F5.3,
''
,
''
,F5.3,
''
,
''
,F5.3,
''
)
''
,I4,4X,3F15.5)'
)
&
kpts
%
bkf
(:,
nk
),
iband
,
(
REAL
(
exch
(
iband
,
iband
))
-
hybdat
%
div_vv
(
iband
,
nk
,
jsp
))
*
(
-27.211608
),
&
hybdat
%
div_vv
(
iband
,
nk
,
jsp
)
*
(
-27.211608
),
REAL
(
exch
(
iband
,
iband
))
*
(
-27.211608
)
...
...
hybrid/hf_setup.F90
View file @
55be5526
...
...
@@ -61,7 +61,7 @@ CONTAINS
skip_kpt
=
.FALSE.
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
! Preparations for HF and hybinp functional calculation
CALL
timestart
(
"gen_bz and gen_wavf"
)
...
...
@@ -263,7 +263,7 @@ CONTAINS
deallocate
(
basprod
)
CALL
timestop
(
"gen_bz and gen_wavf"
)
ELSE
IF
(
hybinp
%
l_hybrid
)
THEN
! hyb
inp
%l_calhf is false
ELSE
IF
(
hybinp
%
l_hybrid
)
THEN
! hyb
dat
%l_calhf is false
!DO nk = n_start,kpts%nkpt,n_stride
DO
nk
=
1
,
kpts
%
nkpt
,
1
...
...
@@ -274,7 +274,7 @@ CONTAINS
hybdat
%
maxlmindx
=
MAXVAL
([(
SUM
([(
mpdata
%
num_radfun_per_l
(
l
,
itype
)
*
(
2
*
l
+
1
),
l
=
0
,
atoms
%
lmax
(
itype
))]),
itype
=
1
,
atoms
%
ntype
)])
hybdat
%
nbands
=
MIN
(
hybinp
%
bands1
,
input
%
neig
)
ENDIF
! hyb
inp
%l_calhf
ENDIF
! hyb
dat
%l_calhf
END
SUBROUTINE
hf_setup
...
...
hybrid/hsfock.F90
View file @
55be5526
...
...
@@ -136,7 +136,7 @@ CONTAINS
END
IF
call
timestop
(
"read in olap"
)
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
ncstd
=
sum
([((
hybdat
%
nindxc
(
l
,
itype
)
*
(
2
*
l
+
1
)
*
atoms
%
neq
(
itype
),
l
=
0
,
hybdat
%
lmaxc
(
itype
)),
itype
=
1
,
atoms
%
ntype
)])
IF
(
nk
==
1
.and.
mpi
%
irank
==
0
)
WRITE
(
*
,
*
)
'calculate new HF matrix'
IF
(
nk
==
1
.and.
jsp
==
1
.and.
input
%
imix
>
10
)
CALL
system
(
'rm -f broyd*'
)
...
...
@@ -215,7 +215,7 @@ CONTAINS
call
timestop
(
"symmetrizeh"
)
CALL
write_v_x
(
v_x
,
kpts
%
nkpt
*
(
jsp
-
1
)
+
nk
)
END
IF
! hyb
inp
%l_calhf
END
IF
! hyb
dat
%l_calhf
CALL
timestop
(
"total time hsfock"
)
...
...
hybrid/hybrid.F90
View file @
55be5526
...
...
@@ -4,12 +4,12 @@
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE
m_calc_hyb
inp
MODULE
m_calc_hyb
rid
USE
m_judft
CONTAINS
SUBROUTINE
calc_hyb
inp
(
eig_id
,
mpdata
,
hybinp
,
kpts
,
atoms
,
input
,
mpi
,
noco
,
cell
,
oneD
,
&
SUBROUTINE
calc_hyb
rid
(
eig_id
,
mpdata
,
hybinp
,
hybdat
,
kpts
,
atoms
,
input
,
mpi
,
noco
,
cell
,
oneD
,
&
enpara
,
results
,
sym
,
xcpot
,
v
,
iterHF
)
USE
m_types_hybdat
...
...
@@ -29,6 +29,7 @@ CONTAINS
TYPE
(
t_oneD
),
INTENT
(
IN
)
::
oneD
type
(
t_mpdata
),
intent
(
inout
)
::
mpdata
TYPE
(
t_hybinp
),
INTENT
(
IN
)
::
hybinp
TYPE
(
t_hybdat
),
INTENT
(
INOUT
)
::
hybdat
TYPE
(
t_input
),
INTENT
(
IN
)
::
input
TYPE
(
t_noco
),
INTENT
(
IN
)
::
noco
TYPE
(
t_enpara
),
INTENT
(
IN
)
::
enpara
...
...
@@ -44,7 +45,6 @@ CONTAINS
! local variables
INTEGER
::
jsp
,
nk
,
err
TYPE
(
t_hybdat
)
::
hybdat
type
(
t_lapw
)
::
lapw
LOGICAL
::
init_vex
=
.TRUE.
!In first call we have to init v_nonlocal
LOGICAL
::
l_zref
...
...
@@ -56,7 +56,7 @@ CONTAINS
! close(7465)
CALL
timestart
(
"hybinp code"
)
INQUIRE
(
file
=
"v_x.mat"
,
exist
=
hyb
inp
%
l_addhf
)
INQUIRE
(
file
=
"v_x.mat"
,
exist
=
hyb
dat
%
l_addhf
)
CALL
open_hybinp_io1
(
sym
%
invs
)
IF
(
kpts
%
nkptf
==
0
)
THEN
...
...
@@ -65,11 +65,11 @@ CONTAINS
END
IF
!Check if new non-local potential shall be generated
hyb
inp
%
l_subvxc
=
hybinp
%
l_hybrid
.AND.
(
.NOT.
xcpot
%
is_name
(
"exx"
))
hyb
dat
%
l_subvxc
=
hybinp
%
l_hybrid
.AND.
(
.NOT.
xcpot
%
is_name
(
"exx"
))
!If this is the first iteration loop we can not calculate a new non-local potential
hyb
inp
%
l_calhf
=
(
results
%
last_distance
>=
0.0
)
.AND.
(
results
%
last_distance
<
input
%
minDistance
)
IF
(
.NOT.
hyb
inp
%
l_calhf
)
THEN
hyb
inp
%
l_subvxc
=
hybinp
%
l_subvxc
.AND.
hybinp
%
l_addhf
hyb
dat
%
l_calhf
=
(
results
%
last_distance
>=
0.0
)
.AND.
(
results
%
last_distance
<
input
%
minDistance
)
IF
(
.NOT.
hyb
dat
%
l_calhf
)
THEN
hyb
dat
%
l_subvxc
=
hybdat
%
l_subvxc
.AND.
hybdat
%
l_addhf
CALL
timestop
(
"hybinp code"
)
RETURN
ENDIF
...
...
@@ -78,7 +78,7 @@ CONTAINS
!Check if we are converged well enough to calculate a new potential
CALL
open_hybinp_io1b
(
sym
%
invs
)
hyb
inp
%
l_addhf
=
.TRUE.
hyb
dat
%
l_addhf
=
.TRUE.
!In first iteration allocate some memory
IF
(
init_vex
)
THEN
...
...
@@ -106,10 +106,10 @@ CONTAINS
init_vex
=
.FALSE.
END
IF
hyb
inp
%
l_subvxc
=
(
hybinp
%
l_subvxc
.AND.
hybinp
%
l_addhf
)
hyb
dat
%
l_subvxc
=
(
hybdat
%
l_subvxc
.AND.
hybdat
%
l_addhf
)
IF
(
.NOT.
ALLOCATED
(
results
%
w_iks
))
allocate
(
results
%
w_iks
(
input
%
neig
,
kpts
%
nkpt
,
input
%
jspins
))
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
iterHF
=
iterHF
+
1
!Delete broyd files
...
...
@@ -125,12 +125,13 @@ CONTAINS
!construct the mixed-basis
CALL
timestart
(
"generation of mixed basis"
)
write
(
*
,
*
)
"iterHF = "
,
iterHF
CALL
mixedbasis
(
atoms
,
kpts
,
input
,
cell
,
xcpot
,
mpdata
,
hybinp
,
enpara
,
mpi
,
v
,
iterHF
)
CALL
mixedbasis
(
atoms
,
kpts
,
input
,
cell
,
xcpot
,
mpdata
,
hybinp
,
hybdat
,&
enpara
,
mpi
,
v
,
iterHF
)
CALL
timestop
(
"generation of mixed basis"
)
CALL
open_hybinp_io2
(
mpdata
,
hybinp
,
input
,
atoms
,
sym
%
invs
)
CALL
open_hybinp_io2
(
mpdata
,
hybinp
,
hybdat
,
input
,
atoms
,
sym
%
invs
)
CALL
coulombmatrix
(
mpi
,
atoms
,
kpts
,
cell
,
sym
,
mpdata
,
hybinp
,
xcpot
)
CALL
coulombmatrix
(
mpi
,
atoms
,
kpts
,
cell
,
sym
,
mpdata
,
hybinp
,
hybdat
,
xcpot
)
CALL
hf_init
(
mpdata
,
hybinp
,
atoms
,
input
,
hybdat
)
CALL
timestop
(
"Preparation for hybinp functionals"
)
...
...
@@ -154,5 +155,5 @@ CONTAINS
ENDIF
CALL
timestop
(
"hybinp code"
)
END
SUBROUTINE
calc_hyb
inp
END
MODULE
m_calc_hyb
inp
END
SUBROUTINE
calc_hyb
rid
END
MODULE
m_calc_hyb
rid
io/broyd_io.F90
View file @
55be5526
...
...
@@ -28,7 +28,7 @@ SUBROUTINE readLastIterInAndDiffDen(hybinp,vecLen,nextIter,alpha,inDenVec,diffDe
! At the moment broyden IO is mode independent
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
57
,
file
=
'hf_broyd'
,
form
=
'unformatted'
,
status
=
'unknown'
)
ELSE
OPEN
(
57
,
file
=
'broyd'
,
form
=
'unformatted'
,
status
=
'unknown'
)
...
...
@@ -58,7 +58,7 @@ SUBROUTINE writeLastIterInAndDiffDen(hybinp,vecLen,nextIter,alpha,inDenVec,diffD
! At the moment broyden IO is mode independent
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
57
,
file
=
'hf_broyd'
,
form
=
'unformatted'
,
status
=
'unknown'
)
ELSE
OPEN
(
57
,
file
=
'broyd'
,
form
=
'unformatted'
,
status
=
'unknown'
)
...
...
@@ -90,7 +90,7 @@ SUBROUTINE readUVec(input,hybinp,vecLen,relIter,currentIter,uVec)
recLen
=
(
vecLen
+1
)
*
8
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
59
,
file
=
'hf_broyd.'
//
CHAR
(
input
%
imix
+48
),
access
=
'direct'
,&
recl
=
recLen
,
form
=
'unformatted'
,
status
=
'unknown'
)
ELSE
...
...
@@ -123,7 +123,7 @@ SUBROUTINE writeUVec(input,hybinp,vecLen,currentIter,uVec)
recLen
=
(
vecLen
+1
)
*
8
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
59
,
file
=
'hf_broyd.'
//
CHAR
(
input
%
imix
+48
),
access
=
'direct'
,&
recl
=
recLen
,
form
=
'unformatted'
,
status
=
'unknown'
)
ELSE
...
...
@@ -157,7 +157,7 @@ SUBROUTINE readVVec(input,hybinp,vecLen,relIter,currentIter,dfivi,vVec)
recLen
=
(
vecLen
+1
)
*
8
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
59
,
file
=
'hf_broyd.'
//
CHAR
(
input
%
imix
+48
),
access
=
'direct'
,&
recl
=
recLen
,
form
=
'unformatted'
,
status
=
'unknown'
)
ELSE
...
...
@@ -191,7 +191,7 @@ SUBROUTINE writeVVec(input,hybinp,vecLen,currentIter,dfivi,vVec)
recLen
=
(
vecLen
+1
)
*
8
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
59
,
file
=
'hf_broyd.'
//
CHAR
(
input
%
imix
+48
),
access
=
'direct'
,&
recl
=
recLen
,
form
=
'unformatted'
,
status
=
'unknown'
)
ELSE
...
...
@@ -232,7 +232,7 @@ SUBROUTINE readDeltaNVec(input,hybinp,vecLen,relIter,currentIter,deltaNVec)
recLen
=
(
vecLen
+1
)
*
8
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
59
,
file
=
'hf_broyd_DN'
,
access
=
'direct'
,&
recl
=
recLen
,
form
=
'unformatted'
,
status
=
'unknown'
)
ELSE
...
...
@@ -268,7 +268,7 @@ SUBROUTINE writeDeltaNVec(input,hybinp,vecLen,currentIter,deltaNVec)
recLen
=
(
vecLen
+1
)
*
8
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
59
,
file
=
'hf_broyd_DN'
,
access
=
'direct'
,&
recl
=
recLen
,
form
=
'unformatted'
,
status
=
'unknown'
)
ELSE
...
...
@@ -303,7 +303,7 @@ SUBROUTINE readDeltaFVec(input,hybinp,vecLen,relIter,currentIter,deltaFVec)
recLen
=
(
vecLen
+1
)
*
8
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
59
,
file
=
'hf_broyd_DF'
,
access
=
'direct'
,&
recl
=
recLen
,
form
=
'unformatted'
,
status
=
'unknown'
)
ELSE
...
...
@@ -339,7 +339,7 @@ SUBROUTINE writeDeltaFVec(input,hybinp,vecLen,currentIter,deltaFVec)
recLen
=
(
vecLen
+1
)
*
8
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
59
,
file
=
'hf_broyd_DF'
,
access
=
'direct'
,&
recl
=
recLen
,
form
=
'unformatted'
,
status
=
'unknown'
)
ELSE
...
...
@@ -375,7 +375,7 @@ SUBROUTINE writeBroydenOverlapExt(input,hybinp,currentIter,historyLength,&
recLen
=
8
*
4
*
input
%
maxIter
! sizeOfReal*numberOfVectors*vectorLength
recLen
=
recLen
+
2
*
8
! storage for currentIter, historyLength
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
59
,
file
=
'hf_broydOvlp'
,
access
=
'direct'
,&
recl
=
recLen
,
form
=
'unformatted'
,
status
=
'unknown'
)
ELSE
...
...
@@ -419,7 +419,7 @@ SUBROUTINE readBroydenOverlaps(input,hybinp,currentIter,historyLength,&
recLen
=
8
*
4
*
input
%
maxIter
! sizeOfReal*numberOfVectors*vectorLength
recLen
=
recLen
+
2
*
8
! storage for currentIter, historyLength
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
59
,
file
=
'hf_broydOvlp'
,
access
=
'direct'
,&
recl
=
recLen
,
form
=
'unformatted'
,
status
=
'unknown'
)
ELSE
...
...
@@ -517,7 +517,7 @@ LOGICAL FUNCTION initBroydenHistory(input,hybinp, vecLen)
recLen
=
(
vecLen
+1
)
*
8
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
59
,
file
=
'hf_broyd.'
//
CHAR
(
input
%
imix
+48
),
access
=
'direct'
,&
recl
=
recLen
,
form
=
'unformatted'
,
status
=
'unknown'
)
ELSE
...
...
@@ -546,7 +546,7 @@ LOGICAL FUNCTION initBroydenHistory2(input,hybinp, vecLen)
recLen
=
(
vecLen
+1
)
*
8
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
OPEN
(
59
,
file
=
'hf_broyd_DF'
,
access
=
'direct'
,&
recl
=
recLen
,
form
=
'unformatted'
,
status
=
'unknown'
)
OPEN
(
60
,
file
=
'hf_broyd_DN'
,
access
=
'direct'
,&
...
...
main/fleur.F90
View file @
55be5526
...
...
@@ -56,7 +56,7 @@ CONTAINS
USE
m_mix
USE
m_xmlOutput
USE
m_juDFT_time
USE
m_calc_hyb
inp
USE
m_calc_hyb
rid
USE
m_rdmft
USE
m_io_hybinp
USE
m_wann_optional
...
...
@@ -100,6 +100,7 @@ CONTAINS
TYPE
(
t_kpts
)
::
kpts
TYPE
(
t_mpinp
)
::
mpinp
TYPE
(
t_hybinp
)
::
hybinp
TYPE
(
t_hybdat
)
::
hybdat
TYPE
(
t_mpdata
)
::
mpdata
TYPE
(
t_oneD
)
::
oneD
TYPE
(
t_mpi
)
::
mpi
...
...
@@ -245,10 +246,10 @@ CONTAINS
IF
(
hybinp
%
l_hybrid
)
THEN
SELECT
TYPE
(
xcpot
)
TYPE
IS
(
t_xcpot_inbuild
)
CALL
calc_hyb
inp
(
eig_id
,
mpdata
,
hybinp
,
kpts
,
atoms
,
input
,
mpi
,
noco
,&
CALL
calc_hyb
rid
(
eig_id
,
mpdata
,
hybinp
,
hybdat
,
kpts
,
atoms
,
input
,
mpi
,
noco
,&
cell
,
oneD
,
enpara
,
results
,
sym
,
xcpot
,
vTot
,
iterHF
)
END
SELECT
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
call
mixing_history_reset
(
mpi
)
iter
=
0
END
IF
...
...
@@ -259,7 +260,7 @@ CONTAINS
END
IF
!IF(.not.input%eig66(1))THEN
CALL
reset_eig
(
eig_id
,
noco
%
l_soc
)
! This has to be placed after the calc_hyb
inp
call but before eigen
CALL
reset_eig
(
eig_id
,
noco
%
l_soc
)
! This has to be placed after the calc_hyb
rid
call but before eigen
!END IF
!#endif
...
...
@@ -280,7 +281,7 @@ CONTAINS
! ,sym,oneD,cell,noco,input,atoms,inDen)
!END Rot For Testing (HIGHLY EXPERIMENTAL ROUTINE)
CALL
timestart
(
"generation of potential"
)
CALL
vgen
(
hyb
inp
,
field
,
input
,
xcpot
,
atoms
,
sphhar
,
stars
,
vacuum
,
sym
,&
CALL
vgen
(
hyb
dat
,
field
,
input
,
xcpot
,
atoms
,
sphhar
,
stars
,
vacuum
,
sym
,&
cell
,
oneD
,
sliceplot
,
mpi
,
results
,
noco
,
EnergyDen
,
inDen
,
vTot
,
vx
,
vCoul
)
CALL
timestop
(
"generation of potential"
)
...
...
@@ -308,7 +309,8 @@ CONTAINS
CALL
timestop
(
"Updating energy parameters"
)
!IF(.not.input%eig66(1))THEN
CALL
eigen
(
mpi
,
stars
,
sphhar
,
atoms
,
xcpot
,
sym
,
kpts
,
vacuum
,
input
,&
cell
,
enpara
,
banddos
,
noco
,
oneD
,
mpdata
,
hybinp
,
iter
,
eig_id
,
results
,
inDen
,
vTemp
,
vx
,
hub1
)
cell
,
enpara
,
banddos
,
noco
,
oneD
,
mpdata
,
hybinp
,
hybdat
,&
iter
,
eig_id
,
results
,
inDen
,
vTemp
,
vx
,
hub1
)
!ENDIF
vTot
%
mmpMat
=
vTemp
%
mmpMat
!!$ eig_idList(pc) = eig_id
...
...
@@ -317,7 +319,7 @@ CONTAINS
! add all contributions to total energy
#ifdef CPP_MPI
! send all result of local total energies to the r
IF
(
hybinp
%
l_hybrid
.AND.
hyb
inp
%
l_calhf
)
THEN
IF
(
hybinp
%
l_hybrid
.AND.
hyb
dat
%
l_calhf
)
THEN
IF
(
mpi
%
irank
==
0
)
THEN
CALL
MPI_Reduce
(
MPI_IN_PLACE
,
results
%
te_hfex
%
core
,
1
,
MPI_REAL8
,
MPI_SUM
,
0
,
mpi
%
mpi_comm
,
ierr
(
1
))
ELSE
...
...
@@ -431,7 +433,8 @@ CONTAINS
SELECT
TYPE
(
xcpot
)
TYPE
IS
(
t_xcpot_inbuild
)
CALL
rdmft
(
eig_id
,
mpi
,
input
,
kpts
,
banddos
,
sliceplot
,
cell
,
atoms
,
enpara
,
stars
,
vacuum
,&
sphhar
,
sym
,
field
,
vTot
,
vCoul
,
oneD
,
noco
,
xcpot
,
mpdata
,
hybinp
,
results
,
coreSpecInput
,
archiveType
,
outDen
)
sphhar
,
sym
,
field
,
vTot
,
vCoul
,
oneD
,
noco
,
xcpot
,
mpdata
,
hybinp
,
hybdat
,&
results
,
coreSpecInput
,
archiveType
,
outDen
)
END
SELECT
END
IF
...
...
@@ -474,7 +477,7 @@ CONTAINS
! total energy
CALL
timestart
(
'determination of total energy'
)
CALL
totale
(
mpi
,
atoms
,
sphhar
,
stars
,
vacuum
,
sym
,
input
,
noco
,
cell
,
oneD
,&
xcpot
,
hyb
inp
,
vTot
,
vCoul
,
iter
,
inDen
,
results
)
xcpot
,
hyb
dat
,
vTot
,
vCoul
,
iter
,
inDen
,
results
)
CALL
timestop
(
'determination of total energy'
)
IF
(
hybinp
%
l_hybrid
)
CALL
close_eig
(
eig_id
)
...
...
@@ -524,14 +527,14 @@ CONTAINS
l_cont
=
.TRUE.
IF
(
hybinp
%
l_hybrid
)
THEN
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
l_cont
=
l_cont
.AND.
(
iterHF
<
input
%
itmax
)
l_cont
=
l_cont
.AND.
(
input
%
mindistance
<=
results
%
last_distance
)
CALL
check_time_for_next_iteration
(
iterHF
,
l_cont
)
ELSE
l_cont
=
l_cont
.AND.
(
iter
<
50
)
! Security stop for non-converging nested PBE calculations
END
IF
IF
(
hyb
inp
%
l_subvxc
)
THEN
IF
(
hyb
dat
%
l_subvxc
)
THEN
results
%
te_hfex
%
valence
=
0
END
IF
ELSE
...
...
main/totale.f90
View file @
55be5526
...
...
@@ -6,7 +6,7 @@
MODULE
m_totale
CONTAINS
SUBROUTINE
totale
(
mpi
,
atoms
,
sphhar
,
stars
,
vacuum
,
&
sym
,
input
,
noco
,
cell
,
oneD
,
xcpot
,
hyb
inp
,
vTot
,
vCoul
,
it
,
den
,
results
)
sym
,
input
,
noco
,
cell
,
oneD
,
xcpot
,
hyb
dat
,
vTot
,
vCoul
,
it
,
den
,
results
)
!
! ***************************************************
! subroutine calculates the total energy
...
...
@@ -53,7 +53,7 @@ CONTAINS
TYPE
(
t_results
),
INTENT
(
INOUT
)
::
results
CLASS
(
t_xcpot
),
INTENT
(
IN
)
::
xcpot
TYPE
(
t_oneD
),
INTENT
(
IN
)
::
oneD
TYPE
(
t_hyb
inp
),
INTENT
(
IN
)
::
hybinp
TYPE
(
t_hyb
dat
),
INTENT
(
IN
)
::
hybdat
TYPE
(
t_input
),
INTENT
(
IN
)
::
input
TYPE
(
t_vacuum
),
INTENT
(
IN
)
::
vacuum
TYPE
(
t_noco
),
INTENT
(
IN
)
::
noco
...
...
@@ -180,7 +180,7 @@ CONTAINS
results
%
tote
=
results
%
tote
-
results
%
e_ldau
! gu test
ENDIF
! print 'HF' before total energy to make it grepable
IF
(
.NOT.
hyb
inp
%
l_calhf
)
THEN
IF
(
.NOT.
hyb
dat
%
l_calhf
)
THEN
WRITE
(
6
,
FMT
=
8060
)
results
%
tote
ELSE
WRITE
(
6
,
FMT
=
8061
)
results
%
tote
...
...
@@ -190,7 +190,7 @@ CONTAINS
! extrapolated for T->0
!
! print 'HF' before all energies to make them grepable
IF
(
.NOT.
hyb
inp
%
l_calhf
)
THEN
IF
(
.NOT.
hyb
dat
%
l_calhf
)
THEN
WRITE
(
6
,
FMT
=
8065
)
results
%
ts
WRITE
(
6
,
FMT
=
8070
)
results
%
tote
-
results
%
ts
WRITE
(
6
,
FMT
=
8080
)
results
%
tote
-0.5e0
*
results
%
ts
...
...
@@ -203,7 +203,7 @@ CONTAINS
WRITE
(
attributes
(
1
),
'(f20.10)'
)
results
%
tote
WRITE
(
attributes
(
2
),
'(a)'
)
'Htr'
WRITE
(
attributes
(
3
),
'(a)'
)
'HF'
IF
(
hyb
inp
%
l_calhf
)
THEN
IF
(
hyb
dat
%
l_calhf
)
THEN
CALL
openXMLElementForm
(
'totalEnergy'
,(/
'value '
,
'units '
,
'comment'
/),
attributes
,
reshape
((/
40
,
20
/),(/
1
,
2
/)))
ELSE
CALL
openXMLElementForm
(
'totalEnergy'
,(/
'value'
,
'units'
/),
attributes
(
1
:
2
),
reshape
((/
40
,
20
/),(/
1
,
2
/)))
...
...
main/vgen.F90
View file @
55be5526
...
...
@@ -19,7 +19,7 @@ CONTAINS
!! TE_VEFF: charge density-effective potential integral
!! TE_EXC : charge density-ex-corr.energy density integral
SUBROUTINE
vgen
(
hyb
inp
,
field
,
input
,
xcpot
,
atoms
,
sphhar
,
stars
,
vacuum
,
sym
,&
SUBROUTINE
vgen
(
hyb
dat
,
field
,
input
,
xcpot
,
atoms
,
sphhar
,
stars
,
vacuum
,
sym
,&
cell
,
oneD
,
sliceplot
,
mpi
,
results
,
noco
,
EnergyDen
,
den
,
vTot
,
vx
,
vCoul
)
USE
m_types
...
...
@@ -36,7 +36,7 @@ CONTAINS
TYPE
(
t_results
),
INTENT
(
INOUT
)
::
results
CLASS
(
t_xcpot
),
INTENT
(
INOUT
)
::
xcpot
TYPE
(
t_hyb
inp
),
INTENT
(
IN
)
::
hybinp
TYPE
(
t_hyb
dat
),
INTENT
(
IN
)
::
hybdat
TYPE
(
t_mpi
),
INTENT
(
IN
)
::
mpi
TYPE
(
t_oneD
),
INTENT
(
IN
)
::
oneD
...
...
@@ -101,7 +101,7 @@ CONTAINS
IF
(
noco
%
l_mtnocoPot
)
CALL
rotate_mt_den_to_local
(
atoms
,
sphhar
,
sym
,
noco
,
denrot
)
ENDIF
CALL
vgen_xcpot
(
hyb
inp
,
input
,
xcpot
,
atoms
,
sphhar
,
stars
,
vacuum
,
sym
,&
CALL
vgen_xcpot
(
hyb
dat
,
input
,
xcpot
,
atoms
,
sphhar
,
stars
,
vacuum
,
sym
,&
cell
,
oneD
,
sliceplot
,
mpi
,
noco
,
den
,
denRot
,
EnergyDen
,
vTot
,
vx
,
results
)
!ToDo, check if this is needed for more potentials as well...
...
...
rdmft/rdmft.F90
View file @
55be5526
...
...
@@ -9,7 +9,8 @@ MODULE m_rdmft
CONTAINS
SUBROUTINE
rdmft
(
eig_id
,
mpi
,
input
,
kpts
,
banddos
,
sliceplot
,
cell
,
atoms
,
enpara
,
stars
,
vacuum
,&
sphhar
,
sym
,
field
,
vTot
,
vCoul
,
oneD
,
noco
,
xcpot
,
mpdata
,
hybinp
,
results
,
coreSpecInput
,
archiveType
,
outDen
)
sphhar
,
sym
,
field
,
vTot
,
vCoul
,
oneD
,
noco
,
xcpot
,
mpdata
,
hybinp
,
hybdat
,&
results
,
coreSpecInput
,
archiveType
,
outDen
)
USE
m_types
USE
m_juDFT
...
...
@@ -64,6 +65,7 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,sliceplot,cell,atoms,enpara,stars
TYPE
(
t_xcpot_inbuild
),
INTENT
(
INOUT
)
::
xcpot
TYPE
(
t_mpdata
),
intent
(
inout
)
::
mpdata
TYPE
(
t_hybinp
),
INTENT
(
IN
)
::
hybinp
TYPE
(
t_hybdat
),
INTENT
(
INOUT
)
::
hybdat
TYPE
(
t_results
),
INTENT
(
INOUT
)
::
results
TYPE
(
t_coreSpecInput
),
INTENT
(
IN
)
::
coreSpecInput
TYPE
(
t_potden
),
INTENT
(
INOUT
)
::
outDen
...
...
@@ -80,7 +82,6 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,sliceplot,cell,atoms,enpara,stars
TYPE
(
t_moments
)
::
moments
TYPE
(
t_mat
)
::
exMat
,
zMat
,
olap
,
trafo
,
invtrafo
,
tmpMat
,
exMatLAPW
TYPE
(
t_lapw
)
::
lapw
TYPE
(
t_hybdat
)
::
hybdat
INTEGER
::
ikpt
,
ikpt_i
,
iBand
,
jkpt
,
jBand
,
iAtom
,
i
,
na
,
itype
,
lh
,
j
INTEGER
::
jspin
,
jspmax
,
jsp
,
isp
,
ispin
,
nbasfcn
,
nbands
INTEGER
::
nsymop
,
nkpt_EIBZ
,
ikptf
,
iterHF
,
mnobd
...
...
@@ -379,15 +380,15 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,sliceplot,cell,atoms,enpara,stars
l_zref
=
(
sym
%
zrfs
.AND.
(
SUM
(
ABS
(
kpts
%
bk
(
3
,:
kpts
%
nkpt
)))
.LT.
1e-9
)
.AND..NOT.
noco
%
l_noco
)
iterHF
=
0
hyb
inp
%
l_calhf
=
.TRUE.
hyb
dat
%
l_calhf
=
.TRUE.
! CALL open_hybinp_io1(sym%invs)
CALL
mixedbasis
(
atoms
,
kpts
,
input
,
cell
,
xcpot
,
mpdata
,
hybinp
,
enpara
,
mpi
,
vTot
,
iterHF
)
CALL
mixedbasis
(
atoms
,
kpts
,
input
,
cell
,
xcpot
,
mpdata
,
hybinp
,
hybdat
,
enpara
,
mpi
,
vTot
,
iterHF
)
CALL
open_hybinp_io2
(
mpdata
,
hybinp
,
input
,
atoms
,
sym
%
invs
)
CALL
open_hybinp_io2
(
mpdata
,
hybinp
,
hybdat
,
input
,
atoms
,
sym
%
invs
)
CALL
coulombmatrix
(
mpi
,
atoms
,
kpts
,
cell
,
sym
,
mpdata
,
hybinp
,
xcpot
)
CALL
coulombmatrix
(
mpi
,
atoms
,
kpts
,
cell
,
sym
,
mpdata
,
hybinp
,
hybdat
,
xcpot
)
CALL
hf_init
(
mpdata
,
hybinp
,
atoms
,
input
,
hybdat
)
...
...
@@ -755,7 +756,7 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,sliceplot,cell,atoms,enpara,stars
WRITE
(
*
,
*
)
'RDMFT: convergence loop end'
hyb
inp
%
l_calhf
=
.FALSE.
hyb
dat
%
l_calhf
=
.FALSE.
! Calculate final overall density
...
...
types/types_hybdat.f90
View file @
55be5526
...
...
@@ -3,6 +3,9 @@ MODULE m_types_hybdat
TYPE
t_hybdat
LOGICAL
::
l_subvxc
=
.false.
LOGICAL
::
l_calhf
=
.false.
LOGICAL
::
l_addhf
=
.false.
INTEGER
::
lmaxcd
,
maxindxc
INTEGER
::
maxfac
REAL
,
ALLOCATABLE
::
gridf
(:,:)
...
...
vgen/vgen_xcpot.F90
View file @
55be5526
...
...
@@ -9,7 +9,7 @@ MODULE m_vgen_xcpot
CONTAINS
SUBROUTINE
vgen_xcpot
(
hyb
inp
,
input
,
xcpot
,
atoms
,
sphhar
,
stars
,
vacuum
,
sym
,
&
SUBROUTINE
vgen_xcpot
(
hyb
dat
,
input
,
xcpot
,
atoms
,
sphhar
,
stars
,
vacuum
,
sym
,
&
cell
,
oneD
,
sliceplot
,
mpi
,
noco
,
den
,
denRot
,
EnergyDen
,
vTot
,
vx
,
results
)
! ***********************************************************
...
...
@@ -38,7 +38,7 @@ CONTAINS
IMPLICIT
NONE
CLASS
(
t_xcpot
),
INTENT
(
INOUT
)
::
xcpot
TYPE
(
t_hyb
inp
),
INTENT
(
IN
)
::
hybinp
TYPE
(
t_hyb
dat
),
INTENT
(
IN
)
::
hybdat
TYPE
(
t_mpi
),
INTENT
(
IN
)
::
mpi
TYPE
(
t_oneD
),
INTENT
(
IN
)
::
oneD
...
...
@@ -147,7 +147,7 @@ CONTAINS
workden
=
den
END
IF
veff
=
vTot
IF
(
xcpot
%
is_hybrid
()
.AND.
hyb
inp
%
l_subvxc
)
THEN
IF
(
xcpot
%
is_hybrid
()
.AND.
hyb
dat
%
l_subvxc
)
THEN
DO
ispin
=
1
,
input
%
jspins
CALL
convol
(
stars
,
vx
%
pw_w
(:,
ispin
),
vx
%
pw
(:,
ispin
),
stars
%
ufft
)
END
DO
...
...
@@ -170,7 +170,7 @@ CONTAINS
CALL
int_nv
(
ispin
,
stars
,
vacuum
,
atoms
,
sphhar
,
cell
,
sym
,
input
,
oneD
,
veff
,
workden
,
results
%
te_veff
)
END
DO
IF
(
xcpot
%
is_hybrid
()
.AND.
hyb
inp
%
l_subvxc
)
THEN
IF
(
xcpot
%
is_hybrid
()
.AND.
hyb
dat
%
l_subvxc
)
THEN
ALLOCATE
(
rhoc
(
atoms
%
jmtd
,
atoms
%
ntype
,
input
%
jspins
),
rhoc_vx
(
atoms
%
jmtd
))
ALLOCATE
(
tec
(
atoms
%
ntype
,
input
%
jspins
),
qintc
(
atoms
%
ntype
,
input
%
jspins
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment