X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Fcluster%2Fwham%2Fsrc%2Fprobabl.F;h=62da77fe1a2836aea04f5bf78487e1e8eb84fe24;hb=5303919700c65ffc77d1e57d865fdc3262d17130;hp=3071d4c3521c3dc08960637b854d905f39890ec9;hpb=357148eb01c1ea7e5cfd362d34f1e1ab61c8f2a8;p=unres.git diff --git a/source/cluster/wham/src/probabl.F b/source/cluster/wham/src/probabl.F index 3071d4c..62da77f 100644 --- a/source/cluster/wham/src/probabl.F +++ b/source/cluster/wham/src/probabl.F @@ -31,8 +31,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 @@ -83,7 +84,11 @@ c enddo & dlog(dexp(quotl)+dexp(-quotl)) enddo c write (iout,*) 1.0d0/(beta_h(ib)*1.987D-3),ft - call flush(iout) +c#ifdef AIX +c call flush_(iout) +c#else +c call flush(iout) +c#endif endif #ifdef MPI @@ -94,7 +99,7 @@ c write (iout,*) 1.0d0/(beta_h(ib)*1.987D-3),ft ii=i #endif c write (iout,*) "i",i," ii",ii - call flush(iout) +c call flush(iout) if (ib.eq.1) then do j=1,nres do k=1,3 @@ -115,7 +120,7 @@ c write (iout,*) "i",i," ii",ii call etotal(energia(0),fT) totfree(i)=energia(0) #ifdef DEBUG - write (iout,*) i," energia",(energia(j),j=0,20) + write (iout,*) "Conformation",i call enerprint(energia(0),ft) write (iout,'(a,3(3x,a5),5x,3(3x,a5))') & "Residue","X(CA)","Y(CA)","Z(CA)","X(SC)","Y(SC)","Z(SC)" @@ -125,8 +130,8 @@ c write (iout,*) "i",i," ii",ii & (c(j,ires+nres),j=1,3) enddo - call intout - call flush(iout) +c call intout +c call flush(iout) #endif do k=1,max_ene enetb(k,i)=energia(k) @@ -189,30 +194,43 @@ cc if (wcorr6.eq.0) ecorr6=0.0d0 & +wdfa_tor*edfator+wdfa_nei*edfanei+wdfa_beta*edfabet & +wbond*estr+ehomology_constr #endif +#ifdef MPI + Fdimless_(i)=beta_h(ib)*etot+entfac(ii) + totfree_(i)=etot +#ifdef DEBUG + write (iout,*) "etrop", i,ii,ib, + & 1.0d0/(1.987d-3*beta_h(ib)),totfree(i), + & entfac(ii),Fdimless_(i) +#endif +#else Fdimless(i)=beta_h(ib)*etot+entfac(ii) totfree(i)=etot #ifdef DEBUG - write (iout,*) "etrop", i,ii,ib, & 1.0d0/(1.987d-3*beta_h(ib)),totfree(i), & entfac(ii),Fdimless(i) #endif +#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 + #ifdef DEBUG write (iout,*) "The FDIMLESS array before sorting" do i=1,ncon @@ -238,14 +256,12 @@ c write (iout,*) "qfree",qfree sumprob=0.0 do i=1,min0(ncon,maxstr_proc)-1 sumprob=sumprob+dexp(dble(-fdimless(i)+fdimless(1)))/qfree -c#define DEBUG #ifdef DEBUG write (iout,*) 'i=',i,ib,beta_h(ib), & 1.0d0/(1.987d-3*beta_h(ib)),list_conf(i), & totfree(list_conf(i)), & -entfac(list_conf(i)),fdimless(i),sumprob #endif -c#undef DEBUG if (sumprob.gt.prob_limit) goto 122 c if (sumprob.gt.1.00d0) goto 122 nlist=nlist+1