GROMACS version: v2025.3
GROMACS modification: No
Here post your question
Hello, I am new to GROMACS and am encountering issues in making groups using make_ndx. My pdb file and the processed.gro generated by gmx editconf includes two chains (Chain A: residue 1-112, Chain H: residues 1-125).
Below is from the topol.top file.
[ molecules ]
; Compound #mols
Protein_chain_A 1
Protein_chain_H 1
SOL 24397
I tried to use gmx make_ndx -f processed.gro -o index_test.ndx to generate groups containing each chain. When I use r 1-112 or 113-237, the number of atoms does not match (especially for chain H) while chain shows empty group. I can only manage to create group using ri, but it is a bit difficult to read the plots that used atoms as x-axis.
chain
Group is empty
r 1-112
Found 3459 atoms with res.nr. in range 1-112
r 113-237
Found 190 atoms with res.nr. in range 113-237
ri 1-112
Found 1818 atoms with resind.+1 in range 1-112
ri 113-237
Found 1831 atoms with resind.+1 in range 113-237
May I know if I am doing anything wrong? Is it possible to use residue no. to make index and plot the graphs?
Thank you very much for your reply.
The correct syntax to select residues from the chain [chainID] is
chain [chainID]
In addition, unless I’m mistaken, gro files has no information on chain identifiers, you have to use PDB to use them. You can type ‘h‘ when in make_ndx dialog to read the manual with all descriptors in detail.
You should double-check me on this by manually comparing atom numbers in the ndx file you produced, but I think “r X“ is selecting the lines in the structure file with “residue number=X”, so “r 1-112“ is selecting residues 1-112 from both chains. I think you can obtain the results you’re seeking by “ri 1-112“ and “ri 113-235“, “ri“ selects residue index which is numbered continuously through the structure file