fix distance

Dear all,
in my simulation of polymer systems, i need to fix the distance between special atoms of polymer chains. is it possible using lammps?is there any command for doing this?
regards

Dear all,
in my simulation of polymer systems, i need to fix the distance between special atoms of polymer chains. is it possible using lammps?is there any command for doing this?

have you checked out: fix shake?

axel.

thanks Axel for your quick reply. as the manual says, fix shake could not be easily used in lammps especially for large systems like polymers and it can also be applied for atoms belonging the same molecule. in my simulation the two atoms that should have fixed distance don’t have the same molecule ID, i.e., they are from different molecules.

Dear all,
in my simulation of polymer systems, i need to fix the distance between special atoms of polymer chains. is it possible using lammps?is there any command for doing this?

have you checked out: fix shake?

axel.

From: Axel Kohlmeyer <[email protected]>
To: Mohammadhasan Rezaei <[email protected]…16…>
Cc:[email protected]…93…urceforge.net” <[email protected]>
Sent: Thursday, 3 November 2011, 23:19:39
Subject: Re: [lammps-users] fix distance

thanks Axel for your quick reply. as the manual says, fix shake could not be easily used in lammps especially for large systems like polymers and it can also be applied for atoms belonging the same

you have to read more carefully. this applies to polymers where you have
“clusters” of bonds. it means that you cannot have multiple connected
constrained bonds. there is no problem for example to constrain all
C-H bonds in a polyethylene.

molecule. in my simulation the two atoms that should have fixed distance don’t have the same molecule ID, i.e., they are from different molecules.

molecule id is just a label.

to apply fix shake, you need to define a bond. i would just add
a new bond between those two atoms with a new bond type
and tell fix shake constrain bonds of that type. if you don’t need
an exact distance constraint, you can also simply use
fix spring in “couple” mode and adjust the spring constant
to be stiff enough for your purpose.

axel.

From: Axel Kohlmeyer <[email protected]com>
To: Mohammadhasan Rezaei <[email protected]…16…>
Cc:[email protected]” <[email protected]>
Sent: Thursday, 3 November 2011, 23:19:39
Subject: Re: [lammps-users] fix distance
it’s right. i have read the lammps manual for many times carefully but i don’t think fix shake command can solve my problem. fix shake can fix bond distance and agle between 1-2 and 1-3 connected interactions but not distance between atoms that are not connected and far away from each other.
the coordinats of these two atoms can change during the dynamics simulation but thier pairwise ditance can’t.

thanks Axel for your quick reply. as the manual says, fix shake could not be easily used in lammps especially for large systems like polymers and it can also be applied for atoms belonging the same

you have to read more carefully. this applies to polymers where you have
“clusters” of bonds. it means that you cannot have multiple connected
constrained bonds. there is no problem for example to constrain all
C-H bonds in a polyethylene.

molecule. in my simulation the two atoms that should have fixed distance don’t have the same molecule ID, i.e., they are from different molecules.

molecule id is just a label.

to apply fix shake, you need to define a bond. i would just add
a new bond between those two atoms with a new bond type
and tell fix shake constrain bonds of that type. if you don’t need
an exact distance constraint, you can also simply use
fix spring in “couple” mode and adjust the spring constant
to be stiff enough for your purpose.

axel.