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))
131 call writebox(60,
"Self-consistent loop started")
135 write(str,
'("Loop number : ",I0)')
iscl 141 write(60,
'("Reached self-consistent loops maximum")')
145 write(*,
'("Warning(gndstate): failed to reach self-consistency after ", & 170 write(60,
'("New smearing width : ",G18.10)')
swidth 235 write(60,
'("Density of states at Fermi energy : ",G18.10)')
fermidos 236 write(60,
'(" (states/Hartree/unit cell)")')
238 write(60,
'("Estimated indirect band gap : ",G18.10)')
bandgap(1)
239 write(60,
'(" from k-point ",I0," to k-point ",I0)')
ikgap(1),
ikgap(2)
240 write(60,
'("Estimated direct band gap : ",G18.10)')
bandgap(2)
241 write(60,
'(" at k-point ",I0)')
ikgap(3)
260 write(64,
'(G24.14)')
bandgap(1)
267 if (
xctype(2) == xc_mgga_x_tb09)
then 269 write(60,
'("Tran-Blaha ''09 constant c : ",G18.10)')
c_tb09 281 write(60,
'("Wrote STATE.OUT")')
287 write(60,
'("OEP iterative solver step size : ",G18.10)')
tauoep 288 write(60,
'("Magnitude of OEP residual : ",G18.10)')
resoep 289 write(69,
'(G18.10)')
resoep 296 if (
iscl >= iscl0+1)
then 300 write(60,
'("RMS change in Kohn-Sham potential (target) : ",G18.10," (",& 302 write(65,
'(G18.10)') dv
304 write(60,
'("Absolute change in total energy (target) : ",G18.10," (",& 306 write(66,
'(G18.10)') de
310 write(60,
'("Convergence targets achieved")')
327 write(60,
'("Time (CPU seconds) : ",F12.2)') timetot
335 call writebox(60,
"Self-consistent loop stopped")
340 write(60,
'("Wrote STATE.OUT")')
353 write(60,
'("Total paramagnetic current per unit cell")')
354 write(60,
'(3G18.10)')
jtot 355 write(60,
'(" magnitude : ",G18.10)')
jtotm 362 write(60,
'("Timings (CPU seconds) :")')
363 write(60,
'(" initialisation",T40,": ",F12.2)')
timeinit 364 write(60,
'(" Hamiltonian and overlap matrix set up",T40,": ",F12.2)')
timemat 365 write(60,
'(" first-variational eigenvalue equation",T40,": ",F12.2)')
timefv 367 write(60,
'(" second-variational calculation",T40,": ",F12.2)')
timesv 369 write(60,
'(" charge density calculation",T40,": ",F12.2)')
timerho 370 write(60,
'(" potential calculation",T40,": ",F12.2)')
timepot 372 write(60,
'(" force calculation",T40,": ",F12.2)')
timefor 374 write(60,
'(" total",T40,": ",F12.2)') timetot
392 if (
xctype(1) < 0)
close(69)
subroutine writemix(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 readmix(trs, iscl0, nwork, work)
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)