debug w poszukiwaniu bledu w ostatniej reszcie
[unres.git] / source / unres / src_MD-M / energy_p_new_barrier.F
index b9d17fe..0c2f5ed 100644 (file)
@@ -85,7 +85,7 @@ C FG slaves receive the WEIGHTS array
         time_Bcastw=time_Bcastw+MPI_Wtime()-time00
 c        call chainbuild_cart
       endif
-c      print *,'Processor',myrank,' calling etotal ipot=',ipot
+C      print *,'Processor',myrank,' calling etotal ipot=',ipot
 c      print *,'Processor',myrank,' nnt=',nnt,' nct=',nct
 #else
 c      if (modecalc.eq.12.or.modecalc.eq.14) then
@@ -98,6 +98,7 @@ c      endif
 C 
 C Compute the side-chain and electrostatic interaction energy
 C
+C      write(iout,*) "zaczynam liczyc energie"
       goto (101,102,103,104,105,106) ipot
 C Lennard-Jones potential.
   101 call elj(evdw)
@@ -117,10 +118,13 @@ C Gay-Berne-Vorobjev potential (shifted LJ, angular dependence).
       goto 107
 C Soft-sphere potential
   106 call e_softsphere(evdw)
+C      write(iout,*) "skonczylem ipoty"
+
 C
 C Calculate electrostatic (H-bonding) energy of the main chain.
 C
   107 continue
+C           write(iout,*) "skonczylem ipoty"
 cmc
 cmc Sep-06: egb takes care of dynamic ss bonds too
 cmc
@@ -442,7 +446,6 @@ cMS$ATTRIBUTES C ::  proc_proc
 #endif
       double precision gradbufc(3,maxres),gradbufx(3,maxres),
      &  glocbuf(4*maxres),gradbufc_sum(3,maxres),gloc_scbuf(3,maxres)
-#endif
       include 'COMMON.SETUP'
       include 'COMMON.IOUNITS'
       include 'COMMON.FFIELD'
@@ -2338,6 +2341,7 @@ C
         endif
 c        if (i.gt. iatel_s+2 .and. i.lt.iatel_e+5) then
         if (i.gt. nnt+2 .and. i.lt.nct+2) then
+c        write(iout,*) (itype(i-2))
           iti = itortyp(itype(i-2))
         else
           iti=ntortyp+1
@@ -2718,7 +2722,7 @@ C
       dimension ggg(3),gggp(3),gggm(3),erij(3),dcosb(3),dcosg(3),
      &          erder(3,3),uryg(3,3),urzg(3,3),vryg(3,3),vrzg(3,3)
       double precision acipa(2,2),agg(3,4),aggi(3,4),aggi1(3,4),
-     &    aggj(3,4),aggj1(3,4),a_temp(2,2),muij(4)
+     &    aggj(3,4),aggj1(3,4),a_temp(2,2),muij(4),eel_loc_ij
       common /locel/ a_temp,agg,aggi,aggi1,aggj,aggj1,a22,a23,a32,a33,
      &    dxi,dyi,dzi,dx_normi,dy_normi,dz_normi,xmedi,ymedi,zmedi,
      &    num_conti,j1,j2
@@ -2761,6 +2765,7 @@ c        call vec_and_deriv
         time01=MPI_Wtime()
 #endif
         call set_matrices
+c        write (iout,*) "after set matrices"
 #ifdef TIMING
         time_mat=time_mat+MPI_Wtime()-time01
 #endif
@@ -2797,6 +2802,7 @@ c 9/27/08 AL Split the interaction loop to ensure load balancing of turn terms
 C
 C Loop over i,i+2 and i,i+3 pairs of the peptide groups
 C
+c      write(iout,*) "przed turnem3 loop"
       do i=iturn3_start,iturn3_end
         if (itype(i).eq.21 .or. itype(i+1).eq.21 
      &  .or. itype(i+2).eq.21 .or. itype(i+3).eq.21) cycle
@@ -2889,7 +2895,7 @@ C-------------------------------------------------------------------------------
       dimension ggg(3),gggp(3),gggm(3),erij(3),dcosb(3),dcosg(3),
      &          erder(3,3),uryg(3,3),urzg(3,3),vryg(3,3),vrzg(3,3)
       double precision acipa(2,2),agg(3,4),aggi(3,4),aggi1(3,4),
-     &    aggj(3,4),aggj1(3,4),a_temp(2,2),muij(4)
+     &    aggj(3,4),aggj1(3,4),a_temp(2,2),muij(4),a22,a23,a32,a33
       common /locel/ a_temp,agg,aggi,aggi1,aggj,aggj1,a22,a23,a32,a33,
      &    dxi,dyi,dzi,dx_normi,dy_normi,dz_normi,xmedi,ymedi,zmedi,
      &    num_conti,j1,j2
@@ -3659,7 +3665,7 @@ c        write (iout,*) "eturn4 i",i," j",j," j1",j1," j2",j2
         iti1=itortyp(itype(i+1))
         iti2=itortyp(itype(i+2))
         iti3=itortyp(itype(i+3))
-c        write(iout,*) "iti1",iti1," iti2",iti2," iti3",iti3
+        write(iout,*) "iti1",iti1," iti2",iti2," iti3",iti3
         call transpose2(EUg(1,1,i+1),e1t(1,1))
         call transpose2(Eug(1,1,i+2),e2t(1,1))
         call transpose2(Eug(1,1,i+3),e3t(1,1))
@@ -5646,7 +5652,7 @@ C Set lprn=.true. for debugging
       lprn=.false.
 c     lprn=.true.
       etors_d=0.0D0
-c      write(iout,*) "a tu??"
+C      write(iout,*) "a tu??"
       do i=iphid_start,iphid_end
         if (itype(i-2).eq.21 .or. itype(i-1).eq.21
      &      .or. itype(i).eq.21 .or. itype(i+1).eq.21) cycle