# How can I fix a "bi-layer" during an NPT simulation?

**URL:** <https://gromacs.bioexcel.eu/t/how-can-i-fix-a-bi-layer-during-an-npt-simulation/13702>\
**Category:** User discussions\
**Created:** [September 3, 2026, 8:51am UTC](https://gromacs.bioexcel.eu/t/how-can-i-fix-a-bi-layer-during-an-npt-simulation/13702 "2026-09-03T08:51:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aurora](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@Aurora](https://gromacs.bioexcel.eu/u/Aurora)\
**Post date:** [September 3, 2026, 8:51am UTC](https://gromacs.bioexcel.eu/t/how-can-i-fix-a-bi-layer-during-an-npt-simulation/13702/1 "2026-09-03T08:51:12Z")

</div>

GROMACS version: 2025.3

Dear all,  
My name is Aurora Fatiga, and I work at CNR-ITM (Rende, Cosenza, Italy).  
I’m having some issues with GROMACS; I’ll explain my question.

I would like to simulate, using GROMACS, a system consisting of two layers (AB) of g-C3N4 (periodic-molecules) and solvent.  
This is a semi-isotropic (in the Z direction) NPT (300K, 1 bar, 1 ns) on a triclinic simulation cell with the following dimensions: (8.10000 7.01480 10.00000 0.00000 0.00000 -4.05000 0.00000 0.00000 0.00000).  
After running a few simulations, I encountered a problem that I would prefer not to have:  
the g-C3N4 layer at Z-min (approximately 0 nm) is shifted to Z-max due to the 3D PBC.

Is it possible to fix the g-C3N4 layers in place during the NPT simulation?

Thank you for your attention,

Aurora

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [September 7, 2026, 11:31am UTC](https://gromacs.bioexcel.eu/t/how-can-i-fix-a-bi-layer-during-an-npt-simulation/13702/2 "2026-09-07T11:31:38Z")

</div>

But this shift is irrelevant for the physics. What is the issue?

---

<div class="post-metadata">

**Author:** ![Aurora](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@Aurora](https://gromacs.bioexcel.eu/u/Aurora)\
**Post date:** [September 7, 2026, 11:40am UTC](https://gromacs.bioexcel.eu/t/how-can-i-fix-a-bi-layer-during-an-npt-simulation/13702/3 "2026-09-07T11:40:31Z")

</div>

Thank you for your reply.

For the analyses I will be doing, I would prefer that the gC3N4 stay in its initial position.

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [September 7, 2026, 12:00pm UTC](https://gromacs.bioexcel.eu/t/how-can-i-fix-a-bi-layer-during-an-npt-simulation/13702/4 "2026-09-07T12:00:23Z")

</div>

If your analysis cannot take into account periodic boundary conditions, the easiest solution is to move your layer up by a fraction of a nanometer.
