Getting the COM atom of a protein

GROMACS version: 2023.4
GROMACS modification: No

Dear all,

I am trying to obtain the COM atom of the protein. The way that I am doing it is:
gmx select -s em.gro -n pull.ndx -select ‘com of group protein’ -on com.ndx.

However, com.ndx contains this:
[ com_of_group_protein ]
1

which is obviously not correct. How does one get the COM atom of a protein?

Dear @oSalad ,

as per the manual, gmx select is for dynamic selection. What do you mean with getting the COM? Deriving its position, i.e., (x,y,z) coordinates?

In that case you can use the tool gmx select, just you specify the flag -com when selecting the Protein group.

Dear @obZehn,

I’m trying to get the residue or atom that is the com. For context, I need to explicitly define my coms for steered MD, but am unsure how to obtain that atom/residue number.

What do you mean that you need to explicitly define the COM for steered MD? For GROMACS pulling? In that case, you do not need to explicitly define the COM.

Also, the center of mass is a geometrical point, it does not necessarily correspond to an atom. As a limiting scenario, think about a vesicle, or a fullerene. The COM of this structures clearly is the centre of their spherical symmetry, where no atom of the structures is present. Best thing you can do - if you really need a reference to an atom - is to pick the closest atom to the geometrical COM, but again the COM will evolve dynamically while the atom selection will not, making your ‘atomic’ COM ill defined.

Because of this error:
ERROR 2 [file …/…/inputs/pull.mdp]:
When the maximum distance from a pull group reference atom to other atoms
in the group is larger than 0.5 times half the box size a centrally
placed atom should be chosen as pbcatom. Pull group 2 is larger than that
and does not have a specific atom selected as reference atom.

I have been getting by this by setting
pull-pbc-ref-prev-step-com = yes

but I have shrunken the box even more now, so it seems I actually need to define the COM manually.

Then you can check just by taking a look at your structure with a visualization software like VMD. Look at the group you are pulling, e.g., you protein, and select an atom that is central with respect to the pull group at the start of the run. You do not need to be super precise with the selection.

EDIT: Fixed comment after @MagnusL rightly pointed out the role of the meaning of the pull-pbc-ref-prev-step-com = yes key work in the .mdp file.

If you are using pull-pbc-ref-prev-step-com = yes it is even less important to pick an atom that will remain central in the molecule. It is only important that it is central from the beginning. After that, it will not be used anymore, but the center of mass from the previous step will be used instead.

Thank you all for the help!