ifdef poporawa
[unres4.git] / source / unres / control.F90
index 8d22bf0..85972bc 100644 (file)
 !local variables el
       integer :: i,j,k,l,ichir1,ichir2,iblock,m,maxit
 
-#if .not. defined(WHAM_RUN) && .not. defined(CLUSTER)
+#if !defined(WHAM_RUN) && !defined(CLUSTER)
       mask_r=.false.
 #ifndef ISNAN
 ! NaNQ initialization
       iweight=31
       izsc=32
 #endif
+      iliptranpar=60
+      itube=61
 #if defined(WHAM_RUN) || defined(CLUSTER)
 !
 ! setting the mpi variables for WHAM
 !     &  " ivec_start",ivec_start," ivec_end",ivec_end
       iset_start=loc_start+2
       iset_end=loc_end+2
+      call int_bounds(nres,ilip_start,ilip_end)
+      ilip_start=ilip_start
+      ilip_end=ilip_end
+      call int_bounds(nres-1,itube_start,itube_end)
+      itube_start=itube_start
+      itube_end=itube_end
       if (ndih_constr.eq.0) then
         idihconstr_start=1
         idihconstr_end=0
       else
         call int_bounds(ndih_constr,idihconstr_start,idihconstr_end)
       endif
+      if (ntheta_constr.eq.0) then
+        ithetaconstr_start=1
+        ithetaconstr_end=0
+      else
+        call int_bounds &
+       (ntheta_constr,ithetaconstr_start,ithetaconstr_end)
+      endif
+
 !      nsumgrad=(nres-nnt)*(nres-nnt+1)/2
 !      nlen=nres-nnt+1
       nsumgrad=(nres-nnt)*(nres-nnt+1)/2
       iphi1_end=nres
       idihconstr_start=1
       idihconstr_end=ndih_constr
+      ithetaconstr_start=1
+      ithetaconstr_end=ntheta_constr
       iphid_start=iphi_start
       iphid_end=iphi_end-1
       itau_start=4
       iset_end=nres+1
       iint_start=2
       iint_end=nres-1
+      ilip_start=1
+      ilip_end=nres
+      itube_start=1
+      itube_end=nres
 #endif
 !el       common /przechowalnia/
 !      deallocate(iturn3_start_all)
 !     timlim=batime-150.0
 ! Calculate the initial time, if it is not zero (e.g. for the SUN).
       stime=tcpu()
-#if .not. defined(WHAM_RUN) && .not. defined(CLUSTER)
+#if !defined(WHAM_RUN) && !defined(CLUSTER)
 #ifdef MPI
       walltime=MPI_WTIME()
       time_reduce=0.0d0