Dear lammps-users,
I want to make some particles move along a direction and rotate around
a axis. My input code is shown below.
#rot
units metal
boundary p s p
atom_style atomic
lattice diamond 3.5667
region box block 0 10 0 20 0 10
create_box 1 box
mass * 12
pair_style tersoff
pair_coeff * * c.tersoff C
neighbor 0.3 bin
neigh_modify delay 5 check yes
region rot sphere 5 15 5 3
create_atoms 1 region rot
group rot region rot
fix 1 all nve
fix 2 rot rigid single
variable y equal "15-step*0.1"
fix 3 rot recenter 5 v_y 5
fix 4 rot move rotate 5 v_y 5 0 0 1 1
compute 1 rot com
thermo 1
thermo_style custom step v_y c_1[1] c_1[2] c_1[3]
timestep 0.001
dump 1 all atom 1 rot.lammpstrj
run 100
Unfortunately, the variable is not useful in some commands like fix
recenter and fix rotate, even displace_atoms etc.
Can you give me a good suggestion for this task. Thank you.
Best regards,
Zenger