rotate a group and calculate its torque

Hi everybody

I am wondering how to calculate torque when rotating a group,and I got a few questions.
1)What’s the difference between displace_atoms and fix move.
2) When I use displace_atoms + setforce 0.0 0.0 0.0 + velocity set 0.0 0.0 0.0, the graphene do rotate but the torque output by torque() is 0. I kwon the reason is that “setforce 0.0 0.0 0.0” would zero the torque and force, and some one said I should use fix rigid and turn off the torque and force. Then I used it but the graphene didn’t rotate, so I hope you may point out what’s wrong with my code.
Below is my code.

thanks a lot

Sydney

#LAMMPS input file for graphene
units metal
boundary p p p
atom_style atomic
read_data data.Graphene

pair_style airebo 0.0 0 0
pair_coeff * * CH.airebo C H
#pair_style tersoff
#pair_coeff * * BN_albe B N
#neighbor 0.2 bin
#neigh_modify every 20 delay 100 check yes
#mass 1 10.81100000
#mass 2 14.00670000
mass 1 12.0107
mass 2 1.00
group g_C type 1
group g_H type 2

Displace_atoms moves the atoms when you issue the command.

Fix move operates during a run and moves the atoms gradually.

If you just want to measure torque, define a variable that

uses the torque() function on a group you specify, and output
the value of the variable.

Steve

Steve

Thanks for replying.

I know that torque() function can output torque of a group, but since I use “fix 8 inner setforce 0.0 0.0 0.0” command to prevent the group “inner” from rotating back after displace_atoms, output torque of group “inner” is 0.

So do you have some suggestions to change the method I use to rotate the group “inner” ?

Sydney

If you don’t time integrate the rotated atoms (e.g. fix nve),
then they won’t rotate back, and you don’t need to use
fix setforce 0.0. And torque() will give the torque those
atoms are experiencing.

Steve