A set of first-principles molecular-dynamics equations of motion involving
fractional orbital occupations is derived from a rotationally invariant tim
e-independent Lagrangian function. All velocity-dependent force terms can b
e removed from these equations by introducing an additional time-dependent
term in the Lagrangian. The resulting scheme is formally equivalent to a re
cently proposed scheme [J. YandeVondele and A. DeVita, Phys. Rev. B 60, 13
741 (1999)], which is thus put on a firmer theoretical basis, and completed
by a constant of motion resulting from the analytical expression of energy
conservation.