make_ndx -f conf.gro -o my.ndx 'SOL' 'SHL' q (you need to put the single quotes) in your .mdp add: freezegrps = SOL freezedim = Y Y Y energygrp_excl = SOL SOL energygrps = SOL SHL Protein