gmx nmtraj: Invalid value: '0.0'; expected an integer
## Summary Trying to run `gmx nmtraj` on any trajectory fails with ``` Program: gmx nmtraj, version 2025-dev-20240126-fd7fd2facf-dirty Source file: src/gromacs/utility/strconvert.cpp (line 88) Function: int gmx::intFromString(const char*) Error in user input: Invalid value: '0.0'; expected an integer ``` This is because we are using [the default value of `0.0` for `phasevec`](https://gitlab.com/gromacs/gromacs/blob/f8bb8c99907c2cf95ccfca69c01ae9ebe9d9a46d/src/gromacs/gmxana/gmx_nmtraj.cpp#L83) but then [try to parse it as `int`](https://gitlab.com/gromacs/gromacs/blob/f8bb8c99907c2cf95ccfca69c01ae9ebe9d9a46d/src/gromacs/gmxana/gmx_nmtraj.cpp#L145). `git log` suggests that the error has been there since 2020 (658819431c0dabdb13ef01f32bf59e0c0eca82ff). Before that, we were using `strtod`, but is was changed to `gmx::fromStdString<int>` during refactoring. ## Exact steps to reproduce `gmx nmtraj -s topol.tpr -v traj.trr` on any TPR+TRR file. For a full run, the file with eigenvectors must be present, but this error happens before that file is read. ## For developers: Why is this important? User report: https://gromacs.bioexcel.eu/t/nmtraj-issue/8171 ## Possible fixes Using `gmx::fromStdString<real>` instead seems like the most logical thing to do, but we would need to run at least some tests afterward.
issue