On-the-fly machine learning of quantum mechanical forces and its potential applications for large scale molecular dynamics