Severe problem in center of mass calculation

GROMACS version: 2023 & 5.1.5
GROMACS modification: No

Hi there!

I’m using traj command with -com flag to calculate the center of mass of the groups in my system (in this case HSA protein). I noticed that instead of calculating the real center of mass, the first atom of the protein in the gro file is considered as center of mass!!!
I tried several systems and with two versions of GROMACS (5.1.5 & 2023.2) and still the same results.

Dear @omidmgh ,

How are you calculatin the centre of mass? Are you providing an index file and selecting the HSA group from there? Did you check that the index is correct?

After so much research about this finally I figured out that with -com flag GROMACS only calculates mathematical coordinations of the center of math and the residue and atom shown at the first of each line of the com gro file is only the first atom of the respective group in the main gro file to illustrate wich group this com coordinations belongs to.
I thought others with the same problem may find this useful so I leave it here.