# Problem with Freezing the Graphene sheets

**URL:** https://gromacs.bioexcel.eu/t/problem-with-freezing-the-graphene-sheets/2177
**Category:** User discussions
**Created:** [May 16, 2021, 10:34pm UTC](https://gromacs.bioexcel.eu/t/problem-with-freezing-the-graphene-sheets/2177 "2021-05-16T22:34:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![azshamlou](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@azshamlou](https://gromacs.bioexcel.eu/u/azshamlou)
#### Post date: [May 16, 2021, 10:34pm UTC](https://gromacs.bioexcel.eu/t/problem-with-freezing-the-graphene-sheets/2177/1 "2021-05-16T22:34:49Z")

</div>

Dear Gromacs Users,

I’m trying to run a simulation of protein near the graphene sheets in order to study stretching and folding of proteins.  
I used these lines in my script to freez the graphene sheets.

; Number of walls, type, atom types, densities and box-z scale factor for Ewald  
nwall = 2  
wall-type = 12-6  
pbc = xy  
ewald-geometry = 3dc ; Only Ewald sum compatible with slab geometry,  
wall-ewald-zfac = 3 ; Extra empty space for slab geometry calculation (reduc  
wall-r-linpot = 0  
wall\_atomtype = MW MW  
freezegrps = CR1  
freezedim = Y Y Y

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/1X/411f8bc0ce77587f97d958d48879c06f3a5f4a03.png)

However, when I freeze the graphene sheets in 3 dimensions,I will receive the segmentation error.  
I freezed them in two dimensions, so I can run it in NVT and consequently in NPT ensemble without error , but after 2ns of simulation in NPT, I found out some strange dispersion of graphene sheets Carbon atoms (like dash line).  
I attached the photo of last snapshot and marked the dash line of atoms.  
Do you have any idea what is wrong in this system?  
Thank you in advance for your advice,  
Azar

---

<div class="post-metadata">

### Author: ![pjohansson](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pjohansson/32/316_2.png) [@pjohansson](https://gromacs.bioexcel.eu/u/pjohansson)
#### Post date: [May 17, 2021, 5:29am UTC](https://gromacs.bioexcel.eu/t/problem-with-freezing-the-graphene-sheets/2177/2 "2021-05-17T05:29:15Z")

</div>

Hi,

I can’t be sure, but a few possible problems come to mind. What z-position are the atoms at? Segfaults can come from a division by zero, which could come from either the configuration having atoms at identical positions or at z=0, since the wall is at that position.

I suspect that the line you’re seeing on the left is VMD (which you seem to be using) shifting them there from the boundary on the right side, if the atoms are placed on or very close to the box edge. This could create a visual artifact. When you say that you are running NPT, are you scaling all box vectors, or just the height (along z)?

Regards,  
Petter
