Fix convert-tpr segfault when no velocities are present in the tpr file
Previously, convert-tpr
implicitly expected velocities to be present in the tpr file, which leads to segfaults when this is not the case (e.g. tpr file for energy minimization)
Now:
- Correctly handles subsystem selection via index, even when the tpr does not contain velocities
- Gracefully rejects generation of velocities for such tpr (an additional, unreported problem discovered during investigation)
Fixes #5080 (closed)
Edited by Mark Abraham