44
44
real(dp):: Ebs ! Band-structure energy, Tr(DM*H), calculated in compute_dm
45
45
real(dp):: Eso ! Spin-orbit energy
51
!> Initialize ALL energies to 0.
52
subroutine init_Energies()
85
end subroutine init_Energies
87
!> To ease the computation of specific deferred
88
!> quantites we allow the computation of these quantites
91
subroutine update_DEna()
93
DEna = Enascf - Enaatm
95
end subroutine update_DEna
97
subroutine update_E0()
99
E0 = Ena + Ekin + Enl + Eso - Eions
101
end subroutine update_E0
103
subroutine update_Etot()
105
! DUext (external electric field) -- should it be in or out?
106
Etot = Ena + Ekin + Enl + Eso - Eions + &
107
DEna + DUscf + DUext + Exc + &
108
Ecorrec + Emad + Emm + Emeta + Eldau
110
end subroutine update_Etot
112
!> @param kBT the temperature in energy
113
subroutine update_FreeE( kBT )
114
real(dp), intent(in) :: kBT
116
FreeE = Etot - kBT * Entropy
118
end subroutine update_FreeE
120
!> @param kBT the temperature in energy
121
subroutine update_FreeEHarris( kBT )
122
real(dp), intent(in) :: kBT
124
FreeEHarris = Eharrs - kBT * Entropy
126
end subroutine update_FreeEHarris
49
128
end module m_energies