Principle component analysis (pca) for chi dihedral angles only

GROMACS version: 2021
GROMACS modification: Yes/No
Does anyone know a good way with gromacs command-line tools to do pca on only chi dihedral angles in a protein?
I’ve looked at the documentation for selection, chi, gangle, angle, mk_angndx. I want the ease of selecting only chi dihedrals provided by chi (so I don’t have to come up with some complicated selection rules) and how it’s output mentions to which residue each angle belongs. I also want the output of angle
so that I can feed it into covar. Is there a recommended way to get the atom groups from chi in a format that I can feed to angle or a trajectory that I can feed to covar?
I see that the chi.log has the atom numbers. I can probably write a script to translate that into .idx entries. But was just wondering whether there’s a supported, easy way that I am overlooking.

Hi,
maybe gmx select (gmx select — GROMACS 2021.4 documentation ) can help you (here is the syntax for selection expression Selection syntax and usage — GROMACS 2021.4 documentation)

Thanks, alevilla, but I found it easier to import the output of gmx chi into a jupyter notebook and do the data analysis there then to figure out how to select chi 1 and 2 dihedral groups using gromacs’s selection nomenclature, so I went that route.