corrections in shift
authorAdam Sieradzan <adasko@piasek4.chem.univ.gda.pl>
Fri, 9 Oct 2020 10:28:21 +0000 (12:28 +0200)
committerAdam Sieradzan <adasko@piasek4.chem.univ.gda.pl>
Fri, 9 Oct 2020 10:28:21 +0000 (12:28 +0200)
source/unres/energy.F90

index 376d318..9815bb2 100644 (file)
            zj=c(3,nres+j)
               call to_box(xj,yj,zj)
               call lipid_layer(xj,yj,zj,sslipj,ssgradlipj)
-              write (iout,*) "KWA2", itypi,itypj
+!              write (iout,*) "KWA2", itypi,itypj
               aa=aa_lip(itypi,itypj)*(sslipi+sslipj)/2.0d0 &
                +aa_aq(itypi,itypj)*(2.0d0-sslipi-sslipj)/2.0d0
               bb=bb_lip(itypi,itypj)*(sslipi+sslipj)/2.0d0 &
       itypj=iabs(itype(j,1))
 !      dscj_inv=dsc_inv(itypj)
       dscj_inv=vbld_inv(nres+j)
-      xj=c(1,nres+j)-xi
-      yj=c(2,nres+j)-yi
-      zj=c(3,nres+j)-zi
+!      xj=c(1,nres+j)-xi
+!      yj=c(2,nres+j)-yi
+!      zj=c(3,nres+j)-zi
           call to_box(xj,yj,zj)
+      xj=boxshift(xj-xi,boxxsize)
+      yj=boxshift(yj-yi,boxysize)
+      zj=boxshift(zj-zi,boxzsize)
       dxj=dc_norm(1,nres+j)
       dyj=dc_norm(2,nres+j)
       dzj=dc_norm(3,nres+j)
       eij=akcm*deltad*deltad+akth*(deltat1*deltat1+deltat2*deltat2) &
         +akct*deltad*deltat12 &
         +v1ss*cosphi+v2ss*cosphi*cosphi+v3ss*cosphi*cosphi*cosphi+ebr
-!      write(iout,*) i,j,"rij",rij,"d0cm",d0cm," akcm",akcm," akth",akth,
-!     &  " akct",akct," deltad",deltad," deltat",deltat1,deltat2,
-!     &  " deltat12",deltat12," eij",eij 
+!      write(iout,*) i,j,"rij",rij,"d0cm",d0cm," akcm",akcm," akth",akth, &
+!       " akct",akct," deltad",deltad," deltat",deltat1,deltat2, &
+!       " deltat12",deltat12," eij",eij 
       ed=2*akcm*deltad+akct*deltat12
       pom1=akct*deltad
       pom2=v1ss+2*v2ss*cosphi+3*v3ss*cosphi*cosphi
             yj=c(2,nres+j)-yi
             zj=c(3,nres+j)-zi
           call to_box(xj,yj,zj)
+      xj=boxshift(xj-xi,boxxsize)
+      yj=boxshift(yj-yi,boxysize)
+      zj=boxshift(zj-zi,boxzsize)
+
             rrij=1.0D0/(xj*xj+yj*yj+zj*zj)
             fac_augm=rrij**expon
             e_augm=augm(itypi,itypj)*fac_augm
@@ -25240,28 +25247,7 @@ chip1=chip(itypi)
       zi=c(3,nres+i)
         call to_box(xi,yi,zi)
         call lipid_layer(xi,yi,zi,sslipi,ssgradlipi)
-       if ((zi.gt.bordlipbot)  &
-      .and.(zi.lt.bordliptop)) then
-!C the energy transfer exist
-      if (zi.lt.buflipbot) then
-!C what fraction I am in
-       fracinbuf=1.0d0-  &
-            ((zi-bordlipbot)/lipbufthick)
-!C lipbufthick is thickenes of lipid buffore
-       sslipi=sscalelip(fracinbuf)
-       ssgradlipi=-sscagradlip(fracinbuf)/lipbufthick
-      elseif (zi.gt.bufliptop) then
-       fracinbuf=1.0d0-((bordliptop-zi)/lipbufthick)
-       sslipi=sscalelip(fracinbuf)
-       ssgradlipi=sscagradlip(fracinbuf)/lipbufthick
-      else
-       sslipi=1.0d0
-       ssgradlipi=0.0
-      endif
-       else
-       sslipi=0.0d0
-       ssgradlipi=0.0
-       endif
+!       endif
 !       print *, sslipi,ssgradlipi
       dxi=dc_norm(1,nres+i)
       dyi=dc_norm(2,nres+i)