following this tutorial on how to proceed when the system contains LPH particles (
https://valdes-tresanco-ms.github.io/gmx_MMPBSA/examples/Protein_ligand_LPH_atoms_CHARMMff/)
gmx make_ndx -f step5_1.tpr -o index_mod_gromacs.ndx
>splitat 13
>13&!66
>name 67 lig
>1|67
>del 16-66
>q
should look like this
0 System : 46744 atoms
1 Protein : 4002 atoms
2 Protein-H : 1966 atoms
3 C-alpha : 255 atoms
4 Backbone : 765 atoms
5 MainChain : 1019 atoms
6 MainChain+Cb : 1259 atoms
7 MainChain+H : 1263 atoms
8 SideChain : 2739 atoms
9 SideChain-H : 947 atoms
10 Prot-Masses : 4002 atoms
11 non-Protein : 42742 atoms
12 Other : 42742 atoms
13 LIG : 51 atoms
14 CLA : 4 atoms
15 TIP3 : 42687 atoms
16 lig : 50 atoms
17 Protein_lig : 4052 atoms
echo 17 | gmx trjconv -s step5_1.tpr -f 5frames.xtc -dump 0 -o str_noLP.pdb -n index_mod_gromacs.ndx
echo 17 | gmx trjconv -s str_noLP.pdb -f 5frames.xtc -o com_traj.pdb -n index_mod_gromacs.ndx
gmx_MMPBSA -O -i mmpbsa.in -cs str_noLP.pdb -ci index_mod_gromacs.ndx -cg 1 16 -ct com_traj.pdb -cp topol.top