c******************************************************* c out_dissociation_time(ntime,n) c c np600=0 c c it's an alternative for 39.f c only need to change the call-entry in 7.f subroutine out_dissociation_time(ntime,n) implicit double precision(a-h, o-z) parameter(maxpair=100,maxa=500,maxjudge=10) c rstandard is the triggering distance c can be changed here and do not interfere anywhere else parameter(nbucket=100,rstandard=0.6,rstandard2=0.5,interl=6) double precision r_pair(maxpair) common /juxtapair/ npair,npairs(maxpair,2),nflag(maxpair,maxjudge) +,njudge, sjuxta_judge(maxjudge),mp(maxpair) common/matrix/x(maxa,3),bangle(maxa) common/juxta_distribution/d_min,d_max,d_bucket, + npair_bucket(nbucket,maxpair) c 1. check if nflag(1,1:njudge)==0, finding a new candidate c a. k=0 do i=1,njudge if (nflag(1,i).eq.0) then k=k+1 endif enddo c b. if k>0 finding the minimum distance pair rrmin=10000 if (k.ge.1) then do i1=1,n-interl-1 i2max=min(n,n-interl+i1) do i2=i1+interl,i2max rr=0 do k1=1,3 rr=rr+(x(i1,k1)-x(i2,k1))**2 enddo if ((rr.lt.rrmin).and.(rr.gt.0.3)) then rrmin=rr;i1min=i1;i2min=i2 endif enddo enddo rrmin=dsqrt(rrmin) c c. if rrminsjuxta_judge(i), then c output the dissciation_time into fort.(600+i) do i=1,njudge if (nflag(1,i).ne.0) then rr=0 do k=1,3 rr=rr+(x(npairs(i,1),k)-x(npairs(i,2),k))**2 enddo rr=dsqrt(rr) if (rr.gt.sjuxta_judge(i)) then mpi=600+i write(mpi,*) (ntime-nflag(1,i)),sjuxta_judge(i) c write(*,*) (ntime-nflag(1,i)),sjuxta_judge(i) call flush(mpi) nflag(1,i)=0 else c check the evolution of pair distance c write(i+400,*) npairs(i,1),npairs(i,2),rr,ntime call flush(i+400) endif endif enddo return end