subroutine WriteStats()
if (tLagrange) then
write(stdout, "(I12, 11F18.10)") Iteration, PotEnergy, PEInts, PEOrtho, Force, ForceInts, OrthoForce, TwoEInts, &
OrthoNorm, DistCs, DistLs, LambdaMag
write(transform_unit, "(I12, 11F18.10)") Iteration, PotEnergy, PEInts, PEOrtho, Force, ForceInts, OrthoForce, &
TwoEInts, OrthoNorm, DistCs, DistLs, LambdaMag
else if (tERLocalization .and. tHijSqrdMin) then
if (Mod(Iteration, 10) == 0) then
write(stdout, "(I12, 7F24.10)") Iteration, ERPotEnergy, HijSqrdPotEnergy, PotEnergy, Force, TotCorrectedForce, &
OrthoNorm, DistCs
write(transform_unit, "(I12, 7F24.10)") Iteration, ERPotEnergy, HijSqrdPotEnergy, PotEnergy, Force, &
TotCorrectedForce, OrthoNorm, DistCs
end if
else
if (Mod(Iteration, 10) == 0) then
write(stdout, "(I12, 5F24.10)") Iteration, PotEnergy, Force, TotCorrectedForce, OrthoNorm, DistCs
write(transform_unit, "(I12, 5F24.10)") Iteration, PotEnergy, Force, TotCorrectedForce, OrthoNorm, DistCs
end if
end if
call neci_flush(stdout)
call neci_flush(transform_unit)
! After writing out stats, test for SOFTEXIT.
if (test_SOFTEXIT()) then
write(stdout, *) 'SOFTEXIT detected, finalizing new orbitals.'
tNotConverged = .false.
end if
end subroutine WriteStats