Fixing the position of graphene sheet

Hello LAMMPS Users,

I’m trying to fix the position of the atoms, throughout whole simulation, of a graphene sheet while moving something that is sitting above it while they aren’t contacting each other. For that, I’m using following commands to constrain the motion of the atoms belonging to “fx_gr” group:

velocity fx_gr zero linear
velocity fx_gr zero angular
fix 3 fx_gr setforce 0 0 0

But after running simulation, carbons atoms belonging to “fx_gr” group appears to be moving right from 0th frame of the dump files. The simulation contains water and graphene interaction.

Thanks to all for your time.

I’m trying to fix the position of the atoms, throughout whole simulation, of
a graphene sheet while moving something that is sitting above it while they
aren’t contacting each other. For that, I’m using following commands to
constrain the motion of the atoms belonging to “fx_gr” group:

velocity fx_gr zero linear
velocity fx_gr zero angular

This fails because it does not set the velocity of every atom in the
"fx_gr" group to zero. It sets the sum of the velocities to zero (and
the sum of the angular velocities).

If you're goal is to completely immobilize these atoms, then set each
atom's velocity to zero using something like this:

velocity fx_gr create 0.0 1
fix 3 fx_gr setforce 0 0 0

For more details:
http://lammps.sandia.gov/doc/velocity.html

Alternately you can omit the "fx_gr" group from the group of atoms
which is sent to "fix nvt" (or, equivalently, "fix nve"+"fix
langevin"). This is what I often recommend doing. Either way should
work, but with "fix setforce", you must be careful to make sure the
velocities are initially zero and no other fixes are acting on the
atoms you want to freeze.

In your case, that would look something like:

group mobile_gr subtract all fx_gr
fix 3 mobile_gr nvt temp 300.0 300.0 100.0

This approach is used here:
http://moltemplate.org/visual_examples.html#nanotube+water
For more details, see:
http://lammps.sandia.gov/doc/group.html

   --- NPT ---
At constant pressure, you can try using the alternate approach below
(although it might not be correct at high pressure):
http://moltemplate.org/visual_examples.html#translocation

If your goal is to allow the atoms some freedom of movement, then you
can either use:

1) fix spring (to tether the atoms to their original locations)
http://lammps.sandia.gov/doc/fix_spring.html

2) fix recenter (to keep the center of mass from changing)
http://lammps.sandia.gov/doc/fix_recenter.html

The second option (fix recenter) only works if the atoms you want to
immobilize exert force on each other. (If they are bonded to each
other or interacting via some many-body pair_style.)

Cheers

Andrew