Skip to content
Snippets Groups Projects

Fix the restart of DFT+U.

Merged Nicolas Tancogne-Dejean requested to merge fix_lda_u_restart into hotfix-12.2
1 file
+ 12
5
Compare changes
  • Side-by-side
  • Inline
+ 12
5
@@ -841,10 +841,12 @@ contains
if (from_scratch) call states_elec_fermi(st, namespace, gr%mesh)
end if
! Initialize the occupation matrices and U for LDA+U
! This must be called before parsing TDFreezeOccupations and TDFreezeU
! in order that the code does properly the initialization.
call lda_u_update_occ_matrices(hm%lda_u, namespace, gr%mesh, st, hm%hm_base, hm%energy)
if (from_scratch) then
! Initialize the occupation matrices and U for LDA+U
! This must be called before parsing TDFreezeOccupations and TDFreezeU
! in order that the code does properly the initialization.
call lda_u_update_occ_matrices(hm%lda_u, namespace, gr%mesh, st, hm%hm_base, hm%energy)
end if
if (freeze_orbitals > 0) then
if (from_scratch) then
@@ -1193,9 +1195,14 @@ contains
! read potential from previous interactions
call potential_interpolation_load(td%tr%vksold, namespace, space, restart, gr%mesh, st%d%nspin, err2)
if (err2 /= 0) ierr = ierr + 2
if (hm%lda_u_level /= DFT_U_NONE) then
call lda_u_load(restart, hm%lda_u, st, hm%energy%dft_u, ierr)
if (err /= 0) ierr = ierr + 1
end if
! read PES restart
if (td%pesv%calc_spm .or. td%pesv%calc_mask .or. td%pesv%calc_flux) then
call pes_load(td%pesv, namespace, restart, st, err)
Loading