multichain wham ignores conf. energies>10E6 and speed up of starts
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Fri, 10 Jun 2016 22:09:49 +0000 (00:09 +0200)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Fri, 10 Jun 2016 22:09:49 +0000 (00:09 +0200)
with homo restraints

source/cluster/wham/src-M/readrtns.F
source/cluster/wham/src/readrtns.F
source/unres/src_MD-M/readrtns_CSA.F
source/unres/src_MD/readrtns.F
source/wham/src-M/Makefile_MPICH_ifort
source/wham/src-M/enecalc1.F
source/wham/src-M/molread_zs.F
source/wham/src/molread_zs.F

index 51ac51f..8895326 100644 (file)
@@ -989,7 +989,7 @@ c    &    sigma_odl_temp(maxres,maxres,max_template)
       integer ilen
       external ilen
       logical lprn
-      logical unres_pdb
+      logical unres_pdb,liiflag
 c
 c     FP - Nov. 2014 Temporary specifications for new vars
 c
@@ -1339,22 +1339,29 @@ c shift data in all arrays
 c
       if (waga_dist.ne.0.0d0) then
         ii=0
+        liiflag=.true.
         do i=nnt,nct-2 
          do j=i+2,nct 
           ii=ii+1
-          if (ii_in_use(ii).eq.0) then 
-             do ki=ii,lim_odl-1
-              ires_homo(ki)=ires_homo(ki+1)
-              jres_homo(ki)=jres_homo(ki+1)
-              ii_in_use(ki)=ii_in_use(ki+1)
+          if (ii_in_use(ii).eq.0.and.liiflag) then
+            liiflag=.false.
+            iistart=ii
+          endif
+          if (ii_in_use(ii).ne.0.and..not.liiflag) then
+             iishift=ii-iistart
+             liiflag=.true.
+             do ki=iistart,lim_odl-iishift
+              ires_homo(ki)=ires_homo(ki+iishift)
+              jres_homo(ki)=jres_homo(ki+iishift)
+              ii_in_use(ki)=ii_in_use(ki+iishift)
               do k=1,constr_homology
-               odl(k,ki)=odl(k,ki+1)
-               sigma_odl(k,ki)=sigma_odl(k,ki+1)
-               l_homo(k,ki)=l_homo(k,ki+1)
+               odl(k,ki)=odl(k,ki+iishift)
+               sigma_odl(k,ki)=sigma_odl(k,ki+iishift)
+               l_homo(k,ki)=l_homo(k,ki+iishift)
               enddo
              enddo
-             ii=ii-1
-             lim_odl=lim_odl-1
+             ii=ii-iishift
+             lim_odl=lim_odl-iishift
           endif
          enddo
         enddo
index 34692c5..983a691 100644 (file)
@@ -938,7 +938,7 @@ c    &    sigma_odl_temp(maxres,maxres,max_template)
       integer ilen
       external ilen
       logical lprn
-      logical unres_pdb
+      logical unres_pdb,liiflag
 c
 c     FP - Nov. 2014 Temporary specifications for new vars
 c
@@ -1283,22 +1283,29 @@ c shift data in all arrays
 c
       if (waga_dist.ne.0.0d0) then
         ii=0
+        liiflag=.true.
         do i=nnt,nct-2 
          do j=i+2,nct 
           ii=ii+1
-          if (ii_in_use(ii).eq.0) then 
-             do ki=ii,lim_odl-1
-              ires_homo(ki)=ires_homo(ki+1)
-              jres_homo(ki)=jres_homo(ki+1)
-              ii_in_use(ki)=ii_in_use(ki+1)
+          if (ii_in_use(ii).eq.0.and.liiflag) then
+            liiflag=.false.
+            iistart=ii
+          endif
+          if (ii_in_use(ii).ne.0.and..not.liiflag) then
+             iishift=ii-iistart
+             liiflag=.true.
+             do ki=iistart,lim_odl-iishift
+              ires_homo(ki)=ires_homo(ki+iishift)
+              jres_homo(ki)=jres_homo(ki+iishift)
+              ii_in_use(ki)=ii_in_use(ki+iishift)
               do k=1,constr_homology
