dissulfides energy and gfortran ctests
[unres.git] / source / unres / src_MD / unres.F
index 632374b..c0e49ce 100644 (file)
@@ -189,6 +189,7 @@ c---------------------------------------------------------------------------
       double precision energy(0:n_ene)
       double precision energy_long(0:n_ene),energy_short(0:n_ene)
       double precision varia(maxvar)
+      integer nharp,iharp(4,maxres/3)
       if (indpdb.eq.0) call chainbuild
 #ifdef MPI
       time00=MPI_Wtime()
@@ -219,7 +220,6 @@ c---------------------------------------------------------------------------
       time_ene=tcpu()-time00
 #endif
       write (iout,*) "Time for energy evaluation",time_ene
-      print *,"after etotal"
       etota = energy(0)
       etot =etota
       call enerprint(energy(0))
@@ -228,18 +228,14 @@ c---------------------------------------------------------------------------
       if (minim) then
 crc overlap test
         if (overlapsc) then 
-          print *, 'Calling OVERLAP_SC'
           call overlap_sc(fail)
         endif 
 
         if (searchsc) then 
           call sc_move(2,nres-1,10,1d10,nft_sc,etot)
-          print *,'SC_move',nft_sc,etot
-          write(iout,*) 'SC_move',nft_sc,etot
         endif 
 
         if (dccart) then
-          print *, 'Calling MINIM_DC'
 #ifdef MPI
           time1=MPI_WTIME()
 #else
@@ -252,7 +248,6 @@ crc overlap test
             call chainbuild
           endif
           call geom_to_var(nvar,varia)
-          print *,'Calling MINIMIZE.'
 #ifdef MPI
           time1=MPI_WTIME()
 #else
@@ -285,8 +280,15 @@ crc overlap test
         if (refstr) call rms_nac_nnc(rms,frac,frac_nn,co,.true.)
         call briefout(0,etot)
       endif
+      potE=etot
+#ifdef NOXDR
+       if (outx) call cartout(0.0d0)
+#else
+       if (outx) call cartoutx(0.0d0)
+#endif
       if (outpdb) call pdbout(etot,titel(:32),ipdb)
       if (outmol2) call mol2out(etot,titel(:32))
+      if (minim .and. iretcode.ne.4) call check_ecartint
       return
       end
 c---------------------------------------------------------------------------
@@ -323,6 +325,12 @@ c---------------------------------------------------------------------------
       call enerprint(energy(0))
       call intout
       call briefout(0,etot)
+      potE=etot
+#ifdef NOXDR
+      if (outx) call cartout(0.0d0)
+#else
+      if (outx) call cartoutx(0.0d0)
+#endif
       if (outpdb) call pdbout(etot,titel(:32),ipdb)
       if (outmol2) call mol2out(etot,titel(:32))
       if (refstr) call rms_nac_nnc(rms,frac,frac_nn,co,.true.)