Can "fix aveforce" add forces in molecule id style?

Hi lammps users,

Is there any command that I can use to add same force to atoms as “fix aveforce”, but by molecule id style as in “fix rigid”?

I have 40 layers of graphene. In my simulations, atoms in the same layer have the same out-plane displacements. However, their in-plane displacements are not fixed and they can move freely in the plane.

I would have used “fix aveforce” to average the out-plane forces, as below:

fix 1 group_layer_1 aveforce 0.0 NULL NULL
fix 2 group_layer_2 aveforce 0.0 NULL NULL



fix 40 group_layer_40 aveforce 0.0 NULL NULL

Out-plane displacements of different layer are different. However, there is a limit (32) for group numbers.

“fix rigid” can fix the out-plane displacements in molecule id style, which has no number limit. But the in-plane displacements are also fixed.

I am wondering if I can only constrain out-plane displacements in molecule ID style by LAMMPS.

Thank you in advance.

-Wenpeng

Hi lammps users,

Is there any command that I can use to add same force to atoms as "fix
aveforce", but by molecule id style as in "fix rigid"?

I have 40 layers of graphene. In my simulations, atoms in the same layer
have the same out-plane displacements. However, their in-plane displacements
are not fixed and they can move freely in the plane.

Is this realistic? Do individual large graphene sheets behave that
way? (Can they slide past each other?)

I would have used "fix aveforce" to average the out-plane forces, as below:

fix 1 group_layer_1 aveforce 0.0 NULL NULL
fix 2 group_layer_2 aveforce 0.0 NULL NULL
......
.......
........
fix 40 group_layer_40 aveforce 0.0 NULL NULL

Out-plane displacements of different layer are different. However, there is
a limit (32) for group numbers.

"fix rigid" can fix the out-plane displacements in molecule id style, which
has no number limit. But the in-plane displacements are also fixed.

One way to get around this limit would be to create a dump file
(trajectory file).
Then you can use the "rerun" command to reanalyze the trajectory 40 times.
http://lammps.sandia.gov/doc/rerun.html

Define a group ("group_layer") which contains a single layer of
graphene, and use "fix aveforce" on it. Repeat this 40 times. Each
time you use "rerun" you can change the definition of that group so
that it contains a different layer of atoms. However you only need to
run the simulation once. The "rerun" command will load the
coordinates of the atoms from a dump file and should recompute the
forces for every frame. (I think. If this does not work, you can
include these forces in the original dump file using:
dump 1 all custom 1000 dfile id mol type x y z ix iy iz fx fy fz
(See http://lammps.sandia.gov/doc/dump.html for details.)

Perhaps there is an easier way, but this should work.

I am wondering if I can only constrain out-plane displacements in molecule
ID style by LAMMPS.

Yes, I think so. Have you looked at "fix setforce"?
http://lammps.sandia.gov/doc/fix_setforce.html
You can apply fix setforce to a group of atoms containing all of the
graphene layers. You can set individual force components (like fz)
without effecting force components in the x or y direction.

Cheers
Andrew

i have to agree with andrew. unless you did express
yourself badly, your reasoning is bogus. if it is consistent
with your model (what *is* your model, BTW, to describe
graphene?) to enforce planarity, then it should be orders
of magnitude more realistic to turn those sheets into
completely rigid objects (i.e. use fix rigid). they will *still*
be able to slide past each other.

axel.

Hi lammps users,

Is there any command that I can use to add same force to atoms as "fix
aveforce", but by molecule id style as in "fix rigid"?

I have 40 layers of graphene. In my simulations, atoms in the same layer
have the same out-plane displacements. However, their in-plane displacements
are not fixed and they can move freely in the plane.

Is this realistic? Do individual large graphene sheets behave that
way? (Can they slide past each other?)

I would have used "fix aveforce" to average the out-plane forces, as below:

fix 1 group_layer_1 aveforce 0.0 NULL NULL
fix 2 group_layer_2 aveforce 0.0 NULL NULL
......
.......
........
fix 40 group_layer_40 aveforce 0.0 NULL NULL

Out-plane displacements of different layer are different. However, there is
a limit (32) for group numbers.

"fix rigid" can fix the out-plane displacements in molecule id style, which
has no number limit. But the in-plane displacements are also fixed.

One way to get around this limit would be to create a dump file
(trajectory file).
Then you can use the "rerun" command to reanalyze the trajectory 40 times.
http://lammps.sandia.gov/doc/rerun.html

Although this does not change the point that Axel and I were making, I
wanted to apologize for writing this. I was quite wrong when I
suggested using "rerun". I did not realize what "aveforce" does.
(For some strange reason I thought it was a compute.) Everything I
said in this part of my post was completely wrong. (I'm also not sure
if my suggestion for using "fix setforce" answered your question
either.) I should be more careful.

Cheers
Andrew