Freezing Atoms For a Gaussian Calculation

Hello,

I have a system of 7 residues, 7 ch3 and 1 bicarbonate. I need to set up a Gaussian input where I want to freeze the carbon of the CH3 and the backbone of the 7 residues.
What would be the most straightforward way to do so and make sure that the side chains, the hydrogens and the anions are free to move ?

Until now I was doing it manually by writing down the numbers according to the label in Avogadro. However, because the hydrogens of the C were drawn using Avogadro, the numbering is not ordered so when I export the coordinates as a Gaussian input, the hydrogens are not listed with the corresponding C and I do not know which residues it belongs to.

Thank you.