We present a practical numerical method for evaluating the Lagrange
multipliers necessary for maintaining a constrained linear geometry of
particles in dynamical simulations. The method involves no iterations, and is
limited in accuracy only by the numerical methods for solving small systems of
linear equations. As a result of the non-iterative and exact (within numerical
accuracy) nature of the procedure there is no drift in the constrained
geometry, and the method is therefore readily applied to molecular dynamics
simulations of, e.g., rigid linear molecules or materials of non-spherical
grains. We illustrate the approach through implementation in the commonly used
second-order velocity explicit Verlet method.Comment: 12 pages, 2 figure