LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] fix NPT and fix move

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

 From: liyi bai Date: Thu, 12 Apr 2018 22:02:41 +0900

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

2018-04-12 18:02 GMT+09:00 Axel Kohlmeyer :

On Thu, Apr 12, 2018 at 4:54 AM, liyi bai wrote:
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.

Thank you very much.

2018-04-12 17:38 GMT+09:00 Axel Kohlmeyer :
On Thu, Apr 12, 2018 at 2:06 AM, liyi bai <liyibai2011@...12...24...> wrote:
> 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.

>
> 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)
>
>
> #---------------------------------------------------------------
> # stage 4 :NPT ensemble
> #---------------------------------------------------------------
>
> 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
>
> fix      8   plate1  move linear 0.0 0.0 0.0 units box
> fix      9   plate2   move linear 0.0 0.0 0.0 units box
>
> thermo_style     custom  v_time v_fx v_fy v_fz press vol temp evdwl ecoul
> etail elong pe ke lx ly lz xlo xhi ylo yhi zlo zhi xy xz yz
> thermo            5
>
> 2018-04-12 12:49 GMT+09:00 Axel Kohlmeyer <akohlmey@...24...>:
>>
>> On Wed, Apr 11, 2018 at 10:49 PM, liyi bai <liyibai2011@...24...> wrote:
>> > 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.
>>
>> >
>> > 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
>> >
>> >
>> >
>> >
>> >
>> > 2018-04-11 22:43 GMT+09:00 Axel Kohlmeyer <akohlmey@...24...>:
>> >>
>> >> On Wed, Apr 11, 2018 at 9:35 AM, liyi bai <liyibai2011@...24...>
>> >> wrote:
>> >> > 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.
>> >>
>> >> 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.
>> >>
>> >> >
>> >> >
>> >> > 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
>> >> >
>> >> >
>> >> >
>> >> > ------------------------------------------------------------------------------
>> >> > Check out the vibrant tech community on one of the world's most
>> >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> >> > _______________________________________________
>> >> > lammps-users mailing list
>> >> > lammps-users@...655....net
>> >> > https://lists.sourceforge.net/lists/listinfo/lammps-users
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
>> >> College of Science & Technology, Temple University, Philadelphia PA,
>> >> USA
>> >> International Centre for Theoretical Physics, Trieste. Italy.
>> >
>> >
>>
>>
>>
>> --
>> Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
>> College of Science & Technology, Temple University, Philadelphia PA, USA
>> International Centre for Theoretical Physics, Trieste. Italy.
>
>

--
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.

--
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.