fix NPT and fix move

Dear all.

I want to run MD simulation with NP(z)T ensemble for system of two plates immersed in water.

I am wondering that the correct way combine fix npt and fix move command.

I wrote input below,I am not sure if it is correct. Can any one give me some suggestion?

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 all # control system only on z direcation

fix 8 plates1 move linear 0.0 0.0 0.0 units box #fix plates 1
fix 9 plates2 move linear 0.0 0.0 0.0 units box #fix plates 2

Thank you very much

best wishes

liyi

Dear all.

I want to run MD simulation with NP(z)T ensemble for system of two plates
immersed in water.

I am wondering that the correct way combine fix npt and fix move command.

there is no point in using fix move, when you don't move the atoms.
you can just leave those fixes away.

I wrote input below,I am not sure if it is correct. Can any one give me some
suggestion?

if you are not sure that something is working as expected, you should
construct test cases and monitor those carefully to see, if things
happen to your expectations. with carefully crafted tests, you can
check each feature you worry about individually.

asking the mailing list to help you with this is very risky. what if
the person responding makes a mistake? or overlooks something
important? or you are leaving out important information that would
have resulted in a different recommendations?
it is always your reputation and credibility that is on the line, if
you use your results in publications, so you need to verify for
yourself that you are simulating what you think and want to do.

axel.

Dear Axel,

Thank you very much for your suggestion and kindly remind.

I also tried to leave “fix move” away.But the plates will be change the position which I should avoid the situation .
Actually, I want to control the distance between two plates as a constant.So the position most not be moved.That’s why I want to use fix move to fix the two plates.In detail, lateral size of one larger plate as same as box size,other plate is much smaller the boxsize.

I want to keep the lateral size of the box always as a constant I set up initially.For that, I adjust the system pbc only on Z direction during npt simulation by using below command line.However,the water will go through the plate and goes to other pbc box during NPT.Could you please point out some problems about the issue?

fix 7 water npt temp $T $T 100.0 z 1.0 1.0 100.0 dilate all

Thank you very much

best wishes

Liyi

Dear Axel,

Thank you very much for your suggestion and kindly remind.

I also tried to leave "fix move" away.But the plates will be change the
position which I should avoid the situation .

then you should not use "dilate all" with fix npt.

Actually, I want to control the distance between two plates as a constant.So
the position most not be moved.That's why I want to use fix move to fix the
two plates.In detail, lateral size of one larger plate as same as box
size,other plate is much smaller the boxsize.

I want to keep the lateral size of the box always as a constant I set up
initially.For that, I adjust the system pbc only on Z direction during npt
simulation by using below command line.However,the water will go through the
plate and goes to other pbc box during NPT.Could you please point out some
problems about the issue?

i don't understand what you are doing here. on one hand you say, you
don't what the plates to move, but on the other hand, you want to
control the pressure in the same direction. that contradicts each
other and thus makes no sense.

axel.

Dear Axel,

On the one hand, I don’t want the two plates move.Then I use fix move command.
As I use NPT,the box length will be changed along x y z direction.The point is I ONLY the box length change on z direction NOT x or y.So that I want to control pressure on z direction.

I replace"dilate all" as “dilate water”.The water will still go through the plate and finally move to other pbc box.I am confused what happened here.

Thank you very much for your attention.

partial input :

group plate1 type 4
group water type 1 2
group plate2 type 3

variable fx equal fcm(plate2,x)
variable fy equal fcm(plate2 ,y)
variable fz equal fcm(plate2 ,z)

Dear Axel,

On the one hand, I don't want the two plates move.Then I use fix move
command.
As I use NPT,the box length will be changed along x y z direction.The point
is I ONLY the box length change on z direction NOT x or y.So that I want to
control pressure on z direction.

I replace"dilate all" as "dilate water".The water will still go through the
plate and finally move to other pbc box.I am confused what happened here.

there is not much of a confusion, in my opinion. LAMMPS is behaving
the way it is programmed.
the problem is, like i already mentioned, that you are asking for
something that is contradicting itself, is physically impossible, and
thus makes no sense.

axel.

Dear Axel,

You it physically impossible,but I see one paper already fulfill this purpose using LAMMPS.

The walls can be considered as plates.They were kept fixed.

paper link: http://www.pnas.org/content/109/12/4365

Thank you very much.

image.png

Dear Axel,

You it physically impossible,but I see one paper already fulfill this
purpose using LAMMPS.

The walls can be considered as plates.They were kept fixed.

​you have to ask the authors of that paper, how they achieved this, and
specifically how they handled system dilations with fix npt.
please keep in mind, that not all papers are always 100% accurately
describing what was done.

axel.

image.png

Dear Axel,

Thank you very much for you response. 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.

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.

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).

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

image.png

image.png

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,
       axel.​

Dear Axel.

I am grateful for your response and explanation.Now I got your point.

Thank you~