"Learn-on-the-fly'': a hybrid classical and quantum-mechanical molecular dynamics simulation