fixing pressure by changing two dimensions

Hello all,
I want to fix the pressure of my system in 1 bar but one dimension (Z) of my simulation box doesn’t change. As we all know I used :

fix npt all npt temp 140 140 0.01 x 1 1 0.1 y 1 1 0.1 fixedpoint 0 0 0

When I used this, the pressure is not fixed at 1 (bar) like when I used “iso 1 1 0.1”. It is fixed on another number. The equilibrium pressure ( which is showed in log file) changes whether I use ‘x 1 1 0.1’ (changing two dimensions) or I use ‘x 1 1 0.1 y 1 1 0.1’ (changing one dimension.)

anybody have any idea why this happens?

I appreciate in advance,
Rostam

Hello all,
I want to fix the pressure of my system in 1 bar but one dimension (Z) of
my simulation box doesn't change. As we all know I used :

fix npt all npt temp 140 140 0.01 x 1 1 0.1 y 1 1 0.1
fixedpoint 0 0 0

Why you havent included the z-direction here if u want to control the
pressure at 1.0 bar??

When I used this, the pressure is not fixed at 1 (bar) like when I used
"iso 1 1 0.1"

yes, it will . 'Iso' means all three dimensions are "coupled" i.e. x, y and
z are used to compute the global stress tensor and are thus
contracted/expanded alltogether in one timestep.

. It is fixed on another number. The equilibrium pressure ( which is showed

in log file) changes whether I use 'x 1 1 0.1' (changing two dimensions) or
I use 'x 1 1 0.1 y 1 1 0.1' (changing one dimension.)

Manual clearly describes what is the difference when u use only x,x&y,x&y&z
etc. In other words, if you are not allowing any of the direction to
change, how can you expect your "global" pressure to match the desired
value of yours.

anybody have any idea why this happens?

I appreciate in advance,
Rostam

Sagar

As you know when I use NPT ensemble the box size changes in order to reach the desired pressure. I want to reach the desired pressure value, but I don’t want to change the z direction of my simulation box. Is it possible or do you think it’s absurd?

Thanks,

Cant comment until you tell what exactly are you trying to do,( why u want your z-direction to be fixed) what timestep u have used, how long did you run your simulation which resulted in undesired o/p pressure…

Sagar

Hello all,
I want to fix the pressure of my system in 1 bar but one dimension (Z) of my
simulation box doesn't change. As we all know I used :

we *don't* know it. we know only because you tell us.

fix npt all npt temp 140 140 0.01 x 1 1 0.1 y 1 1 0.1
fixedpoint 0 0 0
When I used this, the pressure is not fixed at 1 (bar) like when I used "iso
1 1 0.1". It is fixed on another number. The equilibrium pressure ( which is
showed in log file) changes whether I use 'x 1 1 0.1' (changing two
dimensions) or I use 'x 1 1 0.1 y 1 1 0.1' (changing one dimension.)
anybody have any idea why this happens?

you may set this command any which way you like, but whether the
pressure in z-direction relaxes and what value it relaxes to, does not
only depend on your settings for fix npt, but also on the physics of
the system that you simulate. since we know nothing about this at all,
there is no way to give an explanation.

axel.

> Hello all,
> I want to fix the pressure of my system in 1 bar but one dimension (Z)
of my
> simulation box doesn't change. As we all know I used :

we *don't* know it. we know only because you tell us.

...:smiley: :smiley:

thanks alot Axel,
But can you tell me if there is anyway to fix my desired pressure of my system by changing two dimensions?
You mean if I write ‘x 1 1 0.1’, it doesn’t fix the pressure of my system on 1 bar and it fixes the tensor stresses in x direction to 1 bar? would you please explain this command to me.
Thanks,

thanks alot Axel,
But can you tell me if there is anyway to fix my desired pressure of my
system by changing two dimensions?

i just explained why this is impossible to say in this generality. i
have nothing to add to my statement.

You mean if I write 'x 1 1 0.1', it doesn't fix the pressure of my system on
1 bar and it fixes the tensor stresses in x direction to 1 bar? would you
please explain this command to me.

fix npt and all its options are explained in the LAMMPS manual. in
addition it gives references to the underlying theory that explain the
algorithms fix npt is based on. i am sorry, but there are no "cliff's
notes" for these things. if you want to understand, you have to go all
the way.

in general, people here worry about LAMMPS producing correct physics
and not giving people the numbers that they want to see.

axel.