frozen coordiates of a atom

Dear all,
I want to partly frozen the x, y coordinates of an atom, while the z coordinate of the atom is free. Could you tell me how to implement it?

With best regards

Yours,

Hai-Bo