Error in calculation dipole moment of a fragment of a protein

GROMACS version: 2023.1
GROMACS modification: No
Dear all
I am trying to calculate the dipole moment of a fragment (residues 47-63) of a protein using this command:
gmx dipoles -f md_0_1_noPBC.xtc -s md_0_1.tpr -n 47-63.ndx -o d47-63.xvg
but I faced this error:
Fatal error:
index[1]=680 does not correspond to the first atom of a molecule
I made the index file for my fragment using this command:
gmx make_ndx -f md_0_1.tpr -o 47-63.ndx

r 47 - 63
q

Any comments or suggestion are welcome.

The tool assumes that groups consist of whole molecules.