LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] fix NPT and fix move
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] fix NPT and fix move

From: Axel Kohlmeyer <akohlmey@...24...>
Date: Thu, 12 Apr 2018 09:32:59 -0400

On Thu, Apr 12, 2018 at 9:02 AM, liyi bai <liyibai2011@...29....> wrote:
Dear Axel,

Thank you very much for you response.

​i am getting tired of having to explain the same things over and over again, and you not getting the point.

if you want to have the system adjust to reach a target pressure and also have immobile plates, you *must* allow the distance between the plates to vary as you vary the box dimensions. if you apply dilation only to the water atoms, they will be pushed towards or even "through" the plates, if you don't allow any atoms to dilate but only the box length to change, it will not have much of an effect, since your water confinement doesn't change. if you want to keep a fixed distance between the plates, and the system to adjust to pressure, you have to either allow dilation in x and y direction. if you want to keep the plates fixed and no variation of the box in x and y, you cannot adjust the system to the pressure except for changing your original geometry/density and then run with fix nvt. technically, you might try a grand canonical ensemble, but since you are struggling with the physics as it is, i don't recommend it, since that will be significantly more challenging to get right. 

as indicated above, i have no more interest to follow up on this, so this is my last response on this subject.​ you'll need to find somebody else to discuss.
My current study system not totally the same with the system of that paper.Also, the author did not reply me yet.However,I also need consider the plates as rigid body.

it makes even less sense to ​apply fix rigid to those plates, specifically not with a thermostat applied, when at the same time you want those plates to remain in place. it is also incorrect to apply multiple time integrators (fix move counts as one). again, simply do not time integrate those particles and they'll behave properly. if that doesn't work for you, there must be other mistakes.

Briefly say,I just want to adjust commands to solve the problem show below snapshots.

First one is taht snapshot (add pbc along x and y )with NVT,the pbc along x y have not broken(top figure).The second is snapshot under NPT .However, the pbc along x y direction have been broken(middle figure),since the box length were changed under NPT.

​no, your interpretation must be wrong. this must be due to bad initial box dimensions or incorrect geometries. you are coupling fix npt only to the z direction, so x and y are not changed.​ this one can easily see by looking at dump files and/or outputting box lengths.

I wonder that there is any method can control system with NPT which result in non-broken x y direction boundary (means no change on x y box length).

​it is not a problem of fix npt. it is a problem of your input.  ...and a apparently a case of PEBCAC as well.​

​good luck,


note: When I use below command,the box length only extended on z direction.But the space have been extended too large(here I add pbc on z for visualize)(shown in bottom figure).

partial input:

fix      6   water   shake 0.0001 20 0 b 1 a 1
fix      7   water   npt temp $T $T 100.0  z 1.0 1.0 100.0  dilate water    # control system only on z direcation

fix      8   plate1        rigid/nvt  single temp $T $T 100.0 force 1 off off off torque 1 off off off
fix      9   plate2          rigid/nvt  single temp $T $T 100.0 force 1 off off off torque 1 off off off

fix      10   plates1       move linear 0.0 0.0 0.0 units box   #fix plates 1
fix      11   plates2       move linear 0.0 0.0 0.0 units box   #fix plates 2