X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD-M%2Fint_to_cart.f;h=d3a8a92b076f8f57b55eba2f9e339d4765e8b3b9;hb=c7a96454a5265471d175bbe066071ac41c8b55c3;hp=24ce0bcf5c98ebbb236c71759899039ad2408f9a;hpb=29a093f001749a47ac4054191a494bdc35178a39;p=unres.git diff --git a/source/unres/src_MD-M/int_to_cart.f b/source/unres/src_MD-M/int_to_cart.f index 24ce0bc..d3a8a92 100644 --- a/source/unres/src_MD-M/int_to_cart.f +++ b/source/unres/src_MD-M/int_to_cart.f @@ -14,7 +14,9 @@ c------------------------------------------------------------- include 'COMMON.MD' include 'COMMON.IOUNITS' include 'COMMON.SCCOR' -c calculating dE/ddc1 + include 'COMMON.CONTROL' +c calculating dE/ddc1 +C print *,"wchodze22",ialph(2,1) if (nres.lt.3) go to 18 do j=1,3 gcart(j,1)=gcart(j,1)+gloc(1,icg)*dphi(j,1,4) @@ -24,6 +26,7 @@ c calculating dE/ddc1 & gloc(ialph(2,1)+nside,icg)*domega(j,1,2) endif enddo +C print *,"wchodze22",ialph(2,1) c Calculating the remainder of dE/ddc2 do j=1,3 gcart(j,2)=gcart(j,2)+gloc(1,icg)*dphi(j,2,4)+ @@ -40,6 +43,7 @@ c Calculating the remainder of dE/ddc2 gcart(j,2)=gcart(j,2)+gloc(2,icg)*dphi(j,1,5) endif enddo +C print *,"wchodze22",ialph(2,1) c If there are only five residues if(nres.eq.5) then do j=1,3 @@ -58,23 +62,27 @@ c If there are only five residues endif c If there are more than five residues if(nres.gt.5) then +C print *,"wchodze22",ialph(2,1) do i=3,nres-3 +C print *,i,ialph(i,1)+nside do j=1,3 gcart(j,i)=gcart(j,i)+gloc(i-2,icg)*dphi(j,3,i+1) & +gloc(i-1,icg)*dphi(j,2,i+2)+ & gloc(i,icg)*dphi(j,1,i+3)+gloc(nres+i-4,icg)*dtheta(j,2,i+1)+ & gloc(nres+i-3,icg)*dtheta(j,1,i+2) - if(itype(i).ne.10) then + if((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then gcart(j,i)=gcart(j,i)+gloc(ialph(i,1),icg)*dalpha(j,2,i)+ & gloc(ialph(i,1)+nside,icg)*domega(j,2,i) endif - if(itype(i+1).ne.10) then + if((itype(i+1).ne.10).and.(itype(i+1).ne.ntyp1)) then gcart(j,i)=gcart(j,i)+gloc(ialph(i+1,1),icg)*dalpha(j,1,i+1) & +gloc(ialph(i+1,1)+nside,icg)*domega(j,1,i+1) endif enddo enddo endif +C print *,"wchodze22",ialph(2,1) + c Setting dE/ddnres-2 if(nres.gt.5) then do j=1,3 @@ -106,7 +114,7 @@ c Settind dE/ddnres-1 enddo c The side-chain vector derivatives do i=2,nres-1 - if(itype(i).ne.10 .and. itype(i).ne.21) then + if(itype(i).ne.10 .and. itype(i).ne.ntyp1) then do j=1,3 gxcart(j,i)=gxcart(j,i)+gloc(ialph(i,1),icg)*dalpha(j,3,i) & +gloc(ialph(i,1)+nside,icg)*domega(j,3,i) @@ -123,6 +131,7 @@ c do i=1,nres c gloc(i,icg)=0.0D0 c write (iout,*) "poczotkoawy",i,gloc_sc(1,i,icg) c enddo +C print *,"tu dochodze??" if (nres.lt.2) return if ((nres.lt.3).and.(itype(1).eq.10)) return if ((itype(1).ne.10).and.(itype(1).ne.ntyp1)) then @@ -267,6 +276,13 @@ c Settind dE/ddnres enddo endif c The side-chain vector derivatives +C if (SELFGUIDE.gt.0) then +C do j=1,3 +C gcart(j,afmbeg)=gcart(j,afmbeg)+gcart(j,afmend) +C gcart(j,afmbeg)=0.0d0 +C gcart(j,afmend)=0.0d0 +C enddo +C endif return end