WIGGLE: a new constrained molecular dynamics algorithm in Cartesian coordinate. The theory of conventional constrained molecular dynamics (MD) simulations is reexamined based on a projection operator approach. A new algorithm, named WIGGLE, is presented for MD simulations with internal constraints. At each time step, the algorithm utilizes the constrained accelerations derived from velocity adjustments to satisfy the hidden constraints, and provides both initial and final constrained values that are almost an order of magnitude closer to the desired values than does RATTLE. Its performance is compared with those of RATTLE and SHAKE for an octane molecule. Also presented are a formalism to additionally constrain the angular momentum about the center of mass and an expression for the local energy drift during each integration time step.