Dear LAMMPS users,
First of all, my LAMMPS version is 3-Mar20
I would like to simulate a system of water confined between
two walls. My intention is to allow the walls to move in the “z” direction
whereas “x, y” dimensions remain during the simulations (Np_zAT ensemble).
The idea which I thought should work was as follows:
- define the groups
group water type 1 2
group wall1 type 3
group wall2 type 4
-
integrate all of the atoms and thermostat only the water molecules
fix verlet all nve
fix trescale water temp/csvr 262 262 1000 123321 -
Set the force of wall molecules to 0.0 in x and y direction
whereas not change in the z direction.
fix rigiddown wall1 setforce 0.0 0.0 NULL
fix rigidup wall2 setforce 0.0 0.0 NULL
- Apply the additional force to maintain the desired pressure.
fix pressdown wall1 aveforce NULL NULL -0.034727274
fix pressup wall2 aveforce NULL NULL 0.034727274
For the system which has the area of 1131 A^2
I assumed the pressure of 200 atm should be approx.
-0.034727274 J/(A-mol) for walls built of 96 molecules each.
However, the issue is that depending on the initial configurations
I obtain completely different values for the ZZ component of the pressure
tensor in this system, which are approx. 0 +/- 50 atm.
Does anyone have any suggestion on how to maintain
the desired pressure with this kind of “piston barostat”?
Or am I missing something?
Alternatively, is there another suitable way to do these kinds of simulations?
Best wishes,
