[lammps-users] npt temper

According to the LAMMPS documentation, the temper command accepts fixes of style nvt, npt, and temp/rescale. However, in attempting to use an npt fix with the temper command I get, “ERROR: Tempering fix is not valid”

examining the LAMMPS source, i see

// fix style must be appropriate for temperature control

if (strcmp(modify->fix[whichfix]->style,“nvt”) == 0) fixstyle = NVT;
else if (strcmp(modify->fix[whichfix]->style,“langevin”) == 0)
fixstyle = LANGEVIN;
else error->universe_all(“Tempering fix is not valid”);

which means that npt isn’t actually supported? Is this an error in documentation, versioning, or none of the above? The implementation of this is not difficult, but i’d like to hear back before i put some work into it.


The doc page for temper is out-of-date. It supports thermostatting
fixes, but not npt.
I can't recall why this is. I'm not certain its a good idea to be varying the
box volumes of the individual ensembles independently during tempering.
I'll change the doc page.