X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fgeometry.F90;h=af8df27b5368094b3bffedfa6dcb6a0a2b83c117;hb=bc23440fbe68672d430f71f22f46b11265f003db;hp=797180bccd9d8dea31b74968223e20f8c7c8b839;hpb=f2b6c10194606cb27a4c4ceb30a82e6614d7e82a;p=unres4.git diff --git a/source/unres/geometry.F90 b/source/unres/geometry.F90 index 797180b..af8df27 100644 --- a/source/unres/geometry.F90 +++ b/source/unres/geometry.F90 @@ -453,7 +453,7 @@ ! print *,i,vbld(i),"vbld(i)" vbld_inv(i)=1.0d0/vbld(i) vbld(nres+i)=dist(nres+i,i) - if (itype(i,1).ne.10) then + if ((itype(i,1).ne.10).and.(molnum(i).ne.5)) then vbld_inv(nres+i)=1.0d0/vbld(nres+i) else vbld_inv(nres+i)=0.0d0 @@ -1545,6 +1545,7 @@ dxi=dc_norm(1,nres+i) dyi=dc_norm(2,nres+i) dzi=dc_norm(3,nres+i) + print *,i,itypi,"sc_move" dsci_inv=dsc_inv(itypi) ! do iint=1,nint_gr(i) @@ -1552,6 +1553,8 @@ if (itype(j,molnum(j)).eq.ntyp1_molec(molnum(j))) cycle ind=ind+1 itypj=iabs(itype(j,molnum(j))) + print *,j,itypj,"sc_move" + dscj_inv=dsc_inv(itypj) sig0ij=sigma(itypi,itypj) chi1=chi(itypi,itypj) @@ -3364,7 +3367,7 @@ +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,1).ne.10) then + if((itype(i,1).ne.10).and.(molnum(nres-1).ne.5)) 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 @@ -3382,12 +3385,12 @@ dphi(j,3,nres-1)+gloc(nres-3,icg)*dphi(j,2,nres) & +gloc(2*nres-6,icg)* & dtheta(j,2,nres-1)+gloc(2*nres-5,icg)*dtheta(j,1,nres) - if(itype(nres-2,1).ne.10) then + if((itype(nres-2,1).ne.10).and.(molnum(nres-1).ne.5)) then gcart(j,nres-2)=gcart(j,nres-2)+gloc(ialph(nres-2,1),icg)* & dalpha(j,2,nres-2)+gloc(ialph(nres-2,1)+nside,icg)* & domega(j,2,nres-2) endif - if(itype(nres-1,1).ne.10) then + if((itype(nres-1,1).ne.10).and.(molnum(nres-1).ne.5)) then gcart(j,nres-2)=gcart(j,nres-2)+gloc(ialph(nres-1,1),icg)* & dalpha(j,1,nres-1)+gloc(ialph(nres-1,1)+nside,icg)* & domega(j,1,nres-1) @@ -3396,35 +3399,35 @@ endif ! Settind dE/ddnres-1 !#define DEBUG -#ifdef DEBUG - j=1 - write(iout,*)"in int to carta",nres-1,gcart(j,nres-1),gloc(nres-3,icg),dphi(j,3,nres), & - gloc(2*nres-5,icg),dtheta(j,2,nres) +!#ifdef DEBUG +! j=1 +! write(iout,*)"in int to carta",nres-1,gcart(j,nres-1),gloc(nres-3,icg),dphi(j,3,nres), & +! gloc(2*nres-5,icg),dtheta(j,2,nres) -#endif +!#endif !#undef DEBUG do j=1,3 gcart(j,nres-1)=gcart(j,nres-1)+gloc(nres-3,icg)*dphi(j,3,nres)+ & gloc(2*nres-5,icg)*dtheta(j,2,nres) !#define DEBUG -#ifdef DEBUG - write(iout,*)"in int to cartb",nres-1,gcart(j,nres-1),gloc(nres-3,icg),dphi(j,3,nres), & - gloc(2*nres-5,icg),dtheta(j,2,nres) - -#endif +!#ifdef DEBUG +! write(iout,*)"in int to cartb",nres-1,gcart(j,nres-1),gloc(nres-3,icg),dphi(j,3,nres), & +! gloc(2*nres-5,icg),dtheta(j,2,nres) +! +!#endif !#undef DEBUG - if(itype(nres-1,1).ne.10) then + if((itype(nres-1,1).ne.10).and.(molnum(nres-1).ne.5)) then gcart(j,nres-1)=gcart(j,nres-1)+gloc(ialph(nres-1,1),icg)* & dalpha(j,2,nres-1)+gloc(ialph(nres-1,1)+nside,icg)* & domega(j,2,nres-1) !#define DEBUG -#ifdef DEBUG - write(iout,*)"in int to cart2",i,gcart(j,nres-1),gloc(ialph(nres-1,1),icg)* & - dalpha(j,2,nres-1),gloc(ialph(nres-1,1)+nside,icg), & - domega(j,2,nres-1) +!#ifdef DEBUG +! write(iout,*)"in int to cart2",i,gcart(j,nres-1),gloc(ialph(nres-1,1),icg)* & +! dalpha(j,2,nres-1),gloc(ialph(nres-1,1)+nside,icg), & +! domega(j,2,nres-1) -#endif +!#endif !#undef DEBUG endif @@ -3438,10 +3441,10 @@ 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) !#define DEBUG -#ifdef DEBUG - write(iout,*)"in int to cart",i, gxcart(j,i),gloc(ialph(i,1),icg),dalpha(j,3,i), & - gloc(ialph(i,1)+nside,icg),domega(j,3,i) -#endif +!#ifdef DEBUG +! write(iout,*)"in int to cart",i, gxcart(j,i),gloc(ialph(i,1),icg),dalpha(j,3,i), & +! gloc(ialph(i,1)+nside,icg),domega(j,3,i) +!#endif !#undef DEBUG enddo endif @@ -3511,7 +3514,7 @@ gxcart(j,2)=gxcart(j,2)-gloc_sc(1,1,icg)*dtauangle(j,1,1,4) !c the - above is due to different vector direction gcart(j,2)=gcart(j,2)+gloc_sc(1,1,icg)*dtauangle(j,1,2,4) - write(iout,*) gloc_sc(1,1,icg),dtauangle(j,1,2,4),"gcart",gcart(j,2) +! write(iout,*) gloc_sc(1,1,icg),dtauangle(j,1,2,4),"gcart",gcart(j,2) ! write(iout,*) gloc_sc(1,1,icg),dtauangle(j,1,1,4),"gx" endif endif @@ -3556,7 +3559,8 @@ endif ! if (itype(i+1,1).ne.10) then if ((itype(i+1,1).ne.10).and.& - (itype(i+1,molnum(i+1)).ne.ntyp1_molec(molnum(i+1)))) then + (itype(i+1,molnum(i+1)).ne.ntyp1_molec(molnum(i+1))).and.& + (molnum(i+1).ne.5)) then gxcart(j,i)=gxcart(j,i)-gloc_sc(3,i-1,icg) & *dtauangle(j,3,1,i+2) gcart(j,i)=gcart(j,i)+gloc_sc(3,i-1,icg) & @@ -3565,13 +3569,15 @@ endif ! if (itype(i-1,1).ne.10) then if ((itype(i-1,1).ne.10).and.& - (itype(i-1,molnum(i-1)).ne.ntyp1_molec(molnum(i-1)))) then + (itype(i-1,molnum(i-1)).ne.ntyp1_molec(molnum(i-1))).and.& + (molnum(i-1).ne.5)) then gcart(j,i)=gcart(j,i)+gloc_sc(1,i-2,icg)* & dtauangle(j,1,3,i+1) endif ! if (itype(i+1,1).ne.10) then if ((itype(i+1,1).ne.10).and.& - (itype(i+1,molnum(i+1)).ne.ntyp1_molec(molnum(i+1)))) then + (itype(i+1,molnum(i+1)).ne.ntyp1_molec(molnum(i+1)))& + .and. (molnum(i+1).ne.5)) then gcart(j,i)=gcart(j,i)+gloc_sc(2,i-1,icg)* & dtauangle(j,2,2,i+2) ! write(iout,*) "numer",i,gloc_sc(2,i-1,icg), @@ -3764,7 +3770,8 @@ ! common /refstruct/ if(.not.allocated(cref)) allocate(cref(3,nres2+2,maxperm)) !(3,maxres2+2,maxperm) !elwrite(iout,*) "jestem w alloc geo 2" - allocate(crefjlee(3,nres2+2)) !(3,maxres2+2) +! allocate(crefjlee(3,nres2+2)) !(3,maxres2+2) + if (.not.allocated(crefjlee)) allocate (crefjlee(3,nres2+2)) if(.not.allocated(chain_rep)) allocate(chain_rep(3,nres2+2,maxsym)) !(3,maxres2+2,maxsym) if(.not.allocated(tabperm)) allocate(tabperm(maxperm,maxsym)) !(maxperm,maxsym) ! common /from_zscore/ in module.compare @@ -4054,8 +4061,11 @@ do i=1,nres if (molnum(i).eq.5) then c(1,i)=dmod(c(1,i),boxxsize) + if (c(1,i).lt.0) c(1,i)=c(1,i)+boxxsize c(2,i)=dmod(c(2,i),boxysize) + if (c(2,i).lt.0) c(2,i)=c(2,i)+boxysize c(3,i)=dmod(c(3,i),boxzsize) + if (c(3,i).lt.0) c(3,i)=c(3,i)+boxzsize c(1,i+nres)=dmod(c(1,i+nres),boxxsize) c(2,i+nres)=dmod(c(2,i+nres),boxysize) c(3,i+nres)=dmod(c(3,i+nres),boxzsize)