From 38950d1d8370be728a29a70a33864fc37c2df6ad Mon Sep 17 00:00:00 2001 From: sbraccia Date: Fri, 23 Jan 2004 13:50:19 +0000 Subject: [PATCH] Improved the output in the case of a neb calculation. C.S. git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@512 c92efa57-630b-4861-b058-cf58834340f0 --- Modules/formats.f90 | 4 ++-- PW/io_routines.f90 | 3 ++- PW/neb_routines.f90 | 42 +++++++++++++++++++++++------------------- PW/pwscf.f90 | 5 ----- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Modules/formats.f90 b/Modules/formats.f90 index 88439784d..72aa75b53 100644 --- a/Modules/formats.f90 +++ b/Modules/formats.f90 @@ -34,8 +34,8 @@ MODULE formats & " F10.6,5X,'error =',F10.6,/)", & run_output_T_const = "(/,5X,'iteration: ',I3,5X,'temperature ='," // & & " F10.2,5X,'forces =',F10.6)", & - final_output = "(5X,'image: ',I2,' Energy= ',F16.8," // & - & "' Error=',F8.5)" + final_output = "(5X,'image: ',I2,' Energy = ',F16.8," // & + & "' Error = ',F8.5)" ! CHARACTER (LEN=*), PARAMETER :: & stringfmt = "(5X,A,T35,' = ',A)" diff --git a/PW/io_routines.f90 b/PW/io_routines.f90 index b2e18f56e..e5a9093a4 100644 --- a/PW/io_routines.f90 +++ b/PW/io_routines.f90 @@ -477,7 +477,6 @@ MODULE io_routines ! ! ... end of local variables ! - ! DO image = 1, num_of_images ! WRITE( UNIT = iunneb, FMT = final_output ) & @@ -487,6 +486,8 @@ MODULE io_routines ! END DO ! + WRITE( UNIT = iunneb, FMT = '(/,5X,75("-")/)' ) + ! END SUBROUTINE write_output ! END MODULE io_routines diff --git a/PW/neb_routines.f90 b/PW/neb_routines.f90 index f6c7d0e04..e0198f724 100644 --- a/PW/neb_routines.f90 +++ b/PW/neb_routines.f90 @@ -163,16 +163,16 @@ MODULE neb_routines ! ! ... details of the calculation are written on output ! - WRITE( UNIT = iunneb, & - FMT = stringfmt ) "calculation", TRIM( calculation ) - WRITE( UNIT = iunneb, & - FMT = stringfmt ) "restart_mode", TRIM( restart_mode ) - WRITE( UNIT = iunneb, & - FMT = stringfmt ) "CI_scheme", TRIM( CI_scheme ) - WRITE( UNIT = iunneb, & - FMT = stringfmt ) "VEC_scheme", TRIM( VEC_scheme ) - WRITE( UNIT = iunneb, & - FMT = stringfmt ) "minimization_scheme", TRIM( minimization_scheme ) + WRITE( UNIT = iunneb, FMT = stringfmt ) & + "calculation", TRIM( calculation ) + WRITE( UNIT = iunneb, FMT = stringfmt ) & + "restart_mode", TRIM( restart_mode ) + WRITE( UNIT = iunneb, FMT = stringfmt ) & + "CI_scheme", TRIM( CI_scheme ) + WRITE( UNIT = iunneb, FMT = stringfmt ) & + "VEC_scheme", TRIM( VEC_scheme ) + WRITE( UNIT = iunneb, FMT = stringfmt ) & + "minimization_scheme", TRIM( minimization_scheme ) WRITE( UNIT = iunneb, & FMT = '(5X,"optimization",T35," = ",L1))' ) optimization WRITE( UNIT = iunneb, & @@ -224,13 +224,13 @@ MODULE neb_routines USE varie, ONLY : time_max, istep, nstep USE io_files, ONLY : iunneb, iunexit, exit_file USE formats, ONLY : run_output, run_output_T_const - USE neb_variables, ONLY : num_of_images, dim, pos, PES, error, & - climbing, optimization, CI_scheme, & + USE neb_variables, ONLY : num_of_images, dim, pos, PES, error, & + climbing, optimization, CI_scheme, & Emax_index, temp, Emax, neb_thr, conv_neb, & - suspended_image, lsteep_des, lquick_min , & + suspended_image, lsteep_des, lquick_min , & ldamped_dyn, lmol_dyn - USE io_routines, ONLY : write_restart, write_dat_files -#ifdef __PARA + USE io_routines, ONLY : write_restart, write_dat_files, write_output +#if defined (__PARA) USE para, ONLY : me, mypool USE mp, ONLY : mp_barrier #endif @@ -411,22 +411,26 @@ MODULE neb_routines CALL write_dat_files() ! istep = istep + 1 - ! + ! + ! ... informations are writte on the standard output + ! IF ( lmol_dyn ) THEN ! WRITE( UNIT = iunneb, FMT = run_output_T_const ) & - istep, & + istep, & temp * AU * eV_to_kelvin, & err * ( AU / BOHR_RADIUS_ANGS ) ! ELSE ! WRITE( UNIT = iunneb, FMT = run_output ) & - istep, & + istep, & ( Emax - PES(1) ) * AU, & err * ( AU / BOHR_RADIUS_ANGS ) ! - END IF + END IF + ! + CALL write_output() ! ! ... the program checks if the convergence has been achieved ! diff --git a/PW/pwscf.f90 b/PW/pwscf.f90 index 6662333c4..77aa948a8 100644 --- a/PW/pwscf.f90 +++ b/PW/pwscf.f90 @@ -23,7 +23,6 @@ PROGRAM pwscf USE neb_variables, ONLY : neb_deallocation USE input_parameters, ONLY : deallocate_input_parameters USE neb_routines, ONLY : initialize_neb, search_mep - USE io_routines, ONLY : write_output #ifdef __PARA USE para, ONLY : me, mypool #endif @@ -78,10 +77,6 @@ PROGRAM pwscf ! CALL search_mep() ! - ! ... output is written - ! - CALL write_output() - ! ! ... stdout is reconnected to standard output ! stdout = 6