zmiana w symetry (bugfix)
authorAdam Sieradzan <adasko@piasek2.(none)>
Fri, 30 Nov 2012 09:02:29 +0000 (10:02 +0100)
committerAdam Sieradzan <adasko@piasek2.(none)>
Fri, 30 Nov 2012 09:02:29 +0000 (10:02 +0100)
source/cluster/wham/src-M/readpdb.f
source/unres/src_MD-M/readpdb.F
source/wham/src-M/readpdb.f

index 9b443b0..bdc3dc2 100644 (file)
@@ -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
index f66a518..df77eba 100644 (file)
@@ -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)
index bf2f204..24bd600 100644 (file)
@@ -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)