Eigenvalues not saved from gmx covar in GROMACS 5
When I issue the command gmx covar -f full.trr -s full.tpr -v -o -mwa (for eigenvalues), I get an empty eigenvalues.xvg. In GROMACS v4.5.5 I used to get the eigenvalues outputted, for the same data sets, same command (g_covar). It says it's writing the eigenvalues, but when I open the file there are no eigenvalues there, only the preamble for the xvg file, ending at @TYPE xy.
Fixed output of eigenvalues in g_covar. Fixes #1575
Commit 972032bfb8cd38 introduced a bug that would lead to eigenvalues
only written to .xvg file if "-last" is explicitly stated on the
command line. Otherwise no eigenvalues would appear in the .xvg file.
The eigenvalues are written in a loop from '0' to 'end', but since
'end' is initialized with '-1', the loop would never be executed.
This patch moves the code that computes 'end' one block upwards
before the output to file.