X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD%2Fintcartderiv.F;h=5da4fc773be24876a57de325f0958ea12114530f;hb=ab43e2f34f74d224c31861c7ffda1bead589c7a8;hp=dd4db242526e19cf929bf818510c67a0f2b1d74d;hpb=dacb91c094eb4235f2f64a5b3097ec0b3f6ade67;p=unres.git diff --git a/source/unres/src_MD/intcartderiv.F b/source/unres/src_MD/intcartderiv.F index dd4db24..5da4fc7 100644 --- a/source/unres/src_MD/intcartderiv.F +++ b/source/unres/src_MD/intcartderiv.F @@ -52,7 +52,7 @@ c We need dtheta(:,:,i-1) to compute dphi(:,:,i) #else do i=3,nres #endif - if ((itype(i-1).ne.10).and.(itype(i-1).ne.21)) then + if ((itype(i-1).ne.10).and.(itype(i-1).ne.ntyp1)) then cost1=dcos(omicron(1,i)) sint1=sqrt(1-cost1*cost1) cost2=dcos(omicron(2,i)) @@ -151,11 +151,11 @@ c Obtaining the gamma derivatives from cosine derivative Calculate derivative of Tauangle #ifdef PARINTDER - do i=iphi1_start-1,iphi1_end + do i=itau_start,itau_end #else do i=3,nres #endif - if ((itype(i-2).eq.21).or.(itype(i-2).eq.10)) cycle + if ((itype(i-2).eq.ntyp1).or.(itype(i-2).eq.10)) cycle cc dtauangle(j,intertyp,dervityp,residue number) cc INTERTYP=1 SC...Ca...Ca..Ca c the conventional case @@ -226,11 +226,11 @@ c enddo enddo CC Second case Ca...Ca...Ca...SC #ifdef PARINTDER - do i=iphi1_start,iphi1_end + do i=itau_start,itau_end #else do i=4,nres #endif - if ((itype(i-1).eq.21).or.(itype(i-1).eq.10)) cycle + if ((itype(i-1).eq.ntyp1).or.(itype(i-1).eq.10)) cycle c the conventional case sint=dsin(omicron(1,i)) sint1=dsin(theta(i-1)) @@ -291,7 +291,7 @@ c Obtaining the gamma derivatives from cosine derivative & dcosomicron(j,1,2,i)-fac0*(dc_norm(j,i-3)-scalp* & dc_norm(j,i-1+nres))/vbld(i-1+nres) dtauangle(j,2,3,i)=-1/sing*dcostau(j,2,3,i) - write(iout,*) i,j,"else", dtauangle(j,2,3,i) +c write(iout,*) i,j,"else", dtauangle(j,2,3,i) enddo endif enddo @@ -300,13 +300,13 @@ c Obtaining the gamma derivatives from cosine derivative CCC third case SC...Ca...Ca...SC #ifdef PARINTDER - do i=iphi1_start-1,iphi1_end + do i=itau_start,itau_end #else do i=3,nres #endif c the conventional case - if ((itype(i-1).eq.21).or.(itype(i-1).eq.10).or. - &(itype(i-2).eq.21).or.(itype(i-2).eq.10)) cycle + if ((itype(i-1).eq.ntyp1).or.(itype(i-1).eq.10).or. + &(itype(i-2).eq.ntyp1).or.(itype(i-2).eq.10)) cycle sint=dsin(omicron(1,i)) sint1=dsin(omicron(2,i-1)) sing=dsin(tauangle(3,i)) @@ -364,7 +364,7 @@ c Obtaining the gamma derivatives from cosine derivative & dcosomicron(j,1,2,i)-fac0*(dc_norm2(j,i-2+nres)-scalp* & dc_norm(j,i-1+nres))/vbld(i-1+nres) dtauangle(j,3,3,i)=-1/sing*dcostau(j,3,3,i) - write(iout,*) "else",i +c write(iout,*) "else",i enddo endif enddo @@ -458,12 +458,12 @@ c obtaining the derivatives of omega from cosines #if defined(MPI) && defined(PARINTDER) if (nfgtasks.gt.1) then #ifdef DEBUG -cd write (iout,*) "Gather dtheta" + write (iout,*) "Gather dtheta" cd call flush(iout) - write (iout,*) "dtheta before gather" - do i=1,nres - write (iout,'(i3,3(3f8.5,3x))') i,((dtheta(j,k,i),k=1,3),j=1,2) - enddo +c write (iout,*) "dtheta before gather" +c do i=1,nres +c write (iout,'(i3,3(3f8.5,3x))') i,((dtheta(j,k,i),k=1,3),j=1,2) +c enddo #endif call MPI_Gatherv(dtheta(1,1,ithet_start),ithet_count(fg_rank), & MPI_THET,dtheta(1,1,1),ithet_count(0),ithet_displ(0),MPI_THET,