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')
94 if (
mp_mpi)
write(60,
'("Potential read in from STATE.OUT")')
101 if (
mp_mpi)
write(60,
'("Kohn-Sham potential initialised from atomic data")')
110 allocate(work(nwork))
128 write(str,
'("Loop number : ",I0)')
iscl 134 write(60,
'("Reached self-consistent loops maximum")')
138 write(*,
'("Warning(gndstate): failed to reach self-consistency after ", & 163 write(60,
'("New smearing width : ",G18.10)')
swidth 224 if (
iscl > iscl0)
then 236 write(60,
'("Density of states at Fermi energy : ",G18.10)')
fermidos 237 write(60,
'(" (states/Hartree/unit cell)")')
239 write(60,
'("Estimated indirect band gap : ",G18.10)')
bandgap(1)
240 write(60,
'(" from k-point ",I0," to k-point ",I0)')
ikgap(1),
ikgap(2)
241 write(60,
'("Estimated direct band gap : ",G18.10)')
bandgap(2)
242 write(60,
'(" at k-point ",I0)')
ikgap(3)
261 write(64,
'(G24.14)')
bandgap(1)
268 if (
xctype(2) == xc_mgga_x_tb09)
then 270 write(60,
'("Tran-Blaha ''09 constant c : ",G18.10)')
c_tb09 282 write(60,
'("Wrote STATE.OUT")')
288 write(60,
'("OEP iterative solver step size : ",G18.10)')
tauoep 289 write(60,
'("Magnitude of OEP residual : ",G18.10)')
resoep 290 write(69,
'(G18.10)')
resoep 297 if (
iscl > iscl0)
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")')
324 write(60,
'("Time (CPU seconds) : ",F12.2)') timetot
332 call writebox(60,
"Self-consistent loop stopped")
337 write(60,
'("Wrote STATE.OUT")')
350 write(60,
'("Total paramagnetic current per unit cell")')
351 write(60,
'(3G18.10)')
jtot 352 write(60,
'(" magnitude : ",G18.10)')
jtotm 359 write(60,
'("Timings (CPU seconds) :")')
360 write(60,
'(" initialisation",T40,": ",F12.2)')
timeinit 361 write(60,
'(" Hamiltonian and overlap matrix set up",T40,": ",F12.2)')
timemat 362 write(60,
'(" first-variational eigenvalue equation",T40,": ",F12.2)')
timefv 364 write(60,
'(" second-variational calculation",T40,": ",F12.2)')
timesv 366 write(60,
'(" charge density calculation",T40,": ",F12.2)')
timerho 367 write(60,
'(" potential calculation",T40,": ",F12.2)')
timepot 369 write(60,
'(" force calculation",T40,": ",F12.2)')
timefor 371 write(60,
'(" total",T40,": ",F12.2)') timetot
389 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)