X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD-M%2Fenergy_p_new_barrier.F;h=b651f0abf2987879f2d0bc41b3629006f3fae3b9;hb=7d06b1abfc970dfbe0f82b95c6e20f411547d65e;hp=6df357a7656a9243d605896014a5a1a41d3c1a70;hpb=7f0180cec09003eb00ab68b95110de7bd15d81a1;p=unres.git diff --git a/source/unres/src_MD-M/energy_p_new_barrier.F b/source/unres/src_MD-M/energy_p_new_barrier.F index 6df357a..b651f0a 100644 --- a/source/unres/src_MD-M/energy_p_new_barrier.F +++ b/source/unres/src_MD-M/energy_p_new_barrier.F @@ -296,6 +296,8 @@ C energia(17)=estr energia(20)=Uconst+Uconst_back energia(21)=esccor +c Here are the energies showed per procesor if the are more processors +c per molecule then we sum it up in sum_energy subroutine c print *," Processor",myrank," calls SUM_ENERGY" call sum_energy(energia,.true.) c print *," Processor",myrank," left SUM_ENERGY" @@ -2369,7 +2371,11 @@ c if (i .gt. iatel_s+2) then enddo c if (i.gt. iatel_s+1 .and. i.lt.iatel_e+4) then if (i.gt. nnt+1 .and. i.lt.nct+1) then - iti1 = itortyp(itype(i-1)) + if (itype(i-1).le.ntyp) then + iti1 = itortyp(itype(i-1)) + else + iti1=ntortyp+1 + endif else iti1=ntortyp+1 endif @@ -2938,7 +2944,9 @@ cd & 1.0D0/dsqrt(rrmij),evdwij,eesij, cd & xmedi,ymedi,zmedi,xj,yj,zj if (energy_dec) then - write (iout,'(a6,2i5,0pf7.3)') 'evdw1',i,j,evdwij + write (iout,'(a6,2i5,0pf7.3,2i5,2e11.3)') + &'evdw1',i,j,evdwij + &,iteli,itelj,aaa,evdw1 write (iout,'(a6,2i5,0pf7.3)') 'ees',i,j,eesij endif @@ -3270,6 +3278,7 @@ cd write (iout,*) 'i',i,' j',j,' eel_loc_ij',eel_loc_ij if (energy_dec) write (iout,'(a6,2i5,0pf7.3)') & 'eelloc',i,j,eel_loc_ij +c write (iout,*) a22,muij(1),a23,muij(2),a32,muij(3) eel_loc=eel_loc+eel_loc_ij C Partial derivatives in virtual-bond dihedral angles gamma @@ -3956,8 +3965,9 @@ C Uncomment following three lines for Ca-p interactions endif evdwij=e1+e2 evdw2=evdw2+evdwij - if (energy_dec) write (iout,'(a6,2i5,0pf7.3)') - & 'evdw2',i,j,evdwij + if (energy_dec) write (iout,'(a6,2i5,0pf7.3,2i3,3e11.3)') + & 'evdw2',i,j,evdwij,iteli,itypj,fac,aad(itypj,iteli), + & bad(itypj,iteli) C C Calculate contributions to the gradient in the virtual-bond and SC vectors. C @@ -4611,14 +4621,14 @@ C propagation of chirality for glycine type sinph1ph2(k,l)=scl-csl enddo enddo -c if (lprn) then + if (lprn) then write (iout,*) "i",i," ityp1",ityp1," ityp2",ityp2, & " ityp3",ityp3," theti2",theti2," phii",phii," phii1",phii1 -c write (iout,*) "coskt and sinkt" -c do k=1,nntheterm -c write (iout,*) k,coskt(k),sinkt(k) -c enddo -c endif + write (iout,*) "coskt and sinkt" + do k=1,nntheterm + write (iout,*) k,coskt(k),sinkt(k) + enddo + endif do k=1,ntheterm ethetai=ethetai+aathet(k,ityp1,ityp2,ityp3,iblock)*sinkt(k) dethetai=dethetai+0.5d0*k*aathet(k,ityp1,ityp2,ityp3,iblock) @@ -4701,8 +4711,8 @@ c endif enddo 10 continue c lprn1=.true. -c if (lprn1) - write (iout,'(i2,3f8.1,9h ethetai ,f10.5)') + if (lprn1) + & write (iout,'(i2,3f8.1,9h ethetai ,f10.5)') & i,theta(i)*rad2deg,phii*rad2deg, & phii1*rad2deg,ethetai c lprn1=.false. @@ -5048,7 +5058,7 @@ C cosfac=dsqrt(cosfac2) sinfac2=0.5d0/(1.0d0-costtab(i+1)) sinfac=dsqrt(sinfac2) - it=itype(i) + it=iabs(itype(i)) if (it.eq.10) goto 1 c C Compute the axes of tghe local cartesian coordinates system; store in @@ -5066,7 +5076,7 @@ C & dc_norm(3,i+nres) y_prime(j) = (dc_norm(j,i) + dc_norm(j,i-1))*sinfac enddo do j = 1,3 - z_prime(j) = -uz(j,i-1)*dsign(1.0,dfloat(itype(i))) + z_prime(j) = -uz(j,i-1)*dsign(1.0d0,dfloat(itype(i))) enddo c write (2,*) "i",i c write (2,*) "x_prime",(x_prime(j),j=1,3) @@ -5148,7 +5158,8 @@ c & sumene4, c & dscp1,dscp2,sumene c sumene = enesc(x,xx,yy,zz,cost2tab(i+1),sint2tab(i+1)) escloc = escloc + sumene -c write (2,*) "i",i," escloc",sumene,escloc +c write (2,*) "i",i," escloc",sumene,escloc,it,itype(i) +c & ,zz,xx,yy c#define DEBUG #ifdef DEBUG C @@ -5280,9 +5291,9 @@ c & (dC_norm(j,i-1),j=1,3)," vbld_inv",vbld_inv(i+1),vbld_inv(i) dZZ_Ci(k)=0.0d0 do j=1,3 dZZ_Ci(k)=dZZ_Ci(k)-uzgrad(j,k,2,i-1) - & *dsign(1.0,dfloat(itype(i)))*dC_norm(j,i+nres) + & *dsign(1.0d0,dfloat(itype(i)))*dC_norm(j,i+nres) dZZ_Ci1(k)=dZZ_Ci1(k)-uzgrad(j,k,1,i-1) - & *dsign(1.0,dfloat(itype(i)))*dC_norm(j,i+nres) + & *dsign(1.0d0,dfloat(itype(i)))*dC_norm(j,i+nres) enddo dXX_XYZ(k)=vbld_inv(i+nres)*(x_prime(k)-xx*dC_norm(k,i+nres)) @@ -7999,7 +8010,7 @@ c---------------------------------------------------------------------------- include 'COMMON.GEO' logical swap double precision vv(2),pizda(2,2),auxmat(2,2),auxvec(2), - & auxvec1(2),auxvec2(1),auxmat1(2,2) + & auxvec1(2),auxvec2(2),auxmat1(2,2) logical lprn common /kutas/ lprn CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC