X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Fcluster%2Fwham%2Fsrc%2Fprobabl.F;h=53735e872004bda44f0b7274354d06cc0621029a;hb=95abe93df3a12f9cf8d94b2ed69c14cc4b3363e0;hp=7fcd29b7d17ffbedb6e1eff6fdde46ade371879b;hpb=62a2778d80b51198f1240d5deccabcb44466dc08;p=unres.git diff --git a/source/cluster/wham/src/probabl.F b/source/cluster/wham/src/probabl.F index 7fcd29b..53735e8 100644 --- a/source/cluster/wham/src/probabl.F +++ b/source/cluster/wham/src/probabl.F @@ -28,8 +28,9 @@ character*5 ctemper integer ilen external ilen - real*4 Fdimless(maxconf) + real*4 Fdimless(maxconf),Fdimless_(maxconf) double precision energia(0:max_ene) + double precision totfree_(maxconf),entfac_(maxconf) do i=1,ncon list_conf(i)=i enddo @@ -111,13 +112,13 @@ c write (iout,*) "i",i," ii",ii call int_from_cart1(.false.) call etotal(energia(0),fT) totfree(i)=energia(0) -c#define DEBUG +#define DEBUG #ifdef DEBUG write (iout,*) i," energia",(energia(j),j=0,20) call enerprint(energia(0),ft) call flush(iout) #endif -c#undef DEBUG +#undef DEBUG do k=1,max_ene enetb(k,i)=energia(k) enddo @@ -172,8 +173,13 @@ cc if (wcorr6.eq.0) ecorr6=0.0d0 & +ft(2)*wtor_d*etors_d+ft(1)*wsccor*esccor & +wbond*estr #endif +#ifdef MPI + Fdimless_(i)=beta_h(ib)*etot+entfac(ii) + totfree_(i)=etot +#else Fdimless(i)=beta_h(ib)*etot+entfac(ii) totfree(i)=etot +#endif #ifdef DEBUG write (iout,*) "etrop", i,ii,ib, @@ -182,19 +188,22 @@ cc if (wcorr6.eq.0) ecorr6=0.0d0 #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, & MPI_COMM_WORLD, IERROR) - call MPI_Gatherv(totfree(1),scount(me), + call MPI_Gatherv(totfree_(1),scount(me), & MPI_DOUBLE_PRECISION,totfree(1), & scount(0),idispl(0),MPI_DOUBLE_PRECISION,Master, & MPI_COMM_WORLD, IERROR) call MPI_Gatherv(entfac(indstart(me)+1),scount(me), - & MPI_DOUBLE_PRECISION,entfac(1), + & MPI_DOUBLE_PRECISION,entfac_(1), & scount(0),idispl(0),MPI_DOUBLE_PRECISION,Master, & MPI_COMM_WORLD, IERROR) if (me.eq.Master) then + do i=1,ncon + entfac(i)=entfac_(i) + enddo #endif c#define DEBUG #ifdef DEBUG