From 10a6a7f003c889598f4e3622fbb75d03b6425344 Mon Sep 17 00:00:00 2001 From: Jonathan Moussa Date: Sat, 7 Dec 2024 22:04:40 -0500 Subject: [PATCH] Fix .arc output for zero valence electrons & zero dielectric energy --- src/output/writmo.F90 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/output/writmo.F90 b/src/output/writmo.F90 index 3421ed70..3f527bd7 100644 --- a/src/output/writmo.F90 +++ b/src/output/writmo.F90 @@ -726,6 +726,13 @@ subroutine writmo end if sum = dumy(1) ! Dummy operation - to use dumy end if + else ! make sure kchrge is defined, even with no valence electrons + sum = 0.D0 + do i = 1, numat + l = nat(i) + sum = sum + tore(l) + end do + kchrge = nint(sum) end if if (norbs > 0) then if (index(keywrd,' FOCK') /= 0) then @@ -1072,7 +1079,7 @@ subroutine writmo if (abs(solv_energy) > 1.d-1) & write (iwrite, '( 10X,''SOLVATION ENERGY ='',F17.5,'' EV'' )') solv_energy end if - if (abs(ediel) > 1.d-5) then + if (iseps) then write (iwrite, '( 10X,''DIELECTRIC ENERGY ='',F17.5,'' EV'' )') ediel end if if (Abs (pressure) > 1.d-4) then