dyn_ss writing pdb and ihpb cleaning
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Sun, 17 Feb 2013 02:06:59 +0000 (03:06 +0100)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Sun, 17 Feb 2013 02:06:59 +0000 (03:06 +0100)
bin/unres/MD/unres_ifort_MPICH_GAB.exe
source/unres/src_MD/COMMON.SBRIDGE
source/unres/src_MD/cinfo.f
source/unres/src_MD/energy_p_new_barrier.F
source/unres/src_MD/geomout.F
source/unres/src_MD/readrtns.F
source/unres/src_MD/ssMD.F

index c021865..a5decdb 100755 (executable)
Binary files a/bin/unres/MD/unres_ifort_MPICH_GAB.exe and b/bin/unres/MD/unres_ifort_MPICH_GAB.exe differ
index b608908..91dd2cd 100644 (file)
@@ -3,7 +3,7 @@
       common /sbridge/ ss_depth,ebr,d0cm,akcm,akth,akct,v1ss,v2ss,v3ss,
      & ns,nss,nfree,iss(maxss)
       double precision dhpb,dhpb1,forcon
-      integer ihpb,jhpb,nhpb
+      integer ihpb,jhpb,nhpb,idssb,jdssb
       common /links/ dhpb(maxdim),dhpb1(maxdim),forcon(maxdim),
      & ihpb(maxdim),jhpb(maxdim),ibecarb(maxdim),nhpb
       double precision weidis
@@ -13,4 +13,5 @@
       double precision Ht,dyn_ssbond_ij
       logical dyn_ss,dyn_ss_mask
       common /dyn_ssbond/ dyn_ssbond_ij(maxres,maxres),
+     &  idssb(maxdim),jdssb(maxdim),
      &  Ht,dyn_ss,dyn_ss_mask(maxres)
index 4cc77de..7534dcb 100644 (file)
@@ -1,10 +1,10 @@
 C DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C
-C 3 1 69
+C 3 1 78
       subroutine cinfo
       include 'COMMON.IOUNITS'
       write(iout,*)'++++ Compile info ++++'
-      write(iout,*)'Version 3.1 build 69'
-      write(iout,*)'compiled Sat Feb 16 13:00:53 2013'
+      write(iout,*)'Version 3.1 build 78'
+      write(iout,*)'compiled Sun Feb 17 03:00:27 2013'
       write(iout,*)'compiled by czarek@piasek3'
       write(iout,*)'OS name:    Linux '
       write(iout,*)'OS release: 2.6.32-42-generic '
index 156ef66..64dd328 100644 (file)
@@ -4279,12 +4279,13 @@ C 24/11/03 AL: SS bridges handled separately because of introducing a specific
 C    distance and angle dependent SS bond potential.
 cmc        if (ii.gt.nres .and. itype(iii).eq.1 .and. itype(jjj).eq.1) then
 C 18/07/06 MC: Use the convention that the first nss pairs are SS bonds
-c          if (.not.dyn_ss .and. i.le.nss) then
-C 15/02/13 CC dynamic SSbond
-        if (.not.dyn_ss.and.
-     &   ii.gt.nres .and. itype(iii).eq.1 .and. itype(jjj).eq.1) then 
+        if (.not.dyn_ss .and. i.le.nss) then
+C 15/02/13 CC dynamic SSbond - additional check
+         if (ii.gt.nres 
+     &       .and. itype(iii).eq.1 .and. itype(jjj).eq.1) then 
           call ssbond_ene(iii,jjj,eij)
           ehpb=ehpb+2*eij
+         endif
 cd          write (iout,*) "eij",eij
         else if (ii.gt.nres .and. jj.gt.nres) then
 c Restraints from contact prediction
index fff3d14..0a46b14 100644 (file)
@@ -79,9 +79,15 @@ cmodel      write (iunit,'(a5,i6)') 'MODEL',1
 
       if (nss.gt.0) then
         do i=1,nss
+         if (dyn_ss) then
           write(iunit,'(a6,i4,1x,a3,i7,4x,a3,i7)') 
-     &         'SSBOND',i,'CYS',ihpb(i)-1-nres,
-     &                    'CYS',jhpb(i)-1-nres
+     &         'SSBOND',i,'CYS',idssb(i)-nnt+1,
+     &                    'CYS',jdssb(i)-nnt+1
+         else
+          write(iunit,'(a6,i4,1x,a3,i7,4x,a3,i7)') 
+     &         'SSBOND',i,'CYS',ihpb(i)-nnt+1-nres,
+     &                    'CYS',jhpb(i)-nnt+1-nres
+         endif
         enddo
       endif
       
