19integer(omp_lock_kind),
allocatable :: lock(:)
20real(8),
allocatable :: work(:)
21complex(8),
allocatable :: evecu(:,:)
24 write(*,
'("Error(gndstulr): ultra long-range does not work with OEP")')
30 write(*,
'("Error(gndstulr): ultra long-range does not work with &
31 &spin-polarised cores")')
81 call omp_init_lock(lock(ir))
88 open(60,file=
'ULR_INFO.OUT',form=
'FORMATTED')
90 open(65,file=
'RMSDVS.OUT',form=
'FORMATTED')
92 call writebox(60,
"Self-consistent loop started")
96 write(str,
'("Loop number : ",I0)')
iscl
102 write(60,
'("Reached self-consistent loops maximum")')
105 write(*,
'("Warning(gndstulr): failed to reach self-consistency after ",I4,&
149 call mpi_allreduce(mpi_in_place,
rhormt,n,mpi_double_precision,mpi_sum, &
152 call mpi_allreduce(mpi_in_place,
rhorir,n,mpi_double_precision,mpi_sum, &
156 call mpi_allreduce(mpi_in_place,
magrmt,n,mpi_double_precision,mpi_sum, &
159 call mpi_allreduce(mpi_in_place,
magrir,n,mpi_double_precision,mpi_sum, &
214 write(60,
'("Wrote STATE_ULR.OUT")')
223 write(60,
'("RMS change in Kohn-Sham potential (target) : ",G18.10," (",&
226 write(65,
'(G18.10)') dv
232 write(60,
'("Convergence targets achieved")')
249 write(60,
'("Timings (CPU seconds) :")')
250 write(60,
'(" Hamiltonian matrix set up",T40,": ",F12.2)')
timemat
251 write(60,
'(" eigenvalue equation",T40,": ",F12.2)')
timesv
252 write(60,
'(" charge density calculation",T40,": ",F12.2)')
timerho
253 write(60,
'(" potential calculation",T40,": ",F12.2)')
timepot
254 call writebox(60,
"Self-consistent loop stopped")
258 write(60,
'("Wrote STATE_ULR.OUT")')
267 call omp_destroy_lock(lock(ir))
subroutine checkwrite(twrite)
subroutine eveqnulr(ik0, evecu)
subroutine mixerifc(mtype, n, v, dv, nwork, work)
integer, dimension(3) xctype
subroutine holdthd(nloop, nthd)
real(8), dimension(:,:,:), allocatable rhormt
real(8), dimension(:,:,:,:), allocatable magrmt
real(8), dimension(:,:), allocatable evalu
complex(8), dimension(:), allocatable, target vsbsq
real(8), dimension(:,:,:), allocatable magrir
real(8), dimension(:,:), allocatable rhorir
subroutine rhomaguk(ik0, lock, evecu)
subroutine writebox(fnum, str)
subroutine writechg(fnum)
subroutine writeengyu(fnum)
subroutine writefsm(fnum)
subroutine writeinfou(fnum)
subroutine writemom(fnum)