36 integer ik,iscl0,nmix,nwork
37 real(8) dv,etp,de,timetot
40 real(8),
allocatable :: work(:)
61 open(50,
file=
'GEOMETRY'//trim(
filext),form=
'FORMATTED')
65 open(50,
file=
'IADIST'//trim(
filext),form=
'FORMATTED')
69 open(60,
file=
'INFO'//trim(
filext),form=
'FORMATTED')
74 open(61,
file=
'TOTENERGY'//trim(
filext),form=
'FORMATTED')
76 open(62,
file=
'FERMIDOS'//trim(
filext),form=
'FORMATTED')
80 open(64,
file=
'GAP'//trim(
filext),form=
'FORMATTED')
82 open(65,
file=
'RMSDVS'//trim(
filext),form=
'FORMATTED')
84 open(66,
file=
'DTOTENERGY'//trim(
filext),form=
'FORMATTED')
95 write(60,
'("Potential read in from STATE.OUT")')
104 write(60,
'("Kohn-Sham potential initialised from atomic data")')
114 allocate(work(nwork))
133 call writebox(60,
"Self-consistent loop started")
137 write(str,
'("Loop number : ",I0)')
iscl 143 write(60,
'("Reached self-consistent loops maximum")')
147 write(*,
'("Warning(gndstate): failed to reach self-consistency after ", & 172 write(60,
'("New smearing width : ",G18.10)')
swidth 237 write(60,
'("Density of states at Fermi energy : ",G18.10)')
fermidos 238 write(60,
'(" (states/Hartree/unit cell)")')
240 write(60,
'("Estimated indirect band gap : ",G18.10)')
bandgap(1)
241 write(60,
'(" from k-point ",I6," to k-point ",I6)')
ikgap(1),
ikgap(2)
242 write(60,
'("Estimated direct band gap : ",G18.10)')
bandgap(2)
243 write(60,
'(" at k-point ",I6)')
ikgap(3)
262 write(64,
'(G24.14)')
bandgap(1)
269 if (
xctype(2) == xc_mgga_x_tb09)
then 271 write(60,
'("Tran-Blaha ''09 constant c : ",G18.10)')
c_tb09 283 write(60,
'("Wrote STATE.OUT")')
289 write(60,
'("OEP iterative solver step size : ",G18.10)')
tauoep 290 write(60,
'("Magnitude of OEP residual : ",G18.10)')
resoep 291 write(69,
'(G18.10)')
resoep 298 if (
iscl >= iscl0+1)
then 302 write(60,
'("RMS change in Kohn-Sham potential (target) : ",G18.10," (",& 304 write(65,
'(G18.10)') dv
306 write(60,
'("Absolute change in total energy (target) : ",G18.10," (",& 308 write(66,
'(G18.10)') de
312 write(60,
'("Convergence targets achieved")')
329 write(60,
'("Time (CPU seconds) : ",F12.2)') timetot
337 call writebox(60,
"Self-consistent loop stopped")
342 write(60,
'("Wrote STATE.OUT")')
355 write(60,
'("Total paramagnetic current per unit cell")')
356 write(60,
'(3G18.10)')
jtot 357 write(60,
'(" magnitude : ",G18.10)')
jtotm 364 write(60,
'("Timings (CPU seconds) :")')
365 write(60,
'(" initialisation",T40,": ",F12.2)')
timeinit 366 write(60,
'(" Hamiltonian and overlap matrix set up",T40,": ",F12.2)')
timemat 367 write(60,
'(" first-variational eigenvalue equation",T40,": ",F12.2)')
timefv 369 write(60,
'(" second-variational calculation",T40,": ",F12.2)')
timesv 371 write(60,
'(" charge density calculation",T40,": ",F12.2)')
timerho 372 write(60,
'(" potential calculation",T40,": ",F12.2)')
timepot 374 write(60,
'(" force calculation",T40,": ",F12.2)')
timefor 376 write(60,
'(" total",T40,": ",F12.2)') timetot
394 if (
xctype(1) < 0)
close(69)
subroutine writemix(nwork, work)
subroutine readmix(iscl0, nwork, work)
real(8), dimension(3) momtot
integer, dimension(3) ikgap
real(8), dimension(:), pointer, contiguous vmixer
integer, dimension(3) xctype
real(8), dimension(3) jtot
subroutine writeinfo(fnum)
type(file_t), dimension(:), allocatable, private file
subroutine mixerifc(mtype, n, v, dv, nwork, work)
subroutine writefsm(fnum)
subroutine checkwrite(twrite)
real(8), dimension(:,:), allocatable occsv
subroutine writegeom(fnum)
real(8), dimension(3, maxatoms, maxspecies) bfcmt
subroutine writeiad(fnum)
subroutine writechg(fnum)
subroutine writebox(fnum, str)
subroutine writeforces(fnum)
subroutine writeefield(fnum)
subroutine putoccsv(fext, ik, occsvp)
real(8), dimension(2) bandgap
subroutine writemom(fnum)
real(8), dimension(3) bfieldc
subroutine writeengy(fnum)