From 3f9890a5f4173b1781f1b8b3cdb0145d7455cfde Mon Sep 17 00:00:00 2001 From: Adam Kazimierz Sieradzan Date: Tue, 29 May 2012 07:18:45 -0400 Subject: [PATCH] zmienionwe zostaly i zostal chyba tylko int to cart deriv --- source/unres/src_MD/checkder_p.F | 5 +++-- source/unres/src_MD/energy_p_new_barrier.F | 4 +++- source/unres/src_MD/int_to_cart.f | 17 +++++++++++++---- source/unres/src_MD/intcartderiv.F | 9 +++++---- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/source/unres/src_MD/checkder_p.F b/source/unres/src_MD/checkder_p.F index ec66acd..719770e 100644 --- a/source/unres/src_MD/checkder_p.F +++ b/source/unres/src_MD/checkder_p.F @@ -502,7 +502,7 @@ c------------------------------------------------------------------------- time01=MPI_Wtime() #endif #if defined(PARINT) && defined(MPI) - do i=iint_start,iint_end + do i=iint_start,iint_end+1 #else do i=2,nres #endif @@ -514,7 +514,7 @@ c------------------------------------------------------------------------- enddo be=0.0D0 if (i.gt.2) then - phi(i+1)=beta(i-2,i-1,i,i+1) + if (i.le.nres) phi(i+1)=beta(i-2,i-1,i,i+1) if (itype(i).ne.10).and.(itype(i-1).ne.10) then tauangle(3,i+1)=beta(i+nres-1,i-1,i,i+nres) endif @@ -539,6 +539,7 @@ c------------------------------------------------------------------------- vbld_inv(nres+i)=0.0d0 endif enddo + #if defined(PARINT) && defined(MPI) if (nfgtasks1.gt.1) then cd write(iout,*) "iint_start",iint_start," iint_count", diff --git a/source/unres/src_MD/energy_p_new_barrier.F b/source/unres/src_MD/energy_p_new_barrier.F index 23449da..f53a75f 100644 --- a/source/unres/src_MD/energy_p_new_barrier.F +++ b/source/unres/src_MD/energy_p_new_barrier.F @@ -5867,7 +5867,7 @@ C Set lprn=.true. for debugging c lprn=.true. c write (iout,*) "EBACK_SC_COR",iphi_start,iphi_end,nterm_sccor esccor=0.0D0 - do i=iphi_start,iphi_end + do i=iphi_start-1,iphi_end+1 esccor_ii=0.0D0 isccori=isccortyp(itype(i-2)) isccori1=isccortyp(itype(i-1)) @@ -5889,6 +5889,8 @@ c 3 = SC...Ca...Ca...SC & (itype(i-1).eq.10)) & .or. ((intertyp.eq.1).and.(itype(i-2).ne.10)) & .or. ((intertyp.eq.2).and.(itype(i-1).ne.10))) cycle + if ((intertyp.eq.2).and.(i.eq.iphi_start-1)) cycle + if ((intertyp.eq.1).and.(i.eq.iphi_end+1)) cycle do j=1,nterm_sccor(isccori,isccori1) v1ij=v1sccor(j,intertyp,isccori,isccori1) v2ij=v2sccor(j,intertyp,isccori,isccori1) diff --git a/source/unres/src_MD/int_to_cart.f b/source/unres/src_MD/int_to_cart.f index 2564372..3d29019 100644 --- a/source/unres/src_MD/int_to_cart.f +++ b/source/unres/src_MD/int_to_cart.f @@ -113,16 +113,25 @@ c The side-chain vector derivatives enddo endif enddo +c---------------------------------------------------------------------- C INTERTYP=1 SC...Ca...Ca...Ca +C INTERTYP=2 Ca...Ca...Ca...SC +C INTERTYP=3 SC...Ca...Ca...SC c calculating dE/ddc1 - intertyp=1 if (nres.lt.2) return if ((nres.lt.3).and.(itype(1).eq.1)) return if (itype(1).ne.10) then do j=1,3 - gxcart(j,1)=gxcart(j,1)+gloc_sc(intertyp,1,icg)* - & dtauangle(j,1,1,4) -c As potetnial DO NOT +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)* + & 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) +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 diff --git a/source/unres/src_MD/intcartderiv.F b/source/unres/src_MD/intcartderiv.F index c7cf95c..d029e18 100644 --- a/source/unres/src_MD/intcartderiv.F +++ b/source/unres/src_MD/intcartderiv.F @@ -149,10 +149,11 @@ c Obtaining the gamma derivatives from cosine derivative Calculate derivative of Tauangle #ifdef PARINTDER - do i=iphi1_start,iphi1_end + do i=iphi1_start-1,iphi1_end #else - do i=4,nres + do i=3,nres #endif +cc dtauangle(j,intertyp,dervityp,residue number) cc INTERTYP=1 SC...Ca...Ca..Ca c the conventional case sint=dsin(theta(i)) @@ -285,9 +286,9 @@ c Obtaining the gamma derivatives from cosine derivative CCC third case SC...Ca...Ca...SC #ifdef PARINTDER - do i=iphi1_start,iphi1_end + do i=iphi1_start-1,iphi1_end #else - do i=4,nres + do i=3,nres #endif c the conventional case sint=dsin(omicron(1,i)) -- 1.7.9.5