9 common/creg/ m(4),x4(12),xdot4(12),p(12),q(12),time4,
energy,
10 & epsr2,
xr(9),w(9),rr(6),ta(6),mij(6),cm(10),rmax4,
11 & tmax,ds,
tstep,eps,nstep4,name4(4),kz15,kz27,nreg,nfn
12 common/config/ r2(4,4),i1,i2,i3,i4
13 common/close/ rij(4,4),rcoll,qperi,
SIZE(4),ecoll3,ip(4)
14 common/ccoll/ qk(12),pk(12),icall,icoll,ndiss4
15 common/clump/ bodys(ncmax,5),t0s(5),ts(5),
steps(5),rmaxs(5),
16 & names(ncmax,5),isys(5)
41 cm(k) = cm(k) + m(l)*x4(lk)
42 cm(k+3) = cm(k+3) + m(l)*xdot4(lk)
56 x4(lk) = x4(lk) - cm(k)
57 xdot4(lk) = xdot4(lk) - cm(k+3)
79 20 CALL
nbpot(4,np,pot1)
91 vi2 = x0dot(1,icomp)**2 + x0dot(2,icomp)**2 + x0dot(3,icomp)**2
92 corr = 1.0 + 2.0*(pot2 - pot1)/(cm(7)*vi2)
93 IF (corr.LE.0.0d0) corr = 0.0
97 x0dot(k,icomp) = sqrt(corr)*x0dot(k,icomp)
117 100 jlist(5) = name4(i1)
125 IF (name(j).EQ.jlist(l+4))
THEN
132 icomp = min(jlist(1),jlist(2))
133 jcomp = max(jlist(1),jlist(2))
139 IF (body(j).GT.0.0d0) icm = j
143 time2 = t0s(isub) + time4 - tprev
144 dt8 = (tblock - tprev)/8.0d0
148 IF (time2.GT.0.0d0)
THEN
150 dtn = nint(dtn2/dt8)*dt8
155 dtn = -nint(dtn2/dt8)*dt8
160 time = min(tblock,time)
168 cm(k+3) = xdot(k,icm)
177 CALL
nbpot(1,np,pot1)
192 IF (name(j).EQ.names(k,isub))
THEN
193 body(j) = bodys(k,isub)
199 x(k,j) = x4(lk) + cm(k)
204 CALL
nbpot(4,np,pot2)
207 vi2 = cm(4)**2 + cm(5)**2 + cm(6)**2
208 corr = 1.0 + 2.0*(pot2 - pot1)/(cm(7)*vi2)
209 IF (corr.LE.0.0d0) corr = 0.0
213 cm(k+3) = sqrt(corr)*cm(k+3)
223 xdot(k,j) = xdot4(lk) + cm(k+3)
224 x0dot(k,j) = xdot(k,j)
235 IF (isub.LT.nsub)
THEN
238 bodys(k,l) = bodys(k,l+1)
239 names(k,l) = names(k,l+1)
244 rmaxs(l) = rmaxs(l+1)
251 esub = esub -
energy - ecoll3
264 IF (names(l,jsub).EQ.0) go to 155
266 IF (name(j).EQ.names(l,jsub).AND.body(j).LE.0.0d0)
THEN
284 IF (r2(i1,i4).LT.r2(i1,i3).OR.r2(i3,i4).LT.r2(i1,i3))
THEN
285 IF (r2(i1,i4).LT.r2(i3,i4))
THEN
299 IF (min(r2(i1,i3),r2(i2,i4)).GT.cmsep2*r2(i1,i2))
THEN
326 dmin4 = min(dmin4,rcoll)
329 bbcoll = bbcoll + cm(9)
332 170 nstepq = nstepq + nstep4
333 ndiss = ndiss + ndiss4
334 ecoll = ecoll + ecoll3
335 e(10) = e(10) + ecoll3
338 IF (nsub.EQ.0.AND.kz(2).GE.1)
THEN
339 IF (time - tdump.LT.time4)
THEN
353 nnb2 = list(1,icm) + 1
358 rij2 = (x(1,j) - cm(1))**2 + (x(2,j) - cm(2))**2 +
359 & (x(3,j) - cm(3))**2
360 IF (rij2.LT.rp2)
THEN
362 IF (j.EQ.jlist(k)) go to 210
369 IF (isub.EQ.0) go to 20