diff --git a/src/environment.f90 b/src/environment.f90 index e4a3eed6..6f8a2fdd 100644 --- a/src/environment.f90 +++ b/src/environment.f90 @@ -944,24 +944,29 @@ END SUBROUTINE environ_init_physical !! Called by electrons.f90 !! !------------------------------------------------------------------------------------ - SUBROUTINE print_environ_energies(this, prog) + SUBROUTINE print_environ_energies(this, prog, de_flag) !-------------------------------------------------------------------------------- ! IMPLICIT NONE ! CHARACTER(LEN=2), INTENT(IN) :: prog + LOGICAL, INTENT(IN), OPTIONAL :: de_flag ! CLASS(environ_obj), TARGET, INTENT(INOUT) :: this ! INTEGER, POINTER :: unit TYPE(environ_setup), POINTER :: setup ! + LOGICAL :: print_de = .TRUE. + ! CHARACTER(LEN=80) :: sub_name = 'print_environ_energies' ! !-------------------------------------------------------------------------------- ! IF (.NOT. io%lnode) RETURN ! + IF (PRESENT(de_flag)) print_de = de_flag + ! unit => io%unit setup => this%setup ! @@ -979,7 +984,7 @@ SUBROUTINE print_environ_energies(this, prog) ! IF (setup%lelectrolyte) WRITE (unit, 1004) this%eelectrolyte ! - WRITE (unit, 1005) this%deenviron + IF (print_de) WRITE (unit, 1005) this%deenviron ! CASE ('CP') ! converted to Hartree ! diff --git a/src/setup.f90 b/src/setup.f90 index 1e75eee3..04589a06 100644 --- a/src/setup.f90 +++ b/src/setup.f90 @@ -267,6 +267,7 @@ SUBROUTINE init_environ_setup(this) OPEN (unit=io%debug_unit, file='environ.debug', status='unknown') ! END IF + ! !-------------------------------------------------------------------------------- ! CALL this%set_flags()