I have a LAMMPS data file with roughly 1000 water molecules, with constituent atoms defined by an atom type (i.e, OW = type 1, HW = type 2), while the molecule itself is not defined explicitly. Therefore, there are approx. 3000 'water atoms' in the system.

The system also contains 50 polymer chains with the total system size being around 20,000 atoms.

I need to triple the number of water molecules in the system while keeping the box size constant (and avoiding overlapping atoms). How would I do this? I'm aware of the create_atoms command, although how this would be used in this case I'm unsure.


  • 2
    $\begingroup$ Packmol is a neat tool that can help you with this. $\endgroup$ Nov 16, 2022 at 12:20
  • 1
    $\begingroup$ Also, I suppose you can use delete_atoms overlap along with create_atoms to ensure there is no overlapping. $\endgroup$ Nov 16, 2022 at 12:26

1 Answer 1


Here's what I would do in your situation:

  1. Replicate the box three times (replicate 3 1 1 let's say)
  2. Use region to define the "middle box". Create a group for the polymers in the middle box, create a group with all the other polymers using subtract, and then use delete_atoms to remove the two copies of polymers (leaving two copies of pure water boxes).
  3. Run a short NVT run, using fix deform to shrink the box from 3x back to its original size.

This definitely isn't the fastest way to do things. Packmol would quickly insert new water molecules where you want to, or you could even use raw text editing to manually add in new water molecules to the data file. But this method has the advantage of being completely reproducible in LAMMPS, not requiring you to learn any new software, and will give you more LAMMPS experience which should come in handy in future.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .