Introduction of dyn_ss and triss to cluster
[unres.git] / source / cluster / wham / src-M / readrtns.F
index 321e11e..bb1e950 100644 (file)
@@ -126,6 +126,51 @@ C Read weights of the subsequent energy terms.
       call reada(weightcard,'CUTOFF',cutoff_corr,7.0d0)
       call reada(weightcard,'DELT_CORR',delt_corr,0.5d0)
       if (index(weightcard,'SOFT').gt.0) ipot=6
+      call reada(weightcard,"D0CM",d0cm,3.78d0)
+      call reada(weightcard,"AKCM",akcm,15.1d0)
+      call reada(weightcard,"AKTH",akth,11.0d0)
+      call reada(weightcard,"AKCT",akct,12.0d0)
+      call reada(weightcard,"V1SS",v1ss,-1.08d0)
+      call reada(weightcard,"V2SS",v2ss,7.61d0)
+      call reada(weightcard,"V3SS",v3ss,13.7d0)
+      call reada(weightcard,"EBR",ebr,-5.50D0)
+      call reada(weightcard,"ATRISS",atriss,0.301D0)
+      call reada(weightcard,"BTRISS",btriss,0.021D0)
+      call reada(weightcard,"CTRISS",ctriss,1.001D0)
+      call reada(weightcard,"DTRISS",dtriss,1.001D0)
+      write (iout,*) "ATRISS=", atriss
+      write (iout,*) "BTRISS=", btriss
+      write (iout,*) "CTRISS=", ctriss
+      write (iout,*) "DTRISS=", dtriss
+      dyn_ss=(index(weightcard,'DYN_SS').gt.0)
+      do i=1,maxres
+        dyn_ss_mask(i)=.false.
+      enddo
+      do i=1,maxres-1
+        do j=i+1,maxres
+          dyn_ssbond_ij(i,j)=1.0d300
+        enddo
+      enddo
+      call reada(weightcard,"HT",Ht,0.0D0)
+      if (dyn_ss) then
+        ss_depth=ebr/wsc-0.25*eps(1,1)
+        Ht=Ht/wsc-0.25*eps(1,1)
+        akcm=akcm*wstrain/wsc
+        akth=akth*wstrain/wsc
+        akct=akct*wstrain/wsc
+        v1ss=v1ss*wstrain/wsc
+        v2ss=v2ss*wstrain/wsc
+        v3ss=v3ss*wstrain/wsc
+      else
+        ss_depth=ebr/wstrain-0.25*eps(1,1)*wsc/wstrain
+      endif
+      write (iout,'(/a)') "Disulfide bridge parameters:"
+      write (iout,'(a,f10.2)') 'S-S bridge energy: ',ebr
+      write (iout,'(2(a,f10.2))') 'd0cm:',d0cm,' akcm:',akcm
+      write (iout,'(2(a,f10.2))') 'akth:',akth,' akct:',akct
+      write (iout,'(3(a,f10.2))') 'v1ss:',v1ss,' v2ss:',v2ss,
+     & ' v3ss:',v3ss
+
 C 12/1/95 Added weight for the multi-body term WCORR
       call reada(weightcard,'WCORRH',wcorr,1.0D0)
       if (wcorr4.gt.0.0d0) wcorr=wcorr4
@@ -312,6 +357,40 @@ c      endif
         endif
         call contact(.true.,ncont_ref,icont_ref)
       endif
+      if (ns.gt.0 .and. (me.eq.king .or. .not.out1file) ) then
+        write (iout,'(/a,i3,a)')
+     &  'The chain contains',ns,' disulfide-bridging cysteines.'
+        write (iout,'(20i4)') (iss(i),i=1,ns)
+       if (dyn_ss) then
+          write(iout,*)"Running with dynamic disulfide-bond formation"
+       else
+        write (iout,'(/a/)') 'Pre-formed links are:'
+        do i=1,nss
+          i1=ihpb(i)-nres
+          i2=jhpb(i)-nres
+          it1=itype(i1)
+          it2=itype(i2)
+          write (iout,'(2a,i3,3a,i3,a,3f10.3)')
+     &    restyp(it1),'(',i1,') -- ',restyp(it2),'(',i2,')',dhpb(i),
+     &    ebr,forcon(i)
+        enddo
+        write (iout,'(a)')
+       endif
+      endif
+      if (ns.gt.0.and.dyn_ss) then
+          do i=nss+1,nhpb
+            ihpb(i-nss)=ihpb(i)
+            jhpb(i-nss)=jhpb(i)
+            forcon(i-nss)=forcon(i)
+            dhpb(i-nss)=dhpb(i)
+          enddo
+          nhpb=nhpb-nss
+          nss=0
+          call hpb_partition
+          do i=1,ns
+            dyn_ss_mask(iss(i))=.true.
+          enddo
+      endif
       return
       end
 c-----------------------------------------------------------------------------
@@ -356,10 +435,12 @@ C Check whether the specified bridging residues are cystines.
       do i=1,ns
        if (itype(iss(i)).ne.1) then
          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 MPL
         call mp_stopall(error_msg)