Commit f52b7a15 authored by Nick R. Papior's avatar Nick R. Papior
Browse files

Updated SCF print-outs

- Now dDmax and dHmax are both printed (always)

- Added more digits to the output so that non-collinear
  and spin-orbit etc. have the same format.

- After the final step the fermi energy is now also printed
  in the list of Final energies
parent bf0d0b34
......@@ -71,7 +71,7 @@
endif
is_DM_conv = (dDmax.lt.dDtol)
is_H_conv = (dHmax.lt.dHtol)
is_H_conv = (dHmax.lt.dHtol)
is_Harris_conv = is_converged(conv_harris)
is_FreeEnergy_conv = is_converged(conv_freeE)
is_LDAU_conv = switch_ldau .and.
......@@ -111,7 +111,6 @@
else
write(6,"(/,a)") "SCF Convergence by dHmax criterion"
endif
write(6,"(a,f14.8)") "max |H_out - H_in| (eV): ", dHmax/eV
endif
if (default_DM_convergence) then
......@@ -122,19 +121,23 @@
else
write(6,"(/,a)") "SCF Convergence by dDmax criteria"
endif
endif
if (mix_charge) then
write(6,"(a,f14.8)") "max |DM_i - DM_(i-1)|: ", dDmax
else
write(6,"(a,f14.8)") "max |DM_out - DM_in|: ", dDmax
endif
! No matter what we print out the convergence finalization step
if (mix_charge) then
write(6,"(a,f16.10)") "max |DM_i - DM_(i-1)| : ", dDmax
else
write(6,"(a,f16.10)") "max |DM_out - DM_in| : ", dDmax
endif
if ( dHmax >= 0._dp ) then
write(6,"(a,f16.10)") "max |H_out - H_in| (eV): ", dHmax/eV
end if
if ( is_LDAU_conv ) then
! Inform of LDA+U population convergence
write(6,"(/,a)")
write(6,"(a)")
$ "LDA+U population converged by dTol_pop criteria:"
write(6,"(a,f14.8)")
write(6,"(a,f16.10)")
$ "max |pop(LDA+U)_i - pop(LDA+U)_j|: ", LDAU_dPop
end if
......
......@@ -441,47 +441,39 @@
end if
endif
if (fixspin) then
if ((iscf .eq. 1).or.muldeb)
. write(6,'(/,a12,3a14,3a9)')
. ' iscf', ' Eharris(eV)',
. ' E_KS(eV)', ' FreeEng(eV)',
. ' dDmax', ' Ef_up', ' Ef_dn(eV)'
write(6,'(a8,i4,3f14.4,f9.5,2f9.4)')
. trim(scf_name)//': ',iscf, Eharrs/eV, Etot/eV, FreeE/eV, dDmax,
. (Efs(i)/eV,i=1,2)
else !fixspin
if ( NonCol .or. SpOrb ) then
if ((iscf .eq. 1).or.muldeb)
. write(6,'(/,a12,3a16,3a10)')
. ' iscf', ' Eharris(eV)',
. ' E_KS(eV)', ' FreeEng(eV)',
. ' dDmax', ' Ef(eV)', 'dHmx(Ry)'
write(6,'(a8,i4,3f16.6,3f10.6)')
if ( fixspin ) then
if ( (iscf == 1) .or. muldeb ) then
write(6,'(/,a12,3a16,4a10)')
. 'iscf', 'Eharris(eV)', 'E_KS(eV)', 'FreeEng(eV)',
. 'dDmax', 'Ef_up', 'Ef_dn(eV)','dHmax(eV)'
end if
write(6,'(a8,i4,3f16.6,4f10.6)')
. trim(scf_name)//': ',iscf, Eharrs/eV, Etot/eV, FreeE/eV,
. dDmax, Ef/eV, dHmax
else
if ((iscf .eq. 1).or.muldeb)
. write(6,'(/,a12,3a14,3a9)')
. ' iscf', ' Eharris(eV)',
. ' E_KS(eV)', ' FreeEng(eV)',
. ' dDmax', ' Ef(eV)', 'dHmx(Ry)'
write(6,'(a8,i4,3f14.4,3f9.5)')
. dDmax, Efs(1:2)/eV, dHmax/eV
else ! fixspin
if ( (iscf == 1) .or. muldeb ) then
write(6,'(/,a12,3a16,3a10)')
. 'iscf', 'Eharris(eV)', 'E_KS(eV)', 'FreeEng(eV)',
. 'dDmax','Ef(eV)','dHmax(eV)'
end if
write(6,'(a8,i4,3f16.6,3f10.6)')
. trim(scf_name)//': ',iscf, Eharrs/eV, Etot/eV, FreeE/eV,
. dDmax, Ef/eV, dHmax
end if
endif !fixspin
elseif ((isolve==SOLVE_ORDERN) .or. (isolve==SOLVE_MINIM)) then
. dDmax, Ef /eV, dHmax/eV
end if ! fixspin
elseif ((isolve==SOLVE_ORDERN) .or. (isolve==SOLVE_MINIM)) then
write(6,'(/,a15,i4)') 'siesta: iscf = ',iscf
write(6,'(a14,f15.4,a13,f15.4,a10,f7.4/)')
write(6,'(a14,f15.4,a13,f15.4,a10,f10.6/)')
. 'Eharris(eV) = ',Eharrs/eV,
. ' E_KS(eV) = ',Etot/eV,' dDmax = ',dDmax
. 'E_KS(eV) = ',Etot/eV,'dDmax = ',dDmax
if (cml_p) then
call cmlAddProperty(xf=mainXML, value=Etot/eV,
. units="siestaUnits:eV",
. dictRef="siesta:Etot", fmt="r7")
endif
endif !harrisfun/isolve
endif
endif !harrisfun/isolve
if (cml_p) then
call cmlEndPropertyList(mainXML)
......@@ -502,6 +494,14 @@
. 'siesta: ', 'Ion-ion =', (Ena+Uatm-Enaatm-Eions)/eV,
. 'siesta: ', 'Ekinion =', Ekinion/eV,
. 'siesta: ', 'Total =', (Etot+Ekinion)/eV
if ( fixspin ) then
write(6,'(a,a15,f15.6)')
. 'siesta: ', 'E_F_up =', Efs(1)/eV,
. 'siesta: ', 'E_F_dn =', Efs(2)/eV
else
write(6,'(a,a15,f15.6)')
. 'siesta: ', 'E_F =', Ef/eV
end if
if (cml_p) then
call cmlStartPropertyList(xf=mainXML, title='Final Energy')
call cmlAddProperty(xf=mainXML, value=Ebs/eV,
......@@ -578,11 +578,11 @@
#ifdef DEBUG
call write_debug( ' PRE siesta_write_forces' )
#endif
fmax = maxval(abs(fa))
ftot = sum(fa, dim=2)
cfmax = maxval(abs(cfa))
cftot = sum(cfa, dim=2)
fres = sqrt( sum(fa**2) / (na_u*3.0_dp))
fmax = maxval(abs(fa))
ftot = sum(fa, dim=2)
cfmax = maxval(abs(cfa))
cftot = sum(cfa, dim=2)
fres = sqrt( sum(fa**2) / (na_u*3.0_dp))
! Almost the same forces output whether during simulation
! or at the end. Unfortunately not quite, therefore slightly
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment