[lammps-users] fix bond/swap in a non-cubic box

Dear LAMMPS users and Developers,

I recently encountered a problem when using fix bond/swap. I searched the mailing list archives, and I could not find a solution. I have been using bond/swap to equilibrate long-chain polymer melts in a cubic box without any problem. For some reason, I would like to run simulations of long-chain polymer melts in a non-cubic box, where there is an angle potential with the cosine form, in addition to the FENE bond and LJ pair potentials. In this case, the program reported an error soon after it was started, such as:

ERROR on proc 10: Angle atoms 7695509 7695510 7695511 missing on proc 10 at step 103215 (…/ntopo_angle_all.cpp:68)

The error seems to be related to the angle potential when running on multiple processors. The error disappeared after the cosine angle potential was turned off. However, I would like to keep the angle potential.

For your information, I used the LAMMPS version released on 12 Dec 2018, and I attach the following lines from the output:

orthogonal box = (-167.577 -167.577 -41.8942) to (167.577 167.577 41.8942)
8 by 12 by 4 MPI processor grid

Since the box dimension in the z direction is shorter, I tried to set the processor grid using the command “processors * * 1”. But it didn’t help.

Any help would be greatly appreciated. Thank you.

Regards,

Wensheng

Dear LAMMPS users and Developers,

I recently encountered a problem when using fix bond/swap. I searched the mailing list archives, and I could not find a solution. I have been using bond/swap to equilibrate long-chain polymer melts in a cubic box without any problem. For some reason, I would like to run simulations of long-chain polymer melts in a non-cubic box, where there is an angle potential with the cosine form, in addition to the FENE bond and LJ pair potentials. In this case, the program reported an error soon after it was started, such as:

ERROR on proc 10: Angle atoms 7695509 7695510 7695511 missing on proc 10 at step 103215 (…/ntopo_angle_all.cpp:68)

The error seems to be related to the angle potential when running on multiple processors. The error disappeared after the cosine angle potential was turned off. However, I would like to keep the angle potential.

this kind of error happens not necessarily due to the angle potential, but through other conditions. the error in the angle potential is merely the symptom.
what you should look at is what is the typical and maximal distance between the two outer atoms of this angle (and others) and compare that to your cutoff distance.
if you have a rather short cutoff, it may be that the distance can become larger than the cutoff plus neighborlist skin and then there can be problems like the error you see when running in parallel. another possible issue can be in the non-bonded interactions where the potential parameters may allow atoms to get too close and then you can get very large forces which will then “shoot” atoms across the simulation cell. however, in those cases the “lost atoms” error is more common. another issue could be too large a timestep, which can also lead to this kind of behavior. i doubt that the shape of the box matters, since your atom indices indicate that you are simulating a very large system. one side effect with large systems is, that unlikely conformations can become more likely since the larger system can accommodate larger (local) fluctuations which can then expose weaknesses in the potential parameter choices more easily. a final thing to look into is to see what impact the use of fix bond/swap has. is it required to trigger the error? or would it happen without?
can you reproduce the error with a smaller system? and will it go away if you increase either the neighborlist skin or communication cutoff? how frequent do you build the neighbor list? the default settings may be too aggressive for your system.

so there are a lot of different details worth looking into. the box shape is about the most unlikely explanation for a cause. please note that correlation does not automatically mean causation.

axel.