1 SUBROUTINE const(X,XD,M,NB,ENERGY,G,ALAG)
7 IMPLICIT REAL*8 (a-h,m,o-z)
8 REAL*8 x(3*nb),xd(3*nb),g(3),m(nb)
24 t=t+.5d0*m(i)*(xd(k1)**2+xd(k2)**2+xd(k3)**2)
25 g(1)=g(1)+m(i)*(x(k2)*xd(k3)-x(k3)*xd(k2))
26 g(2)=g(2)-m(i)*(x(k1)*xd(k3)-x(k3)*xd(k1))
27 g(3)=g(3)+m(i)*(x(k1)*xd(k2)-x(k2)*xd(k1))
37 r2=r2+(x(ki)-x(kj))**2
39 u=u+m(i)*m(j)/sqrt(r2)