Scripting to fix Cartesian position of only certain direction (using Forcite)

Hi all,

 Anybody has a template or know a technique to fix just one direction of a molecule/atom during Forcite calculation? I am trying to fix my molecule in z direction, but allowing it to move freely along x and y. Using Forcite, if I checked the box in Modify-->Constraints, the constraints do not take effect unless all three directions are ticked. Looking forward to possible answers. Thank you.

Previous post (Updated Link​​​​​​​)

has mentioned this issue before, but without solid conclusion, and the link given in the pose was broken.