Restraining force in z direction

Unless you improve your way of asking for help and provide more context and make it easy to understand what exactly you are trying to do and how and what you expect as result, it is not likely that you will be getting anything beyond what you already got. Please see: Please Read This First: Guidelines and Suggestions for posting LAMMPS questions