kolejna
authorAdam Kazimierz Sieradzan <adasko@sun1.chem.univ.gda.pl>
Tue, 29 May 2012 12:02:25 +0000 (08:02 -0400)
committerAdam Kazimierz Sieradzan <adasko@sun1.chem.univ.gda.pl>
Tue, 29 May 2012 12:02:25 +0000 (08:02 -0400)
source/unres/src_MD/energy_p_new_barrier.F
source/unres/src_MD/int_to_cart.f

index f53a75f..daf4d6f 100644 (file)
@@ -5899,7 +5899,7 @@ c   3 = SC...Ca...Ca...SC
           esccor=esccor+v1ij*cosphi+v2ij*sinphi
           gloci=gloci+j*(v2ij*cosphi-v1ij*sinphi)
         enddo
-        gloc_sc(intertyp,i-3,icg)=gloc_sc(i-3,icg)+wtor*gloci
+        gloc_sc(intertyp,i-3,icg)=gloc_sc(intertyp,i-3,icg)+wtor*gloci
         if (lprn)
      &  write (iout,'(2(a3,2x,i3,2x),2i3,6f8.3/26x,6f8.3/)')
      &  restyp(itype(i-2)),i-2,restyp(itype(i-1)),i-1,itori,itori1,
index 3d29019..4b2f3b5 100644 (file)
@@ -124,17 +124,26 @@ c   calculating dE/ddc1
         do j=1,3
 cc Derviative was calculated for oposite vector of side chain therefore
 c there is "-" sign before gloc_sc
-         gxcart(j,1)=gxcart(j,1)-gloc_sc(1,1,icg)*
+         gxcart(j,1)=gxcart(j,1)-gloc_sc(1,0,icg)*
      &     dtauangle(j,1,1,3)
-         gcart(j,1)=gcart(j,1)+gloc_sc(1,1,icg)*
-     &     dtauangle(j,
-          if (itype(2).ne.10) gxcart(j,1)=gxcart(j,1)
-     &-gloc_sc(3,1,icg)*dtauangle(j,3,1,3)
+         gcart(j,1)=gcart(j,1)+gloc_sc(1,0,icg)*
+     &     dtauangle(j,1,2,3)
+          if (itype(2).ne.10) then
+         gxcart(j,1)= gxcart(j,1)
+     &               -gloc_sc(3,0,icg)*dtauangle(j,3,1,3)
+         gcart(j,1)=gcart(j,1)+gloc_sc(3,0,icg)*
+            dtauangle(j,3,2,3)
+          endif
 c   As potetnial DO NOT depend on omicron anlge their derivative is
 c   ommited 
 c     &     +gloc_sc(intertyp,nres-2,icg)*dtheta(j,1,3)         
         enddo
        endif
+       if (itype(3).ne.10) then
+       do j=1,3
+       gcart(j,1)=gcart(j,1)+
+     & gloc_sc(2,1,icg)*dtauangle(j,2,2,4)
+       enddo
 c     Calculating the remainder of dE/ddc2
        do j=1,3
          gcart(j,2)=gcart(j,2)+gloc(1,icg)*dphi(j,2,4)+