The code to select atoms to write to the xtc file
only looped over the number of atoms selected for
output rather than all atoms. This meant that xtc
group selections that were not located at the start
of the atom indices would not be written correctly.
Fixes #1561.
Change-Id: I48886a75c682e38122dadcb2f752507b14b308fe
int i, j;
snew(xxtc, of->natoms_x_compressed);
- for (i = 0, j = 0; (i < of->natoms_x_compressed); i++)
+ for (i = 0, j = 0; (i < of->natoms_global); i++)
{
if (ggrpnr(of->groups, egcCompressedX, i) == 0)
{