Extended Lagrangian formulation of charge-constrained tight-binding molecular dynamics.