The constraints in NPT run

If I want to apply some constraints in an NPT run, i.e. fixing cell angles but allowing cell length to change, how can I do it with MS because all constraints should be removed before NPT run in MS.