Bug - Atoms outside the box

Hello everyone,

In my simulation, I found that I had many atoms outside the box dimensions, However, I was able to perform an NVT run?

Is it a bug?
and I need to install another version.

The version I use now is the stable version of LAMMPS 64-bit 28Mar2023.

Thank you

If You mean that the edges of the atoms were outside the box dimensions than it’s normal. In LAMMPS Your atoms are radiusless and You describe the system of atoms only by their center coordinates. So when You vizualize the system and see that the edges of atoms are outside the box, what matters is whether the coordinates are inside the box dimensions. If they are, then everything is ok.

Thanks davies for your reply.

The coordinates are completely out of the box.

Box dimension:

0.0 0.0 40.0
0.0 0.0 40.0
0.0 0.0 40.0

whereas the z position of many of the atoms is in the range of 70-80.

How do you determine this?

Please provide your input.

Atoms may move a little bit outside the box between reneighboring, but that is usually limited to the neighbor list skin distance.

Not if you are using boundary p p p

The initial position of atoms are all in the range of 40-80, I know this by analysing the data file in excel and applying the min & max functions on the z coordinates of all the atoms.
Here are my files:

data1.data (168.6 KB)
PureCO2-VLE.in (5.0 KB)

I am using period boundary conditions for all directions.

I think that is because I am using a very new version of LAMMPS (Mar-2023), and maybe there is a bug. However, it was the stable release.

That explains why atoms outside the box boundaries are not lost.

This is true when atoms are still in the neighbor region, not very far beyond the skin as in my case.

None of these files were created by LAMMPS, so how can there be a bug in LAMMPS?

Since you do have periodic boundary conditions, the atom positions outside the box are “wrapped back” into the principal box and their image flags increased accordingly. This is documented behavior. Please see the documentation of the read_data command.

Only if you have fixed boundaries, those atoms outside the box would be dropped. But then you would get an error, since your header states more atoms than what would be created.

1 Like

No. @hothello is correct and you are wrong. See my other reply.

There is no bug.

Also, this is a very fundamental functionality and we are running automatic regression testing on all changes added to LAMMPS. It would simply not be possible that such kind of bug would be introduced without failing one of the (hundreds of) tests. And even if that would happen, the many thousands of LAMMPS users would notice.

1 Like

Thank you very much

Actually, my previous research was studying the growth of a crystal. I had a cubic simulation box which contained a crystal slab between two smaller solution boxes. So, I mainly have worked with this kind of models. In this case, when I change the Z dimension of the model, the simulation stops at the begining of the minimization process without any error.

To conclude, it seems that it depends on the geometry and physics of the study and for a homogeneous system it is ok to change the dimensions and see lammps running without any issue.

Please let me know your opinion about it?

Regards,

What you write makes no sense.
It seems like you have done a whole lot of bogus simulations.

Please if you do not like to continue the discusion, do not jude immediately!
If I have done wrong simulations how could I be able to publish my work in a Q1 journal. I followed the procedure that many other researcher had done before for different systems.

You have asked for an opinion and I gave you an opinion. Opinions are not facts!
You have not provided enough information and details to make a proper assessment, thus my opinion has to be based on the limited information available.

Lots of things get published these days. So either your descriptions and reasoning posted here are not in line with what you have done and published, or you have indeed run (some?) bogus simulations based on incorrect assumptions about how LAMMPS works. I am not able to tell because of the lack of information.

1 Like

It doesn’t make sense for a simulation to not proceed unless there was an error. But also, this kind of thing (adjusting periodic box boundaries) has been discussed very frequently on this forum, for example: Simulating bulk fluid between two walls - #2 by akohlmey

Briefly, whenever a configuration is compatible with a set of periodic boundary conditions, the simulation will proceed identically no matter which initial periodic image any of the particles are initially in (up to numerical drift). Whenever a configuration is not compatible with a set of periodic boundary conditions it will either exhibit dramatic non-equilibrium shocks (if it is atomic) or fail completely (if it is molecular and there are bonds across incompatible boundaries).

Please consult a standard molecular dynamics textbook (such as Allen and Tildesley) in which this will be explained in far more detail and clarity than any poor forum volunteer can do.

2 Likes