Hyper_dynamics and box_change

Hi, Lammps users/developers:

I am trying to use fix/hyper/global(lammps-3Mar20), and want to use boundary p p m.

In hyper.cpp, there is one restriction:
  if (domain->box_change) error->all (FLERR,"Cannot use hyper with a changing box");

because I’m using boundary m, so box_change=1.
The hyper.cpp also said “removing this restriction would require saving/restoring box params”.

I want to ask:

Why it needs saving/restoring box parameters?
Where are the saved box parameters to be used?

I checked the code related with hyper/global, found only one function related with box parameters.
double ComputeEventDisplace::compute_scalar(){
……
        dx = x[i][0] + xbox*xprd - xevent[i][0];
        dy = x[i][1] + ybox*yprd - xevent[i][1];
        dz = x[i][2] + zbox*zprd - xevent[i][2];
……}

But when the boundary of z direction is m, zbox always equal to 0. So the change of zprd doesn’t matter.
I am not sure whether it related with other fixes. In my lammps script, I also use fix nve, langevin and rigid.

Thank you for your time.

Best,
Huyan

Why it needs saving/restoring box parameters?

This is because hyperdynamics (HD) switches back
and forth between dynamics and quenches (energy min)
so that if the box is changing while those happen
it needs to be restored to its previous state.

This restriction was more aimed at something like NPT
where the fluctuations in box size would have to
be accounted for. It’s probably fine with the “m”
boundary case you discuss. The issue would be
if the energy minimization shrink-wrapped the box
smaller, and then you restored the previous state
and an atom(s) were now outside the smaller box.

Steve