oscillation and rotation of a rigid object

Dear all,

There is a cylindrical rigid object in my system. I want to it
rotates around its longitudinal axis and at the same time it
oscillates along the Y axis. in order to i used the below commands:

compute com CY com
fix 21 CY move rotate c_com[1] c_com[2] 0.0 0.0
0.0 1.0 5.0
fix 121 CY move wiggle 0.0 0.06 0.0 0.5 units box

group CY is cylindrical object. but it run to error:
ERROR: Expected floating point parameter in input script or data file
(../fix_move.cpp:109)

it seems this method can't be used. how can i do it?

Thank you
Yasti

Dear all,

There is a cylindrical rigid object in my system. I want to it
rotates around its longitudinal axis and at the same time it
oscillates along the Y axis. in order to i used the below commands:

compute com CY com
fix 21 CY move rotate c_com[1] c_com[2] 0.0 0.0

​does the fix move documentation say that you can use the output of a
compute as input? no! so this is not allowed.​

0.0 1.0 5.0
fix 121 CY move wiggle 0.0 0.06 0.0 0.5 units box

​also, atoms​ must not be time integrated multiple times, so you cannot
have two instances of fix move operating on the same atoms.

group CY is cylindrical object. but it run to error:
ERROR: Expected floating point parameter in input script or data file
(../fix_move.cpp:109)

it seems this method can't be used. how can i do it?

​how about ​reading the documentation for fix move more carefully and
actually doing some creative thinking.
obviously, the process you want to get done can only be implemented using
the variable option and you'd have to construct a smart enough set of
variables that implement the combined motion.

axel.

Thank you Dear Axel,

I’ve tried several times to assemble tasks of “fix move wiggle and rotate” commands into one “fix move variable command”. i success for “wiggle” but no for “rotation”. because it seems velocity of any portion of the rigid body is different from another portion. i mean the velocity depend on coordinate of each particle. i couldn’t do it. how can i rotate a 2D rigid body around center of mass with fix move variable? please help me.
thank you.

Thank you Dear Axel,

I've tried several times to assemble tasks of "*fix move wiggle and
rotate*" commands into one "*fix move variable command*". i success for
"wiggle" but no for "rotation". because it seems velocity of any portion of
the rigid body is different from another portion. i mean the velocity
depend on coordinate of each particle. i couldn't do it. how can i rotate
a 2D rigid body around center of mass with *fix move variable*? please
help me.

​have you heard of polar coordinates?

You can’t use fix move on rigid bodies. As Axel (and the fix move doc page) says,
you can’t integrate the motion of those atoms twice.

If you use fix move, you don’t need to treat the atoms as a rigid body. Just
rotate them, and they will act as a rigid, rotating body.

Steve

Thank you Dear Axel and Steve,
i removed “fix rigid” and added a some line of code:

variable dx atom -2.0*(y-xcm(CY,y))/$Rstep0.00001
variable dy atom 2.0*(x-xcm(CY,x))/$Rstep0.00001
variable vx atom -2.0*(y-xcm(CY,y))/$R
variable vy atom 2.0*(x-xcm(CY,x))/$R
fix move CY move variable v_dx v_dy NULL v_vx v_vy NULL units box

i expect this lines causes the 2d cylindrical object rotates around the axis that passes through the center of mass and perpendicular to it. it happens but radius of cylindrical object starts to decreases with time! i meat it becomes smaller and smaller. can anybody tell me why?

Thank you so much