PPPM Trilclinic Question

Hi there,
I have a question about the PPPM and triclinic usage. From the documentation it says,

Note that style pppm only computes the grid size at the beginning of a simulation, so if the length or triclinic tilt of the simulation cell increases dramatically during the course of the simulation, the accuracy of the simulation may degrade.

In the code for pppm.cpp, setup()/setup_triclinic() gets called whenever the volume gets changed. For doing something like a shear, would the grid not update over the course of a single nvt run command? Similarly, the setup() would only be called if the box size changes due to something like an npt integrator, correct?

Note that this issue is not unique to triclinic. The PPPM grid adapts/stretches as the volume changes by calling PPPM setup(). However, the total number of grid points, which defines the accuracy of PPPM for a given volume, is only set in the init() method. So if you stretch or tilt the box, the accuracy goes down since you are not adding more grid points to compensate for the additional volume/tilt of the box.

1 Like

Got it. Thanks Stan