restrict fix commands

hello all,

Is it possible to restrict the fix commands to a special direction?;
for example, can we just use fix npt in x and y direction (so the
atoms in z direction are motionless)?

best.
Azizi.

yes. The manual explains it all.

hello all,

Is it possible to restrict the fix commands to a special direction?;
for example, can we just use fix npt in x and y direction (so the
atoms in z direction are motionless)?

yes and no.

first of all, you have to realize that the system you're going to
simulate will be rather unphysical. but beyond that, you cannot
restrict the fix itself, but you can create conditions that result in
the trajectory you are after.

you need multiple things:
- you can tell fix npt to only modify the volume in x and y direction,
but not in z
- you have to initialize the z component of the atom velocities to be 0.0
- you have to use fix setforce to remove all z direction components on
the forces

if you have no velocities and no forces in z-direction and the box
cannot be expanded or compressed in z, then atoms should remain in
place. but there is one more thing you need to do: you have to change
how temperature is computed, since you have effectively reduced the
number of degrees of freedom of your system and the temperature (and
thus the fix npt time integration) will be wrongly based on atoms
being able to move freely in all three directions.

details on how to do all of this are in the lammps documentation. but
let me repeat my caveat, the system you describe is rather unphysical,
so you need to have a convincing justification for using this, or else
people will just reject your work.

axel.

thank you Axel for your notifications.
My system is a layer of graphene which has a hole in it and is in
water-nacl solution. I want my graphene have infinite dimensions.
Without any restrictions, the graphene will bend. My procedure is as follows:

1. Restrict graphene in the z direction and move it in xy plane.
2. Fix boundaries of the infinite graphene and let it to move in any directions.

Does it make my system unphysical?

thank you Axel for your notifications.
My system is a layer of graphene which has a hole in it and is in
water-nacl solution. I want my graphene have infinite dimensions.
Without any restrictions, the graphene will bend. My procedure is as follows:

1. Restrict graphene in the z direction and move it in xy plane.
2. Fix boundaries of the infinite graphene and let it to move in any directions.

Does it make my system unphysical?

why should the graphene not be allowed to vibrate in z-direction?
wouldn't it do that in the system that you want to model?

it is not quite clear what you mean by "bend". it could just be
that your input data is not proper to model a 2-d periodic system.
to keep your sheet in place, it should be sufficient to use a
weak z-direction tether via fix spring. PBC should keep it from
any rotation and rolling up.

axel.