@@ -110,8 +116,11 @@ cmodel      write (iunit,'(a5,i6)') 'MODEL',1
         write (iunit,30) ica(nct),ica(nct)+1
       endif
       do i=1,nss
-c trzeba uporzdkowac 
-c        write (iunit,30) ica(ihpb(i))+1,ica(jhpb(i))+1
+       if (dyn_ss) then
+        write (iunit,30) ica(idssb(i))+1,ica(jdssb(i))+1
+       else
+        write (iunit,30) ica(ihpb(i)-nres)+1,ica(jhpb(i)-nres)+1
+       endif
       enddo
       write (iunit,'(a6)') 'ENDMDL'     
   10  FORMAT ('ATOM',I7,'  CA  ',A3,I6,4X,3F8.3,f15.3)
index 88b7242..c5dc889 100644 (file)
@@ -1340,10 +1340,12 @@ C Check whether the specified bridging residues are cystines.
       do i=1,ns
        if (itype(iss(i)).ne.1) then
          if (me.eq.king.or..not.out1file) write (iout,'(2a,i3,a)') 
-     &   'Do you REALLY think that the residue ',restyp(iss(i)),i,
+     &   'Do you REALLY think that the residue ',
+     &    restyp(itype(iss(i))),i,
      &   ' can form a disulfide bridge?!!!'
          write (*,'(2a,i3,a)') 
-     &   'Do you REALLY think that the residue ',restyp(iss(i)),i,
+     &   'Do you REALLY think that the residue ',
+     &    restyp(itype(iss(i))),i,
      &   ' can form a disulfide bridge?!!!'
 #ifdef MPI
         call MPI_Finalize(MPI_COMM_WORLD,ierror)
index dd210e5..dc205be 100644 (file)
@@ -583,13 +583,13 @@ cmc      write(iout,*)"NEWNSS ",newnss,(newihpb(i),newjhpb(i),i=1,newnss)
       do i=1,nss
         found=.false.
         do j=1,newnss
-          if (ihpb(i).eq.newihpb(j) .and.
-     &         jhpb(i).eq.newjhpb(j)) found=.true.
+          if (idssb(i).eq.newihpb(j) .and.
+     &         jdssb(i).eq.newjhpb(j)) found=.true.
         enddo
 #ifndef CLUST
 #ifndef WHAM
         if (.not.found) write(iout,'(a15,f12.2,f8.1,2i5)')
-     &       "SSBOND_BREAK",totT,t_bath,ihpb(i),jhpb(i)
+     &       "SSBOND_BREAK",totT,t_bath,idssb(i),jdssb(i)
 #endif
 #endif
       enddo
@@ -597,8 +597,8 @@ cmc      write(iout,*)"NEWNSS ",newnss,(newihpb(i),newjhpb(i),i=1,newnss)
       do i=1,newnss
         found=.false.
         do j=1,nss
-          if (newihpb(i).eq.ihpb(j) .and.
-     &         newjhpb(i).eq.jhpb(j)) found=.true.
+          if (newihpb(i).eq.idssb(j) .and.
+     &         newjhpb(i).eq.jdssb(j)) found=.true.
         enddo
 #ifndef CLUST
 #ifndef WHAM
@@ -608,32 +608,10 @@ cmc      write(iout,*)"NEWNSS ",newnss,(newihpb(i),newjhpb(i),i=1,newnss)
 #endif
       enddo
 
-c CRC this part of code is not clean, 
-c dyn_ss will not work with contrains
-
-      if (diff.gt.0) then
-        do i=1,diff
-          ihpb(nhpb+i)=ihpb(nss+i)
-          jhpb(nhpb+i)=jhpb(nss+i)
-          forcon(nhpb+i)=forcon(nss+i)
-          dhpb(nhpb+i)=dhpb(nss+i)
-        enddo
-      else if (diff.lt.0) then
-        do i=diff,-1
-         if(nss+i.gt.0.and.nhpb+i.gt.0) then
-          ihpb(nss+i)=ihpb(nhpb+i)
-          jhpb(nss+i)=jhpb(nhpb+i)
-          forcon(nss+i)=forcon(nhpb+i)
-          dhpb(nss+i)=dhpb(nhpb+i)
-         endif
-        enddo
-      endif
-
-      nhpb=nhpb+diff
       nss=newnss
       do i=1,nss
-        ihpb(i)=newihpb(i)
-        jhpb(i)=newjhpb(i)
+        idssb(i)=newihpb(i)
+        jdssb(i)=newjhpb(i)
       enddo
 
       return