NPH ensemble at various external pressure

Dear LAMMPS users ,

I have a question about fix nph command :
I use this ensemble for TIP4P water molecule for getting instantaneous enthalpy
HNPH = etotal (t) + P * V (t)

this is a part of my input file :

timestep {dt} fix nph all nph iso {pset} {pset} 1000 variable HNPH equal etotal+{pset}*vol/atoms
fix 2 all ave/time 100 10 1000 c_thermo_temp c_thermo_press v_HNPH file ave.out

run 100000

when I map out average temperature with respect to HNHP It shows just fluctuation of HNHP around a special amount .
This figure has to show stable branch ( positive slop ) for liquid and gas and also unstable branch with negative slop .

Hope someone could give me an advice.

Best,
saeed.

Is the pressure equilibrating to the target value you’ve set?
That’s all NPH is trying to do. Note that you are using fix mph
not fix npt, so you need to be careful with the kinetic energy
part of the pressure when comparing target to actual.

Steve

In principle, fix nph should conserve enthalpy about as well as fix
nve conserves energy. You should start by verifying your script using
something simple, like pair lj/cut, before you try to handle water.
Also, check that you water model is being handled correctly by
running fix nve and look at energy conservation. After you have done
that, you should be able to get enthalpy conservation.