# How to keep box size in z direction constant while pressure coupling x and y?

**URL:** <https://gromacs.bioexcel.eu/t/how-to-keep-box-size-in-z-direction-constant-while-pressure-coupling-x-and-y/2493>\
**Category:** User discussions\
**Created:** [July 11, 2021, 10:03pm UTC](https://gromacs.bioexcel.eu/t/how-to-keep-box-size-in-z-direction-constant-while-pressure-coupling-x-and-y/2493 "2021-07-11T22:03:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arthurmluz](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@arthurmluz](https://gromacs.bioexcel.eu/u/arthurmluz)\
**Post date:** [July 11, 2021, 10:03pm UTC](https://gromacs.bioexcel.eu/t/how-to-keep-box-size-in-z-direction-constant-while-pressure-coupling-x-and-y/2493/1 "2021-07-11T22:03:28Z")

</div>

GROMACS version: 2020.3  
GROMACS modification: Yes

Hello, everyone!  
I’m trying to simulate an interfacial system and I need to keep my z direction box size constant while I use pressure coupling for the other two dimensions. I imagined using semi-isotropic would be the way, but I’m not sure if I can set no coupling at all for z direction. Could anyone clarify if this is possible?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [July 12, 2021, 3:22am UTC](https://gromacs.bioexcel.eu/t/how-to-keep-box-size-in-z-direction-constant-while-pressure-coupling-x-and-y/2493/2 "2021-07-12T03:22:46Z")

</div>

Use semi-isotropic coupling and set the z compressibility value to zero.

---

<div class="post-metadata">

**Author:** ![Yogesh](https://avatars.discourse-cdn.com/v4/letter/y/49beb7/32.png) [@Yogesh](https://gromacs.bioexcel.eu/u/Yogesh)\
**Post date:** [October 29, 2021, 6:23pm UTC](https://gromacs.bioexcel.eu/t/how-to-keep-box-size-in-z-direction-constant-while-pressure-coupling-x-and-y/2493/3 "2021-10-29T18:23:16Z")

</div>

Increasing the lateral pressure ( in z) up to 10 bar,

pcoupl = Parrinello-Rahman  
pcoupltype = semiisotropic  
tau\_p = 5.0  
compressibility = 0.0 4.5e-5  
ref\_p = 0.0 10.0 ; for 10 bar

Dr. Justin can you please check if this is the way to do so?

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [October 30, 2021, 2:04am UTC](https://gromacs.bioexcel.eu/t/how-to-keep-box-size-in-z-direction-constant-while-pressure-coupling-x-and-y/2493/4 "2021-10-30T02:04:12Z")

</div>

> [@Yogesh](#):
>
> compressibility = 0.0 4.5e-5  
> ref\_p = 0.0 10.0 ; for 10 bar
> 
> Dr. Justin can you please check if this is the way to do so?

In the event that you want the x-y plane to remain at a fixed size, yes.
