[lammps-users] how to reduce the volume of a simulation cell

Hello Steve
I just want to shrink the volume of my simulation box. There are 100 polymer molecules been built in the box, but the they were coarsely arranged in a large box. So I want to Keep x and y dimension constant and decrease the z size to get the condensed polymer
phase in real density.

To reach the above goal, may I use the displace_box command? like the following script?

displace_box upperlayer z final lo hi units box

I checked lammps document, but still have some questions.
Does the box dispalce at the beginning of simulation or gradually during the simulation?
Does this command do time-integration?

Yang |

Displace_box changes the box size instantaneously.
Fix deform changes it gradually during a simulation.
Fix npt (as Axel outlines) will also change it during
a simulation in response to the pressure exerted
by the atoms.