Skip to content

Commit

Permalink
Fix velocity unit scale for existing vels passed to OpenMM (ParmEd#1367)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Swails <[email protected]>
  • Loading branch information
nffaruk and swails authored Sep 22, 2024
1 parent 6190e8d commit 1650aab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parmed/tools/simulations/openmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,8 @@ def simulate(parm, args):
if runmd and mdin.cntrl_nml['irest'] == 1 and position_container.hasvels:
if scriptfile is not None:
scriptfile.write('# Set velocities\n')
scriptfile.write('simulation.context.setVelocities(parm.velocities)\n')
simulation.context.setVelocities(position_container.velocities)
scriptfile.write('simulation.context.setVelocities(parm.velocities/10)\n')
simulation.context.setVelocities(position_container.velocities/10) # /10 for Å/ps to nm/ps
elif runmd:
if scriptfile is not None:
scriptfile.write('# Set velocities\n')
Expand Down

0 comments on commit 1650aab

Please sign in to comment.