1 2! Copyright (C) 2007 J. K. Dewhurst, S. Sharma and E. K. U. Gross. 3! This file is distributed under the terms of the GNU General Public License. 4! See the file COPYING for license details. 5 6!BOP 7! !ROUTINE: rdmwriteengy 8! !INTERFACE: 9subroutine rdmwriteengy(fnum) 10! !USES: 11use modmain 12use modrdm 13! !INPUT/OUTPUT PARAMETERS: 14! fnum : file number for writing output (in,integer) 15! !DESCRIPTION: 16! Writes all contributions to the total energy to file. 17! 18! !REVISION HISTORY: 19! Created 2008 (Sharma) 20!EOP 21!BOC 22implicit none 23! arguments 24integer, intent(in) :: fnum 25write(fnum,*) 26write(fnum,'("Energies :")') 27write(fnum,'(" electronic kinetic",T30,": ",G18.10)') engykn 28write(fnum,'(" core electron kinetic",T30,": ",G18.10)') engykncr 29write(fnum,'(" Coulomb",T30,": ",G18.10)') engyvcl 30write(fnum,'(" Madelung",T30,": ",G18.10)') engymad 31write(fnum,'(" exchange-correlation",T30,": ",G18.10)') engyx 32if (rdmtemp.gt.0.d0) then 33 write(fnum,'(" entropy",T30,": ",G18.10)') rdmentrpy 34end if 35write(fnum,'(" total energy",T30,": ",G18.10)') engytot 36flush(fnum) 37end subroutine 38!EOC 39 40