Dear Andrew and Steve,
http://lammps.sandia.gov/threads/msg23400.html
Here I haver a 20 A thick polymer wall that swells and water molecules get
into it during the npt equilibration. One solution to prevent this is to
tether a centre piece of the wall (e.g. 5 A thickness which is the "Centre
Slab" in the schematic) to springs and restrict the movement of the atoms in
that slab but the problem is that LAMMPS doesn't scale the spring tether
point during NPT and this cause spurious pressure in the system, however, as
far as I know GROMACS does this scaling and this setup can be used there. So
I tried to solve this in LAMMPS by following the discussion
(http://lammps.sandia.gov/threads/msg23400.html) and I exclude the 5 A
region ("Centre Slab") from integration and I used fix rigid with turned off
forces and torques as an attempt to eliminate the virial contribution from
rest of the field on the atoms in this slab, as suggested by Andrew if I
understood correctly?!
Steve: that's why I'm using fix rigid.
First of all, this discussion took place at an earlier time, and
LAMMPS may have behaved differently. Back then, I did notice that at
atmospheric pressure "fix rigid" did a better job preserving the
volume of the water. At that time, simply omitting the immobile slab
from the atoms, did cause the volume of the system to jump slightly.
(If I can find the plot I made showing this, I'll repost it.)
Since then, there are new versions of fix rigid. See:
http://lammps.sandia.gov/doc/fix_rigid.html
I no longer feel informed enough to have a strong opinion how to do
this. Trung wrote fix rigid, and I definitely respect his opinion.
I suggest to try doing it both ways, and see which works better.
I'm also using "dilate" option of the nph and the group that I'm applying
this on is (water + wall - "Centre Slab") so I expect that the "Center Slab"
shouldn't move at all. However, as I mentioned in previous post I'm seeing
tiny oscillation of the com of this slab. Is this because of competing
effect of the scaling part of the polymer chain that is outside of the slab
and is scaled and part of it that is trapped inside the slab? basically can
this cause "dilate" not to function as is expected or it has to no matter
what?
Have you checked to see if the width of the slab is constant?
If you haven't yet, take a look at this video:
http://www.moltemplate.org/videos/translocation/walls+solvent+polymer_t=0-60ps.avi
(The two purple walls do slide up and down, but the distance between
them remains the same.)
I hope I haven't been spreading misinformation how to do this.
Axel's suggestion of tethering the immobile particles to a heavy atom
might work. I never thought of that!
Andrew