Always print errors in bfgs_module.f90

This commit is contained in:
afonari 2020-11-23 17:16:47 +00:00
parent 9ce8cbaf70
commit 1937ac387f
1 changed files with 6 additions and 4 deletions

View File

@ -262,6 +262,12 @@ CONTAINS
IF ( .NOT. conv_bfgs .AND. ( tr_min_hit > 1 ) ) CALL infomsg( 'bfgs',&
'history already reset at previous step: stopping' )
conv_bfgs = conv_bfgs .OR. ( tr_min_hit > 1 )
!
WRITE(stdout, '(5X,"Energy error",T30,"= ",1PE12.1)') energy_error
WRITE(stdout, '(5X,"Gradient error",T30,"= ",1PE12.1)') grad_error
IF( lmovecell ) WRITE(stdout, &
'(5X,"Cell gradient error",T30,"= ",1PE12.1,/)') cell_error
!
IF ( conv_bfgs ) GOTO 1000
!
! ... some output is written
@ -275,10 +281,6 @@ CONTAINS
WRITE( UNIT = stdout, &
& FMT = '(5X,A," new",T30,"= ",F18.10," Ry",/)' ) fname,energy
!
WRITE(stdout, '(5X,"Gradient error",T30,"= ",1PE12.1)') grad_error
IF( lmovecell ) WRITE(stdout, &
'(5X,"Cell gradient error",T30,"= ",1PE12.1,/)') cell_error
!
! ... the bfgs algorithm starts here
!
IF ( .NOT. energy_wolfe_condition( energy ) .AND. (scf_iter > 1) ) THEN