How does lammps compress the model to a specified density or size?

I have builded a large model with polymer, water molecule, and ions (Na+, Cl-), which is a periodic structure. I want to compress it to a specified volume or density, and I’m wondering if there’s any way to do that?

Thanks very much if anyone can help?

Chao

You can use fix deform to gradually change the box dimensions to ultimately achieve the volume corresponding to the desired density.

However, the image of your system looks like you have chose and very bad starting point. It will take a very long time until you will have a properly equilibrated system. I would be smarter to construct a geometry that is closer to the desired final state and take it from there.