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
52
Issues
52
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
0ab711bf
Commit
0ab711bf
authored
Jun 13, 2018
by
Gregor Michalicek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more arrangements for the nested SCF loop with hybrid functionals
parent
b9a768e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
17 deletions
+16
-17
eigen/eigen.F90
eigen/eigen.F90
+2
-1
hybrid/hybrid.F90
hybrid/hybrid.F90
+9
-15
main/fleur.F90
main/fleur.F90
+5
-1
No files found.
eigen/eigen.F90
View file @
0ab711bf
...
...
@@ -140,7 +140,8 @@ CONTAINS
!write overlap matrix b to direct access file olap
print
*
,
"Wrong overlap matrix used, fix this later"
!call write_olap(smat,nrec)
STOP
"TODO"
PRINT
*
,
"TODO"
! STOP "TODO"
PRINT
*
,
"BASIS:"
,
lapw
%
nv
(
jsp
),
atoms
%
nlotot
!if (hybrid%l_addhf) CALL add_Vnonlocal(nk,hybrid,dimension, kpts,jsp,results,xcpot,hamovlp)
...
...
hybrid/hybrid.F90
View file @
0ab711bf
...
...
@@ -10,7 +10,7 @@ MODULE m_calc_hybrid
CONTAINS
SUBROUTINE
calc_hybrid
(
hybrid
,
kpts
,
atoms
,
input
,
DIMENSION
,
mpi
,
noco
,
cell
,
oneD
,
results
,
sym
,
xcpot
,
v
,
it
)
SUBROUTINE
calc_hybrid
(
hybrid
,
kpts
,
atoms
,
input
,
DIMENSION
,
mpi
,
noco
,
cell
,
oneD
,
results
,
sym
,
xcpot
,
v
,
it
er
,
iterHF
)
USE
m_types
USE
m_mixedbasis
...
...
@@ -37,14 +37,14 @@ CONTAINS
TYPE
(
t_atoms
),
INTENT
(
IN
)
::
atoms
TYPE
(
t_potden
),
INTENT
(
IN
)
::
v
INTEGER
,
INTENT
(
IN
)
::
it
INTEGER
,
INTENT
(
IN
)
::
iter
INTEGER
,
INTENT
(
INOUT
)
::
iterHF
! local variables
INTEGER
::
eig_id
,
jsp
,
nk
,
nred
TYPE
(
t_hybdat
)
::
hybdat
type
(
t_lapw
)
::
lapw
LOGICAL
::
init_vex
=
.TRUE.
!In first call we have to init v_nonlocal
INTEGER
,
SAVE
::
nohf_it
=
99
!Do not rely on a converged density
LOGICAL
::
l_restart
=
.FALSE.
LOGICAL
::
l_zref
...
...
@@ -63,8 +63,8 @@ CONTAINS
!Check if new non-local potential shall be generated
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 non-local potential
IF
(
it
<
2
)
THEN
hybrid
%
l_calhf
=
.FALSE.
hybrid
%
l_calhf
=
(
results
%
last_distance
.GE.
0.0
)
.AND.
(
results
%
last_distance
.LT.
input
%
minDistance
)
IF
(
.NOT.
hybrid
%
l_calhf
)
THEN
IF
(
hybrid
%
l_addhf
)
INQUIRE
(
file
=
"cdnc"
,
exist
=
hybrid
%
l_addhf
)
hybrid
%
l_subvxc
=
hybrid
%
l_subvxc
.AND.
hybrid
%
l_addhf
RETURN
...
...
@@ -75,14 +75,6 @@ CONTAINS
CALL
judft_error
(
"Hybrid functionals do not work in parallel version yet"
)
CALL
MPI_BCAST
(
results
%
last_distance
....
#endif
hybrid
%
l_calhf
=
results
%
last_distance
<
input
%
minDistance
IF
(
nohf_it
>
50
)
THEN
hybrid
%
l_calhf
=
.TRUE.
nohf_it
=
0
ELSE
nohf_it
=
nohf_it
+1
IF
(
hybrid
%
l_calhf
)
nohf_it
=
0
ENDIF
hybrid
%
l_addhf
=
.TRUE.
!In first iteration allocate some memory
...
...
@@ -98,6 +90,8 @@ CONTAINS
IF
(
.NOT.
hybrid
%
l_calhf
)
RETURN
!use existing non-local potential
iterHF
=
iterHF
+
1
!Delete broyd files
CALL
system
(
"rm broyd*"
)
...
...
@@ -129,13 +123,13 @@ CONTAINS
CALL
timestart
(
"Calculation of non-local potential"
)
DO
jsp
=
1
,
input
%
jspins
CALL
HF_setup
(
hybrid
,
input
,
sym
,
kpts
,
dimension
,
atoms
,
mpi
,
noco
,
cell
,
oneD
,
results
,
jsp
,
eig_id
,&
hybdat
,
irank2
,
it
,
sym
%
invs
,
v
%
mt
(:,
0
,:,:),
eig_irr
)
hybdat
,
irank2
,
it
erHF
,
sym
%
invs
,
v
%
mt
(:,
0
,:,:),
eig_irr
)
DO
nk
=
mpi
%
n_start
,
kpts
%
nkpt
,
mpi
%
n_stride
CALL
lapw
%
init
(
input
,
noco
,
kpts
,
atoms
,
sym
,
nk
,
cell
,
l_zref
)
CALL
hsfock
(
nk
,
atoms
,
hybrid
,
lapw
,
DIMENSION
,
kpts
,
jsp
,
input
,
hybdat
,
eig_irr
,
sym
,
cell
,&
noco
,
results
,
it
,
MAXVAL
(
hybrid
%
nobd
),
xcpot
,
mpi
,
irank2
(
nk
),
isize2
(
nk
),
comm
(
nk
))
noco
,
results
,
it
erHF
,
MAXVAL
(
hybrid
%
nobd
),
xcpot
,
mpi
,
irank2
(
nk
),
isize2
(
nk
),
comm
(
nk
))
END
DO
END
DO
CALL
timestop
(
"Calculation of non-local potential"
)
...
...
main/fleur.F90
View file @
0ab711bf
...
...
@@ -207,8 +207,12 @@ CONTAINS
SELECT
TYPE
(
xcpot
)
TYPE
IS
(
t_xcpot_inbuild
)
CALL
calc_hybrid
(
hybrid
,
kpts
,
atoms
,
input
,
DIMENSION
,
mpi
,
noco
,&
cell
,
oneD
,
results
,
sym
,
xcpot
,
vTot
,
iter
)
cell
,
oneD
,
results
,
sym
,
xcpot
,
vTot
,
iter
,
iterHF
)
END
SELECT
IF
(
hybrid
%
l_calhf
)
THEN
CALL
system
(
"rm broyd*"
)
iter
=
0
END
IF
ENDIF
!#endif
...
...
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