stop
#endif
endif
+ if(hmc.gt.0 .and. mod(itime,hmc).eq.0) then
+ call statout(itime)
+ call hmc_test(itime)
+ endif
if(ntwe.ne.0) then
if (mod(itime,ntwe).eq.0) call statout(itime)
endif
remd_t_bath(i)=remd_ene(n_ene+1,i)
iremd_iset(i)=remd_ene(n_ene+2,i)
enddo
+#ifdef DEBUG
if(lmuca) then
co write(iout,*) 'REMD exchange temp,ene,elow,ehigh'
do i=1,nodes
write(iout,'(6f12.5)') (remd_ene(j,i),j=1,n_ene)
enddo
endif
+#endif
c-------------------------------------
IF(.not.usampl.and.hremd.eq.0) THEN
+#ifdef DEBUG
write (iout,*) "Enter exchnge, remd_m",remd_m(1),
& " nodes",nodes
ctime call flush(iout)
write (iout,*) "remd_m(1)",remd_m(1)
+#endif
do irr=1,remd_m(1)
i=ifirst(iran_num(1,remd_m(1)))
+#ifdef DEBUG
write (iout,*) "i",i
+#endif
ctime call flush(iout)
do ii=1,nodes-1
+#ifdef DEBUG
write (iout,*) "i",i," nupa(0,i)",int(nupa(0,i))
+#endif
if(i.gt.0.and.nupa(0,i).gt.0) then
iex=i
c if (i.eq.1 .and. int(nupa(0,i)).eq.1) then
& 'MD steps:',t_MD
write (iout,'(/28(1h=),a25,27(1h=))')
& ' End of MD calculation '
+ if(hmc.gt.0) write (iout,*) 'HMC acceptance ratio',
+ & n_timestep*1.0d0/hmc/hmc_acc
endif
return
end