I have been using LAMMPS python module to run the minimisation calculations for some simple systems.I have recently updated my LAMMPS installation to the latest version (2 Aug 2023), and I am encountering a warning message during the execution of my minimization calculations. The warning message is as follows:
LAMMPS (2 Aug 2023)
Reading data file …
triclinic box = (0 0 0) to (2 1.7320508 20) with tilt (-1 0 0)
WARNING: Triclinic box skew is large. LAMMPS will run inefficiently. (src/src/domain.cpp:220)
I have attached a sample structure file (example.mol) and Jupyter Notebook (example.ipynb) to demonstrate the issue. Even for this simple structure, I continue to receive the warning related to the triclinic box skew.
Since the warning message also mentions that “LAMMPS will run inefficiently,” I am concerned about the impact on the efficiency of my simulations. Could you please provide guidance on how to address this warning ? example_files.zip (56.7 KB)
You simulation box is tiny, so simulations will be extremely fast since there are very few atoms. For most meaningful classical MD simulations, your box is likely too small because it will be subject to significant finite size effects. Keep in mind that the size of the box limits what frequency of fluctuations you can have, for example. The smaller the box, the more lower frequency fluctuations become impossible.
Since your box has a tilt angle of 45 degrees, it should be particularly simple to convert it to an orthogonal box by simply replicating the box once and then remapping the atoms, i.e. build a supercell. Given by explanation from above, you likely want to create a much larger supercell anyway to have statistically meaningful results anyway.
Dear Axel,
Thank you for your response. The system I shared here is the simplest example. In my typical work, I handle much larger unit cells containing more than 12,000 atoms, and these systems are also enclosed within simulation boxes with a tilt angle of 45 degrees.
Converting such large unit cells to an orthogonal box by replicating the box and remapping numerous atoms would be a challenging task. Moreover, the older version of LAMMPS (3 Nov 2022) that I previously used did not issue this warning for the triclinic simulation boxes that I have been working with. Please let me know if there are any alternative solutions to address this problem.
I disagree with this statement. It is very straightforward to do with a small custom program. Possibly it can also be done with LAMMPS itself.
It didn’t contain the warning, but that doesn’t mean the problem was not there. However, before your even look into improving your input, you should actually confirm that there is a performance problem. The warning says, there can be a performance issue, not that there always is a problem.
What I proposed is the solution and - as I pointed out - it is far easier to resolve than you claim it is.
As a standard vector calculus result, a system remains unchanged under cyclic mapping of coordinates. Since your z-axis appears to be the longest axis of the system you can map z->x, x->y, and y->z and this problem goes away.
Modifying your input and the “box” portion of your data file should be straightforward. The hardest part is remapping the “Atoms” co-ordinate section, but the Linux tool awk will do that for you seamlessly (and is a very powerful command line “table” tool so you should learn it anyway).