[lammps-users] Parallel tempering simulation under constant pressure

Dear lammps users,

I have a question about parallel tempering (REMD) simulations in lammps.
As far as I understand, through it's "temper" command lammps supports
constant volume replica exchange only. This seems to be the case after
looking at "temper.cpp", where the acceptance criteria is coded as
(pe1-pe2)(1/T1 - 1/T2). I would like to change this to the acceptance
criteria for constant pressure. In order to do this I would need to access the following variables in the C++ code:

P1, P2, V1, V2, T1', T2', N,

where P1 and P2 are the pressures, V1 and V2 are the volumes, T1' and
T2' are instantaneous temperatures in the two replicas and N is the
number of particles.

If this is not too long, can you please describe how to access these
quantities in the C++ code. Otherwise, can you please point me to the
relevant documentation.

Thank you,

Nickolay V. Shestopalov

Pressure is calculated by a compute - you will need to
set up a variable like press_compute in temper.cpp, similar to pe_compute.

Steve

Steve,

Ok, I can obtain the pressure similar to the potential energy by:

id = modify->find_compute("thermo_press");
Compute *press_compute = modify->compute[id];

But with the volume this doesn't work.

What would be the easiest way to obtain the volume in temper.cpp?

Thanks,
Nickolay

Pressure is calculated by a compute - you will need to
set up a variable like press_compute in temper.cpp, similar to

pe_compute.

domain->xprd (same for y,z) are the box lengths,
so you can use those for 2d or 3d volume

Steve