[lammps-users] How to add torque in lammps

Dear all:
  I want to make one of the atom group rotate with constant angular velocity, so I must add torque to this atom group. One of the methods is adding some forces to different atoms to generate torque, but the direction of the forces must change when this group begins to rotation. I have used the variable command to get changed variables, but it seems it doesn't work in the 'fix addforce' command. My command is as follow:
fix 3 gra3x1 addforce v_fx1 v_fy1 0.0
fix 4 gra3x2 addforce v_fx2 v_fy2 0.0
Any suggestion or any other method will be ok.

You can't pass a variable to fix addforce. You'd have to
write a modified fix addforce to take a variable as an argument.
Wouldn't be hard to do.