Interactive molecular dynamics with VMD becomes stuttering after reconnecting
When using the IMD implementation in several versions of Gromacs including 2019.3 and different operating systems.
This bug occurs with the following steps:
- Run an IMD simulation (gmx mdrun -imdwait -imdpull -imdterm -s mysim.tpr)
- Connect to the simulation using VMD (or other visualization tool that implements the IMD protocol)
- Pause the simulation from VMD ("detach sim" button)
- Reconnect to the simulation
The expected behavior is to have the same performance before and after pausing the simulation.
The actual behavior is a slower and stuttering simulation. Note that this bug does not occur when using NAMD.
See an example of the bug here: https://www.youtube.com/watch?v=_gZ6wA7c4b8 <https://www.youtube.com/watch?v=_gZ6wA7c4b8&feature=youtu.be>
An error line appears in the gromacs window: "IMD: Failed to shutdown socket. Did the client already disconnect?" and "IMD: Error in file gromacs-2019.3/src/gromacs/imd/imdsocket.cpp on line 293."