-               odl(k,ki)=odl(k,ki+1)
-               sigma_odl(k,ki)=sigma_odl(k,ki+1)
-               l_homo(k,ki)=l_homo(k,ki+1)
+               odl(k,ki)=odl(k,ki+iishift)
+               sigma_odl(k,ki)=sigma_odl(k,ki+iishift)
+               l_homo(k,ki)=l_homo(k,ki+iishift)
               enddo
              enddo
-             ii=ii-1
-             lim_odl=lim_odl-1
+             ii=ii-iishift
+             lim_odl=lim_odl-iishift
           endif
          enddo
         enddo
index 2a591cf..bcd749f 100644 (file)
@@ -2560,6 +2560,7 @@ c    &    sigma_odl_temp(maxres,maxres,max_template)
       logical lprn /.true./
       integer ilen
       external ilen
+      logical liiflag
 c
 c     FP - Nov. 2014 Temporary specifications for new vars
 c
@@ -2874,22 +2875,29 @@ c shift data in all arrays
 c
       if (waga_dist.ne.0.0d0) then
         ii=0
+        liiflag=.true.
         do i=nnt,nct-2 
          do j=i+2,nct 
           ii=ii+1
-          if (ii_in_use(ii).eq.0) then 
-             do ki=ii,lim_odl-1
-              ires_homo(ki)=ires_homo(ki+1)
-              jres_homo(ki)=jres_homo(ki+1)
-              ii_in_use(ki)=ii_in_use(ki+1)
+          if (ii_in_use(ii).eq.0.and.liiflag) then
+            liiflag=.false.
+            iistart=ii
+          endif
+          if (ii_in_use(ii).ne.0.and..not.liiflag) then
+             iishift=ii-iistart
+             liiflag=.true.
+             do ki=iistart,lim_odl-iishift
+              ires_homo(ki)=ires_homo(ki+iishift)
+              jres_homo(ki)=jres_homo(ki+iishift)
+              ii_in_use(ki)=ii_in_use(ki+iishift)
               do k=1,constr_homology
-               odl(k,ki)=odl(k,ki+1)
-               sigma_odl(k,ki)=sigma_odl(k,ki+1)
-               l_homo(k,ki)=l_homo(k,ki+1)
+               odl(k,ki)=odl(k,ki+iishift)
+               sigma_odl(k,ki)=sigma_odl(k,ki+iishift)
+               l_homo(k,ki)=l_homo(k,ki+iishift)
               enddo
              enddo
-             ii=ii-1
-             lim_odl=lim_odl-1
+             ii=ii-iishift
+             lim_odl=lim_odl-iishift
           endif
          enddo
         enddo
index b51386c..2c65cbb 100644 (file)
@@ -2739,6 +2739,7 @@ c    &    sigma_odl_temp(maxres,maxres,max_template)
       logical lprn /.true./
       integer ilen
       external ilen
+      logical liiflag
 c
 c     FP - Nov. 2014 Temporary specifications for new vars
 c
@@ -3051,22 +3052,29 @@ c shift data in all arrays
 c
       if (waga_dist.ne.0.0d0) then
         ii=0
+        liiflag=.true.
         do i=nnt,nct-2 
          do j=i+2,nct 
           ii=ii+1
-          if (ii_in_use(ii).eq.0) then 
-             do ki=ii,lim_odl-1
-              ires_homo(ki)=ires_homo(ki+1)
-              jres_homo(ki)=jres_homo(ki+1)
-              ii_in_use(ki)=ii_in_use(ki+1)
+          if (ii_in_use(ii).eq.0.and.liiflag) then
+            liiflag=.false.
+            iistart=ii
+          endif
+          if (ii_in_use(ii).ne.0.and..not.liiflag) then
+             iishift=ii-iistart
+             liiflag=.true.
+             do ki=iistart,lim_odl-iishift
+              ires_homo(ki)=ires_homo(ki+iishift)
+              jres_homo(ki)=jres_homo(ki+iishift)
+              ii_in_use(ki)=ii_in_use(ki+iishift)
               do k=1,constr_homology
-               odl(k,ki)=odl(k,ki+1)
-               sigma_odl(k,ki)=sigma_odl(k,ki+1)
-               l_homo(k,ki)=l_homo(k,ki+1)
+               odl(k,ki)=odl(k,ki+iishift)
+               sigma_odl(k,ki)=sigma_odl(k,ki+iishift)
+               l_homo(k,ki)=l_homo(k,ki+iishift)
               enddo
              enddo
