A localized-basis scheme for molecular dynamics