Energy minimization problem when trying to merge two data file with periodic boundary condition

Hi LAMMPS community,
I am using the last version of LAMMPS.

I would like to model a 3d periodic simulation box containing a gold surface and a waterbox on top, that I have already set. I was suggested to make the two simulation boxes of the same size before merging (read data add append) them, indeed I had a warning Bond/angle/dihedral extent > half of periodic box length values of energy in the order of 10^11 and problems with the image flag in the z direction too.
systemimage.xyz (51.5 KB)

I don’t understand how to do so.
An energy minimization on the lattice and on the solvent with the box sized on the final value with change_box gives poor result, with energy in the order of 10^8. In the end, i obtain the same result.

What is the correct way to resize the box?

The size of the box for the lattice is 20.188x19.980x14.127 A^3. The size of the waterbox is 20.188x19.980x35.175 A^3. Due to lj/charmmfsw/coul/long and kspace_style pppm i cannot switch to fixed boundary condition in the waterbox.

step4.0_minimization.data (267.2 KB)
solvminimize.data (209.9 KB)
latticemin.data (61.7 KB)

Thank you for you attention.

This is a useless statement, since what is the “last” version depends on when you downloaded/built your LAMMPS version and whether you opted for the “stable” or the incremental patch “release” version of LAMMPS. Please see: 1.2. What does a LAMMPS version mean — LAMMPS documentation

Please note that these are three separate issues.

The box information are just numbers in your data file and those can be edited with a text editor for as long as your system has no bonds across periodic images and no image flags set. Of course you have multiple options for changes, so you pick the on that is the least disruptive.

So you need to debug which bonds or angles or dihedrals are actually causing this. Most likely those were caused by the method you created them. There is not a single “do this, not that” kind of rule to address them. You need to apply the scientific method here.

Again, you need to figure out where this is coming from:

  • bad choice of potential parameters
  • bad choice of box length for a periodically continuous system
  • bad geometry with atoms in close contacts

Difficult to say what to do in this case. It very much depends on the individual system.

Since the data is already bad when you read it, you cannot easily “fix” it by running some calculation.
You need to do one more step back and review and possibly improve the process leading to your data file. Especially, when you have incorrect bond/angle/dihedral assignments, this cannot be fixed by anything but entering or generating them correctly.