3
public :: post_scf_work
7
subroutine post_scf_work( first, last, iscf )
8
USE m_setup_hamiltonian, only: setup_hamiltonian
12
use atomlist, only: lasto, rmaxo, datm, indxuo, no_s, no_u, iphorb
15
use neighbour, only: maxna=>maxnna ! For plcharge...
16
use m_spin, only: nspin
19
logical :: first, last
24
!------------------------------------------------------------------------- BEGIN
25
! If converged, make one last iteration to find forces and stress
27
call setup_hamiltonian( first, last, iscf )
30
DEna = Enascf - Enaatm
31
Etot = E0 + DEna + DUscf + DUext + Exc + Ecorrec + Emad+Emm+
33
Eharrs = Etot + DEharr
34
FreeE = Etot - Temp * Entropy
36
Dscf(1:nh,1:nspin) = Dold(1:nh,1:nspin)
37
Escf(1:nh,1:nspin) = Eold(1:nh,1:nspin)
40
call plcharge( no_s, na_s, no_u, maxnh, maxna, nspin,
41
. isa, iphorb, indxuo, lasto,
42
. scell, nsc, xa, rmaxo, datm )
44
if (cml_p) call cmlEndStep(mainXML)
45
!--------------------------------------------------------------------------- END
46
END subroutine post_scf_work
48
END MODULE m_post_scf_work