Running prd in a loop

Using “prd” command inside a loop showed an unexpected effect (script file: a.lmp).

If a box size is not changing during simulation (via fixes “box\relax” or “nph”) prd works just fine (see a.log.0 & a.log.1).But, if “box\relax” or “nph” is enabled replicas works fine only during the first loop iteration. At the second iteration (and forth) replicas start from different initial configurations (look at potential energy in the logs) and don’t share configurations after events properly (see b.log.0 & b.log.1).

It seems that (if the box size changes), after the first iteration, different partitions continue on their own. They don’t synchronize (ex. box sizes) anymore.
Is there a way I can fix it?

Thank you,

a.log.0 (66.9 KB)

a.log.1 (66.9 KB)

b.log.0 (80.6 KB)

b.log.1 (80.6 KB)

a.lmp (1.78 KB)

Aidan can comment on this. I don’t know that PRD has logic to store
the box info as part of the “state” it is storing and sharing when an
event is found. I think TAD does this, but maybe not PRD.

It if isn’t (yet) supported, then there should be an error check
at the beginning for a simulation that allows the box size to change.



Yes, the PRD method usually assumes fixed periodic cell dimensions and
that is what the current LAMMPS implementation does. Conceptually,
there is no problem with adding cell dimensions as additional degrees
of freedom, both in dynamics and quenching phases. I'm not sure how
useful that would be. Can you make an argument for why one would need
to include cell dimensions in the dynamics or quenching phases?

In the meantime, I will put in an error check.


I checked in the error-check. Note that the documentation for PRD
states "the simulation domain, the number of atoms, the interaction
potentials, etc should be the same for every replica."