Imported patch for src/moldyn.F90