-             ii=ii-1
-             lim_odl=lim_odl-1
+             ii=ii-iishift
+             lim_odl=lim_odl-iishift
           endif
          enddo
         enddo
index 07ffac6..350b80e 100644 (file)
@@ -1,10 +1,11 @@
-INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh
+#INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh
+INSTALL_DIR = /users2/local/mpich2-1.4.1p1_intel
 BIN = ../../../bin/wham
 FC= ifort
 OPT = -mcmodel=medium -O3 -ip -w 
-#OPT = -mcmodel=medium -g -CB
+#OPT = -mcmodel=medium -g -CB -ip -w
 FFLAGS = ${OPT} -c -I. -I./include_unres -I$(INSTALL_DIR)/include
-LIBS = -L$(INSTALL_DIR)/lib -lmpich -lpmpich xdrf/libxdrf.a
+LIBS = -L$(INSTALL_DIR)/lib -lmpich -lmpl xdrf/libxdrf.a
 
 .f.o:
        ${FC} ${FFLAGS} $*.f
@@ -47,7 +48,8 @@ objects = \
        timing.o \
        read_dist_constr.o \
        permut.o \
-       wham_calc1.o
+       wham_calc1.o \
+       ssMD.o
 
 objects_compar = \
         readrtns_compar.o \
@@ -62,7 +64,7 @@ all: no_option
 no_option:
 
 GAB: CPPFLAGS = -DMPI -DLINUX -DUNRES -DSPLITELE -DPROCOR -DPGI -DISNAN -DAMD64 \
-       -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DWHAM
+       -DCRYST_BOND -DCRYST_THETA -DCRYST_SC 
 GAB: ${objects} ${objects_compar} xdrf/libxdrf.a
        cc -o compinfo compinfo.c
        ./compinfo
@@ -71,7 +73,7 @@ GAB: ${objects} ${objects_compar} xdrf/libxdrf.a
        ${LIBS} -static-intel -o ${BIN}/wham-mult_ifort_MPICH-GAB.exe
 
 4P: CPPFLAGS = -DMPI -DLINUX -DUNRES -DSPLITELE -DPGI -DISNAN -DAMD64 \
-       -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DWHAM
+       -DCRYST_BOND -DCRYST_THETA -DCRYST_SC 
 4P: ${objects} ${objects_compar} xdrf/libxdrf.a
        cc -o compinfo compinfo.c
        ./compinfo
@@ -79,13 +81,13 @@ GAB: ${objects} ${objects_compar} xdrf/libxdrf.a
        $(FC) ${OPT} ${objects} ${objects_compar} cinfo.o \
        ${LIBS} -static-intel -o ${BIN}/wham-mult_ifort_MPICH_D-4P.exe
 
-E0LL2Y: CPPFLAGS = -DMPI -DLINUX -DUNRES -DSPLITELE -DPROCOR -DPGI -DISNAN -DAMD64 -DWHAM
+E0LL2Y: CPPFLAGS = -DMPI -DLINUX -DUNRES -DSPLITELE -DPROCOR -DPGI -DISNAN -DAMD64
 E0LL2Y: ${objects} ${objects_compar} xdrf/libxdrf.a
        cc -o compinfo compinfo.c
        ./compinfo
        ${FC} -c ${FFLAGS} cinfo.f
        $(FC) ${OPT} ${objects} ${objects_compar} cinfo.o \
-       ${LIBS} -static-intel -o ${BIN}/wham-mult_ifort_MPICH_D-E0LL2Y.exe
+       ${LIBS} -shared-intel -o ${BIN}/wham-mult_ifort_MPICH_D-E0LL2Y.exe
 
 xdrf/libxdrf.a:
        cd xdrf && make
index a2347d3..4fb7c9d 100644 (file)
@@ -174,7 +174,7 @@ c     &   " waga_homology",waga_homology(iset)
         write (iout,*) "temp", temp
         call pdbout(i,temp,energia(0),energia(0),0.0d0,0.0d0)
 #endif
-        if (energia(0).ge.1.0d20) then
+        if (energia(0).ge.1.0d6) then
           write (iout,*) "NaNs detected in some of the energy",
      &     " components for conformation",ii+1
           write (iout,*) "The Cartesian geometry is:"
