# [gmx-users] How to make a soft repulsive potential wall

Berk Hess gmx3 at hotmail.com
Wed Oct 22 09:40:12 CEST 2008

```

Date: Wed, 22 Oct 2008 01:22:09 +0800
From: bert.ustc at gmail.com
To: gmx-users at gromacs.org
Subject: [gmx-users] How to make a soft repulsive potential wall

Hi gmx-users,

I was simulating a water-surface system recently. The water molecules will escape from the solid surface, evaporate into the vacuum space above the surface, probably never come back and be trapped into the underpart of the surface for periodicity. I want to prevent the evaporating water molecules to be trapped by the lower part of the surface, and my thought is putting a soft repulsive potential wall just below the z_box. For clarity, the schematic is showed as follows,

——————
|  vacuum    |
|                 |
|×× wall  ×× | (a soft repulsive potential wall )
|                 |
|                 |
|                 |
|  vacuum    |
|.................|
|....water.....|
|.................|
|-----------------|
|-----solid-----|
——————
My questions are:

1) Note that wall function was is available in gmx4 now, I wonder which wall_type I should choose. I do not understand the phrase 'LJ integrated over the volume behind the wall' and 'LJ integrated over the wall surface, could you give me a little more explanation?

Integrate over the volume (for 9-3) means that you have a uniform 3D LJ "particle" density beyond the wall.
Integrate over the wall surface (for 10-4) means that you have a uniform 2D LJ density on the wall surface.

2) I test the both wall_types and each of them works fine (both walls are uncharged). I find that the LJ interation between the wall and the solid surface would not be cut-offed when the distance between them is beyond the vdw cutoff. I wonder if it is feasible that the water molecules will feel the repulsive force from the wall only within the cufoff distance around the wall. It would somewhat the same as the distance restraint, but the latter is hard to implement in intermolecular case.

No, for the walls there is not cut-off. The walls work on all the particles.
You have to make a table to get this to work.
Having a plain LJ cut-off on the wall is nasty. The attractive potential is effectively r^-3 or r^4,
so relatively long ranged and the cut-off would be on a perfect flat plane which would probably
introduce some nasty artifacts (although for a near vacuum the effect would be small).

3) If wall_type = table is used, could I set the dispersion columns to zero? Does rvdw work in this case?

Yes, you can do anything you like with the tables.
rvdw does not work, but you can of course put any functional form in the table that you want.

Berk

If you have any suggestions, that would be much appreciated. Thanks in advance.

_________________________________________________________________