fix and relax atom in CNT

Dear all,

I build capped carbon nanotube and run a geometry optimization. Now, I want to fix the two layers’ carbon atoms at the bottom and the hydrogen atoms. how can I fix these atom only? How do I relax other atoms to adsorb CO2?