Optionally reset velocities for MD#686
Conversation
|
what I think is needed to have a test where we have an input file that contains velocities and without any rescale_velocities in the input we keep the user velocities |
Is that not what lj-traj.xyz includes velocities, so I just reused it for the input file, and I check that with |
Actually the momenta are stored, not velocities, but I don't think this makes a practical difference. |
cool! |
Co-authored-by: Jacob Wilkins <46597752+oerc0122@users.noreply.github.com>
Resolves #666
This is a slightly different fix to the discussion in the issue, to me it also seems like a reasonable solution that makes sense based on our current parameters (
rescale_velocitiesin particular, since this already guarded an effectively duplicatedself._reset_velocities()call):rescale_velocitiesisTrue(default isFalse) then velocities are reset before heating and/or MD (assuming we're not restarting)rescale_velocitiesisFalse, we don't reset the velocities, unless no velocities have been set, in the same way asNVT_CSVR. I'm also happy to leave the velocities at 0 if it makes more senseI test that reading in a file with velocities (and
rescale_velocitiesisFalse) keeps these velocities, so I think it addresses the main point of the issue.There is also scope for debate about the additional resets we perform in between heating steps, and between heating and MD, but that could also be addressed separately.
How does this look/sound, @trdurrant?