Does pppm/disp support triclinic simulation boxes?

Hello LAMMPS developers,

Thank you for developing and maintaining LAMMPS.

I am using LAMMPS 22 Jul 2025 - Update 3, and I would like to ask about the current triclinic-box support for pppm/disp.

For an orthogonal simulation box, the following setup works well:

kspace_style    pppm/disp 1.0e-6
kspace_modify   disp/auto yes

However, when I switch to a triclinic simulation box, I get the following error:

PPPMDisp initialization ...
ERROR: KSpace style does not yet support triclinic geometries (../kspace.cpp:182)

From the documentation, I understand that Coulomb PPPM supports triclinic simulation boxes, and ewald/london also appears to work with triclinic boxes. However, pppm/disp seems to be restricted to orthogonal boxes.

My questions are:

  1. Is this still the expected/current limitation of pppm/disp?

  2. Are there any plans to support triclinic boxes for pppm/disp in the future?

For my application, I am studying molecular-crystal phase transitions using a machine-learning potential combined with analytical long-range dispersion. A triclinic NPT simulation would be physically useful, but ewald/london is too slow for large production MD. Therefore, triclinic support for pppm/disp would be extremely valuable.

Thank you very much for your time.

yes.

there is currently no open feature request issue for that on GitHub and all
core developers are currently very busy to process a very large amount of
pending pull requests. So nobody is really looking for something to work on.

I can try to let an AI coding agent give it a try, but I cannot make any promises
that this will work. Our experiences are mixed. The coding agent has to find
enough reference material in the other kspace styles to come up with a viable
solution. It did work recently to enable the slab correction for PPPM with triclinic boxes.

Thank you very much for the clarification and for taking the time to answer.

I really appreciate that you are even willing to let an AI coding agent try this. Triclinic support for pppm/disp would be extremely useful for molecular-crystal simulations, so I would be very happy if it eventually becomes available.

Thank you again!

Please check out the pull request branch that was submitted earlier today and let us know how it pans out: Add triclinic-box support to pppm/disp (and its omp/tip4p variants) by akohlmey · Pull Request #5060 · lammps/lammps · GitHub

Thank you very much for implementing this so quickly.

I tested the pull request (#5060) on my system, where I had previously encountered

ERROR: KSpace style does not yet support triclinic geometries

The new implementation worked successfully, and I was able to run triclinic NPT simulations using pppm/disp without any issues. The results also appear physically reasonable.

I’ll continue testing it, and if I encounter any issues, I’ll report them here. So far, everything looks good.

Thank you again for adding this feature. It will be very useful for molecular-crystal simulations.