X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD-M%2Fintcartderiv.F;h=227a119f739b20d90717bdc2c98d99fa8c16f86f;hb=6c0d9d49feaa4dd54945a4e74fa72a18efdf3a0e;hp=12d7deedbd57d150be5b20d49d6b586b46473363;hpb=892c42fe1b098aac20f41e47faf97b1b2479b647;p=unres.git diff --git a/source/unres/src_MD-M/intcartderiv.F b/source/unres/src_MD-M/intcartderiv.F index 12d7dee..227a119 100644 --- a/source/unres/src_MD-M/intcartderiv.F +++ b/source/unres/src_MD-M/intcartderiv.F @@ -48,10 +48,12 @@ c We need dtheta(:,:,i-1) to compute dphi(:,:,i) do j=1,3 dcostheta(j,1,i)=-(dc_norm(j,i-1)+cost*dc_norm(j,i-2))/ & vbld(i-1) - if (itype(i-1).ne.ntyp1) dtheta(j,1,i)=-dcostheta(j,1,i)/sint +c if (itype(i-1).ne.ntyp1) + dtheta(j,1,i)=-dcostheta(j,1,i)/sint dcostheta(j,2,i)=-(dc_norm(j,i-2)+cost*dc_norm(j,i-1))/ & vbld(i) - if (itype(i-1).ne.ntyp1) dtheta(j,2,i)=-dcostheta(j,2,i)/sint +c if (itype(i-1).ne.ntyp1) + dtheta(j,2,i)=-dcostheta(j,2,i)/sint enddo enddo #if defined(MPI) && defined(PARINTDER) @@ -117,7 +119,7 @@ c the conventional case c Obtaining the gamma derivatives from sine derivative if (phi(i).gt.-pi4.and.phi(i).le.pi4.or. & phi(i).gt.pi34.and.phi(i).le.pi.or. - & phi(i).gt.-pi.and.phi(i).le.-pi34) then + & phi(i).ge.-pi.and.phi(i).le.-pi34) then call vecpr(dc_norm(1,i-1),dc_norm(1,i-2),vp1) call vecpr(dc_norm(1,i-3),dc_norm(1,i-1),vp2) call vecpr(dc_norm(1,i-3),dc_norm(1,i-2),vp3) @@ -161,6 +163,11 @@ c endif endif enddo Calculate derivative of Tauangle + do i=1,nres-1 + do j=1,3 + dc_norm2(j,i+nres)=-dc_norm(j,i+nres) + enddo + enddo #ifdef PARINTDER do i=itau_start,itau_end #else @@ -192,7 +199,7 @@ cc write(iout,*) "faki",fac0,fac1,fac2,fac3,fac4 c Obtaining the gamma derivatives from sine derivative if (tauangle(1,i).gt.-pi4.and.tauangle(1,i).le.pi4.or. & tauangle(1,i).gt.pi34.and.tauangle(1,i).le.pi.or. - & tauangle(1,i).gt.-pi.and.tauangle(1,i).le.-pi34) then + & tauangle(1,i).ge.-pi.and.tauangle(1,i).le.-pi34) then call vecpr(dc_norm(1,i-1),dc_norm(1,i-2),vp1) call vecpr(dc_norm2(1,i-2+nres),dc_norm(1,i-1),vp2) call vecpr(dc_norm2(1,i-2+nres),dc_norm(1,i-2),vp3) @@ -339,7 +346,7 @@ c dc_norm2(j,i-1+nres)=-dc_norm(j,i-1+nres) c Obtaining the gamma derivatives from sine derivative if (tauangle(3,i).gt.-pi4.and.tauangle(3,i).le.pi4.or. & tauangle(3,i).gt.pi34.and.tauangle(3,i).le.pi.or. - & tauangle(3,i).gt.-pi.and.tauangle(3,i).le.-pi34) then + & tauangle(3,i).ge.-pi.and.tauangle(3,i).le.-pi34) then call vecpr(dc_norm(1,i-1+nres),dc_norm(1,i-2),vp1) call vecpr(dc_norm2(1,i-2+nres),dc_norm(1,i-1+nres),vp2) call vecpr(dc_norm2(1,i-2+nres),dc_norm(1,i-2),vp3) @@ -418,7 +425,7 @@ c write (iout,*) "i",i," cosa",cosa," sina",sina," sino",sino c obtaining the derivatives of omega from sines if(omeg(i).gt.-pi4.and.omeg(i).le.pi4.or. & omeg(i).gt.pi34.and.omeg(i).le.pi.or. - & omeg(i).gt.-pi.and.omeg(i).le.-pi34) then + & omeg(i).ge.-pi.and.omeg(i).le.-pi34) then fac15=dcos(theta(i+1))/(dsin(theta(i+1))* & dsin(theta(i+1))) fac16=dcos(alph(i))/(dsin(alph(i))*dsin(alph(i))) @@ -749,6 +756,7 @@ c c(j,1)=c(j,1) c(j,i+nres)=c(j,i)+dc(j,i+nres) enddo enddo +C print *,'tutu' c write (iout,*) "CHAINBUILD_CART" c call cartprint call int_from_cart1(.false.)