wham corrections
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Tue, 12 Apr 2016 20:45:04 +0000 (22:45 +0200)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Tue, 12 Apr 2016 20:45:04 +0000 (22:45 +0200)
source/wham/src/energy_p_new.F
source/wham/src/make_ensemble1.F

index 78be320..a3e2b12 100644 (file)
@@ -4103,7 +4103,7 @@ c      write (iout,*) "ithetyp",(ithetyp(i),i=1,ntyp1)
           coskt(k)=dcos(k*theti2)
           sinkt(k)=dsin(k*theti2)
         enddo
-        if (i.gt.3  .and. itype(i-3).ne.ntyp1) then
+        if (i.gt.3 .and. itype(max0(i-3,1)).ne.ntyp1) then
 #ifdef OSF
           phii=phi(i)
           if (phii.ne.phii) phii=150.0
index 87eb215..e7e68de 100644 (file)
@@ -34,7 +34,7 @@
       character*5 ctemper
       integer ilen
       external ilen
-      real*4 Fdimless(MaxStr)
+      real*4 Fdimless(MaxStr),Fdimless_(MaxStr)
       double precision enepot(MaxStr)
       integer iperm(MaxStr)
       integer islice
@@ -187,7 +187,7 @@ c              write (iout,*) 1.0d0/(beta_h(ib,iparm)*1.987D-3),ft
      &      +wbond*estr+ehomology_constr
 #endif
 #ifdef MPI
-            Fdimless(i)=
+            Fdimless_(i)=
      &        beta_h(ib,iparm)*etot-entfac(i)
             potE(i,iparm)=etot
 #ifdef DEBUG
@@ -201,7 +201,7 @@ c              write (iout,*) 1.0d0/(beta_h(ib,iparm)*1.987D-3),ft
 #endif
           enddo   ! i
 #ifdef MPI
-          call MPI_Gatherv(Fdimless(1),scount(me),
+          call MPI_Gatherv(Fdimless_(1),scount(me),
      &     MPI_REAL,Fdimless(1),
      &     scount(0),idispl(0),MPI_REAL,Master,
      &     WHAM_COMM, IERROR)