Blob Blame History Raw
From bd74060e4df9953bedcb1fbe5dfc7957fad0648b Mon Sep 17 00:00:00 2001
From: Jonathan Moussa <jemoussa@vt.edu>
Date: Wed, 22 Jun 2022 18:27:15 -0400
Subject: [PATCH 1/2] Fix erratic printing of GRADIENT NORM

---
 src/output/writmo.F90 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/output/writmo.F90 b/src/output/writmo.F90
index 1cf02a53..5b64f612 100644
--- a/src/output/writmo.F90
+++ b/src/output/writmo.F90
@@ -346,7 +346,7 @@ subroutine  writmo
         end if
       end if
       if (latom == 0) write (iw, '(1X)')
-      if (lprtgra .or. gnorm > 1.D-15 ) &
+      if (lprtgra) &
         write (iw, '(10X,"GRADIENT NORM           =",F17.5, 10x, "=", 7x, f'//num//'.5, '' PER ATOM'')') &
         gnorm, gnorm/sqrt(1.0*numat)
       if (gnorm > 2.D0 .and. fract > 0.05D0 .and. fract < 1.95D0 .and. &

From 23fd32012d91876b0187ab84919cbe094d43fa3b Mon Sep 17 00:00:00 2001
From: Jonathan Moussa <jemoussa@vt.edu>
Date: Wed, 22 Jun 2022 18:59:18 -0400
Subject: [PATCH 2/2] More appropriately fix erratic printing

---
 src/output/writmo.F90 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/output/writmo.F90 b/src/output/writmo.F90
index 5b64f612..9380c614 100644
--- a/src/output/writmo.F90
+++ b/src/output/writmo.F90
@@ -346,7 +346,7 @@ subroutine  writmo
         end if
       end if
       if (latom == 0) write (iw, '(1X)')
-      if (lprtgra) &
+      if (lprtgra .or. gnorm /= 0.D0) &
         write (iw, '(10X,"GRADIENT NORM           =",F17.5, 10x, "=", 7x, f'//num//'.5, '' PER ATOM'')') &
         gnorm, gnorm/sqrt(1.0*numat)
       if (gnorm > 2.D0 .and. fract > 0.05D0 .and. fract < 1.95D0 .and. &
@@ -1085,7 +1085,7 @@ subroutine  writmo
           vol,  vol*fpc_10*1.d-24
         write(iwrite,*)
       end if
-      if (lprtgra .or. gnorm > 1.D-15 ) write (iwrite, &
+      if (lprtgra .or. gnorm /= 0.D0) write (iwrite, &
         '(  10X, "GRADIENT NORM           =",F17.5, 10x, "=", 7x, f'//num//'.5, " PER ATOM")') gnorm, gnorm/sqrt(1.0*numat)
       if (latom == 0) then
         if (.not.still) then