--- source/charmm/miscom.src (c36a2) +++ source/charmm/miscom.src (c36a3) @@ -804,6 +804,17 @@ ELSE IF (WRD.EQ.'SYST') THEN CALL CSYSTEM(COMLYN,COMLEN) C + ELSE IF (WRD.EQ.'FRCD') THEN + iunit=GTRMI(COMLYN,COMLEN,'UNIT',outu) + if(prnlev.ge.3) then + if(iunit.gt.0) then + write(outu, + & '(" Energies and Forces dumped to unit ", i6)' + & ) iunit + endif + endif + call DumpEnFrc(iunit) +C ELSE IF (WRD.EQ.'STOP') THEN CALL STOPCH('NORMAL STOP') C --- source/energy/printe.src (c36a2) +++ source/energy/printe.src (c36a3) @@ -998,3 +998,38 @@ return end + SUBROUTINE DumpEnFRC(UNIT) +C----------------------------------------------------------------------- +C Prints energy terms and forces for testing purposes +C +C UNIT The unit for the printing. +C + + +##INCLUDE '~/charmm_fcm/impnon.fcm' +##INCLUDE '~/charmm_fcm/chm_kinds.fcm' +C +##INCLUDE '~/charmm_fcm/dimens.fcm' +##INCLUDE '~/charmm_fcm/deriv.fcm' +##INCLUDE '~/charmm_fcm/energy.fcm' +##INCLUDE '~/charmm_fcm/psf.fcm' +##INCLUDE '~/charmm_fcm/stream.fcm' +C . Passed variables. +C . Local variables. + INTEGER I, unit + REAL(chm_real), PARAMETER :: ACCU=0.49D-6 + + if (prnlev <= 3) return + write(unit,'("NATOM",i12/"ENERGY"/a6,d26.16)') + & natom, ceprop(epot), eprop(epot) + do i=1, lenent + if(abs(eterm(i)).gt.accu) + & write(unit,'(a6,d26.16)') ceterm(i), eterm(i) + enddo + write(unit,'("FORCE")') + do i=1, natom + write(unit,'(i10,3(d26.16))') i, dx(i), dy(i), dz(i) + enddo + RETURN + END +