compiling cluster before tests
[unres.git] / source / cluster / wham / src-M / readrtns.F
index 0140df4..936cb42 100644 (file)
@@ -15,6 +15,7 @@ C
       include 'COMMON.FFIELD'
       include 'COMMON.FREE'
       include 'COMMON.INTERACT'
+      include "COMMON.SPLITELE"
       character*320 controlcard,ucase
 #ifdef MPL
       include 'COMMON.INFO'
@@ -28,6 +29,13 @@ C
       call readi(controlcard,'RESCALE',rescale_mode,2)
       call reada(controlcard,'DISTCHAINMAX',distchainmax,50.0d0)
       write (iout,*) "DISTCHAINMAX",distchainmax
+C Reading the dimensions of box in x,y,z coordinates
+      call reada(controlcard,'BOXX',boxxsize,100.0d0)
+      call reada(controlcard,'BOXY',boxysize,100.0d0)
+      call reada(controlcard,'BOXZ',boxzsize,100.0d0)
+c Cutoff range for interactions
+      call reada(controlcard,"R_CUT",r_cut,15.0d0)
+      call reada(controlcard,"LAMBDA",rlamb,0.3d0)
       call readi(controlcard,'PDBOUT',outpdb,0)
       call readi(controlcard,'MOL2OUT',outmol2,0)
       refstr=(index(controlcard,'REFSTR').gt.0)
@@ -96,7 +104,7 @@ C
       double precision x(maxvar)
       integer itype_pdb(maxres)
       logical seq_comp
-      integer i,j
+      integer i,j,kkk
 C
 C Body
 C
@@ -115,6 +123,7 @@ C Read weights of the subsequent energy terms.
       call reada(weightcard,'WTURN4',wturn4,1.0D0)
       call reada(weightcard,'WTURN6',wturn6,1.0D0)
       call reada(weightcard,'WSTRAIN',wstrain,1.0D0)
+      call reada(weightcard,'WSCCOR',wsccor,1.0D0)
       call reada(weightcard,'WBOND',wbond,1.0D0)
       call reada(weightcard,'WTOR',wtor,1.0D0)
       call reada(weightcard,'WTORD',wtor_d,1.0D0)
@@ -146,9 +155,10 @@ C 12/1/95 Added weight for the multi-body term WCORR
       weights(16)=wvdwpp
       weights(17)=wbond
       weights(18)=scal14
+      weights(19)=wsccor
       write (iout,10) wsc,wscp,welec,wvdwpp,wbond,wang,wscloc,wtor,
      &  wtor_d,wstrain,wel_loc,wcorr,wcorr5,wcorr6,wturn3,
-     &  wturn4,wturn6
+     &  wturn4,wturn6,wsccor
    10 format (/'Energy-term weights (unscaled):'//
      & 'WSCC=   ',f10.6,' (SC-SC)'/
      & 'WSCP=   ',f10.6,' (SC-p)'/
@@ -166,7 +176,9 @@ C 12/1/95 Added weight for the multi-body term WCORR
      & 'WCORR6= ',f10.6,' (multi-body 6th order)'/
      & 'WTURN3= ',f10.6,' (turns, 3rd order)'/
      & 'WTURN4= ',f10.6,' (turns, 4th order)'/
-     & 'WTURN6= ',f10.6,' (turns, 6th order)')
+     & 'WTURN6= ',f10.6,' (turns, 6th order)'/
+     & 'WSCCOR= ',f10.6,' (SC-backbone torsinal correalations)')
+
       if (wcorr4.gt.0.0d0) then
         write (iout,'(/2a/)') 'Local-electrostatic type correlation ',
      &   'between contact pairs of peptide groups'
@@ -207,9 +219,9 @@ C Convert sequence to numeric code
 
       do i=1,nres
 #ifdef PROCOR
-        if (itype(i).eq.21 .or. itype(i+1).eq.21) then
+        if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) then
 #else
-        if (itype(i).eq.21) then
+        if (itype(i).eq.ntyp1) then
 #endif
           itel(i)=0
 #ifdef PROCOR
@@ -232,8 +244,8 @@ C Convert sequence to numeric code
       nnt=1
       nct=nres
       print *,'NNT=',NNT,' NCT=',NCT
-      if (itype(1).eq.21) nnt=2
-      if (itype(nres).eq.21) nct=nct-1
+      if (itype(1).eq.ntyp1) nnt=2
+      if (itype(nres).eq.ntyp1) nct=nct-1
       if (nstart.lt.nnt) nstart=nnt
       if (nend.gt.nct .or. nend.eq.0) nend=nct
       write (iout,*) "nstart",nstart," nend",nend
@@ -299,9 +311,10 @@ c      endif
           nstart_sup=nnt
           nstart_seq=nnt
           nsup=nct-nnt+1
+          kkk=1
           do i=1,2*nres
             do j=1,3
-              cref(j,i)=c(j,i)
+              cref(j,i,kkk)=c(j,i)
             enddo
           enddo
         endif