From f67621e926530255a273102edd0aeb87043fd407 Mon Sep 17 00:00:00 2001 From: Adam Sieradzan Date: Fri, 30 Nov 2012 10:02:29 +0100 Subject: [PATCH] zmiana w symetry (bugfix) --- source/cluster/wham/src-M/readpdb.f | 81 ++++++++++++++++++++++++++++++++++- source/unres/src_MD-M/readpdb.F | 2 +- source/wham/src-M/readpdb.f | 2 +- 3 files changed, 81 insertions(+), 4 deletions(-) diff --git a/source/cluster/wham/src-M/readpdb.f b/source/cluster/wham/src-M/readpdb.f index 9b443b0..bdc3dc2 100644 --- a/source/cluster/wham/src-M/readpdb.f +++ b/source/cluster/wham/src-M/readpdb.f @@ -144,11 +144,88 @@ c & vbld_inv(i+nres) enddo c call chainbuild C Copy the coordinates to reference coordinates - do i=1,2*nres +c do i=1,2*nres +c do j=1,3 +c cref(j,i)=c(j,i) +c enddo +c enddo + + kkk=1 + lll=0 + cou=1 + do i=1,nres + lll=lll+1 +cc write (iout,*) "spraw lancuchy",(c(j,i),j=1,3) + if (i.gt.1) then + if ((itype(i-1).eq.ntyp1).and.(i.gt.2)) then + chain_length=lll-1 + kkk=kkk+1 +c write (iout,*) "spraw lancuchy",(c(j,i),j=1,3) + lll=1 + endif + endif do j=1,3 - cref(j,i)=c(j,i) + cref(j,i,cou)=c(j,i) + cref(j,i+nres,cou)=c(j,i+nres) + if (i.le.nres) then + chain_rep(j,lll,kkk)=c(j,i) + chain_rep(j,lll+nres,kkk)=c(j,i+nres) + endif + enddo + enddo + do j=1,3 + chain_rep(j,chain_length,symetr)=chain_rep(j,chain_length,1) + chain_rep(j,chain_length+nres,symetr) + &=chain_rep(j,chain_length+nres,1) + enddo + + if (symetr.gt.1) then + call permut(symetr) + nperm=1 + do i=1,symetr + nperm=nperm*i + enddo +c do i=1,nperm +c write(iout,*) "tabperm", (tabperm(i,kkk),kkk=1,4) +c enddo + do i=1,nperm + cou=0 + do kkk=1,symetr + icha=tabperm(i,kkk) +c write (iout,*) i,icha + do lll=1,chain_length + cou=cou+1 + if (cou.le.nres) then + do j=1,3 + kupa=mod(lll,chain_length) + iprzes=(kkk-1)*chain_length+lll + if (kupa.eq.0) kupa=chain_length +c write (iout,*) "kupa", kupa + cref(j,iprzes,i)=chain_rep(j,kupa,icha) + cref(j,iprzes+nres,i)=chain_rep(j,kupa+nres,icha) + enddo + endif + enddo enddo + enddo + endif + +C-koniec robienia kopidm + do kkk=1,nperm + write (iout,*) "nowa struktura", nperm + do i=1,nres + write (iout,110) restyp(itype(i)),i,cref(1,i,kkk), + &cref(2,i,kkk), + &cref(3,i,kkk),cref(1,nres+i,kkk), + &cref(2,nres+i,kkk),cref(3,nres+i,kkk) enddo + 100 format (//' alpha-carbon coordinates ', + & ' centroid coordinates'/ + 1 ' ', 6X,'X',11X,'Y',11X,'Z', + & 10X,'X',11X,'Y',11X,'Z') + 110 format (a,'(',i3,')',6f12.5) + + ishift_pdb=ishift return diff --git a/source/unres/src_MD-M/readpdb.F b/source/unres/src_MD-M/readpdb.F index f66a518..df77eba 100644 --- a/source/unres/src_MD-M/readpdb.F +++ b/source/unres/src_MD-M/readpdb.F @@ -213,7 +213,7 @@ C Splits to single chain if occurs lll=lll+1 cc write (iout,*) "spraw lancuchy",(c(j,i),j=1,3) if (i.gt.1) then - if ((itype(i-1).eq.ntyp1)) then + if ((itype(i-1).eq.ntyp1).and.(i.gt.2)) then chain_length=lll-1 kkk=kkk+1 c write (iout,*) "spraw lancuchy",(c(j,i),j=1,3) diff --git a/source/wham/src-M/readpdb.f b/source/wham/src-M/readpdb.f index bf2f204..24bd600 100644 --- a/source/wham/src-M/readpdb.f +++ b/source/wham/src-M/readpdb.f @@ -163,7 +163,7 @@ C Splits to single chain if occurs lll=lll+1 cc write (iout,*) "spraw lancuchy",(c(j,i),j=1,3) if (i.gt.1) then - if (itype(i-1).eq.ntyp1) then + if ((itype(i-1).eq.ntyp1).and.(i.gt.2)) then chain_length=lll-1 kkk=kkk+1 c write (iout,*) "spraw lancuchy",(c(j,i),j=1,3) -- 1.7.9.5