index 0c1a211..808ee72 100644 (file)
@@ -360,7 +360,7 @@ c    &    sigma_odl_temp(maxres,maxres,max_template)
       logical lprn /.true./
       integer ilen
       external ilen
-      logical unres_pdb
+      logical unres_pdb,liiflag
 c
 c     FP - Nov. 2014 Temporary specifications for new vars
 c
@@ -688,22 +688,29 @@ c shift data in all arrays
 c
       if (waga_dist.ne.0.0d0) then
         ii=0
+        liiflag=.true.
         do i=nnt,nct-2 
          do j=i+2,nct 
           ii=ii+1
-          if (ii_in_use(ii).eq.0) then 
-             do ki=ii,lim_odl-1
-              ires_homo(ki)=ires_homo(ki+1)
-              jres_homo(ki)=jres_homo(ki+1)
-              ii_in_use(ki)=ii_in_use(ki+1)
+          if (ii_in_use(ii).eq.0.and.liiflag) then
+            liiflag=.false.
+            iistart=ii
+          endif
+          if (ii_in_use(ii).ne.0.and..not.liiflag) then
+             iishift=ii-iistart
+             liiflag=.true.
+             do ki=iistart,lim_odl-iishift
+              ires_homo(ki)=ires_homo(ki+iishift)
+              jres_homo(ki)=jres_homo(ki+iishift)
+              ii_in_use(ki)=ii_in_use(ki+iishift)
               do k=1,constr_homology
-               odl(k,ki)=odl(k,ki+1)
-               sigma_odl(k,ki)=sigma_odl(k,ki+1)
-               l_homo(k,ki)=l_homo(k,ki+1)
+               odl(k,ki)=odl(k,ki+iishift)
+               sigma_odl(k,ki)=sigma_odl(k,ki+iishift)
+               l_homo(k,ki)=l_homo(k,ki+iishift)
               enddo
              enddo
-             ii=ii-1
-             lim_odl=lim_odl-1
+             ii=ii-iishift
+             lim_odl=lim_odl-iishift
           endif
          enddo
         enddo
index 579d85a..0a46e85 100644 (file)
@@ -529,7 +529,7 @@ c    &    sigma_odl_temp(maxres,maxres,max_template)
       logical lprn /.true./
       integer ilen
       external ilen
-      logical unres_pdb
+      logical unres_pdb,liiflag
 c
 c     FP - Nov. 2014 Temporary specifications for new vars
 c
@@ -856,22 +856,29 @@ c shift data in all arrays
 c
       if (waga_dist.ne.0.0d0) then
         ii=0
+        liiflag=.true.
         do i=nnt,nct-2 
          do j=i+2,nct 
           ii=ii+1
-          if (ii_in_use(ii).eq.0) then 
-             do ki=ii,lim_odl-1
-              ires_homo(ki)=ires_homo(ki+1)
-              jres_homo(ki)=jres_homo(ki+1)
-              ii_in_use(ki)=ii_in_use(ki+1)
+          if (ii_in_use(ii).eq.0.and.liiflag) then
+            liiflag=.false.
+            iistart=ii
+          endif
+          if (ii_in_use(ii).ne.0.and..not.liiflag) then
+             iishift=ii-iistart
+             liiflag=.true.
+             do ki=iistart,lim_odl-iishift
+              ires_homo(ki)=ires_homo(ki+iishift)
+              jres_homo(ki)=jres_homo(ki+iishift)
+              ii_in_use(ki)=ii_in_use(ki+iishift)
               do k=1,constr_homology
-               odl(k,ki)=odl(k,ki+1)
-               sigma_odl(k,ki)=sigma_odl(k,ki+1)
-               l_homo(k,ki)=l_homo(k,ki+1)
+               odl(k,ki)=odl(k,ki+iishift)
+               sigma_odl(k,ki)=sigma_odl(k,ki+iishift)
+               l_homo(k,ki)=l_homo(k,ki+iishift)
               enddo
              enddo
-             ii=ii-1
-             lim_odl=lim_odl-1
+             ii=ii-iishift
+             lim_odl=lim_odl-iishift
           endif
          enddo
         enddo