#Lammps test units lj timestep 0.005 atom_style atomic boundary p p p pair_style lj/cut 2.5 read_data system.data group bot type 1 neighbor 1.0 bin neigh_modify every 2 delay 2 check yes exclude group bot bot velocity bot set 0 0 0 units box thermo 10000 dump 1 all xyz 100 all.xyz variable Rx equal xcm(bot,x) compute 1 bot com variable V equal 5 variable x equal vdisplace(0.0,$V) variable Vx equal vcm(bot,x) #fix 1 bot move linear $V 0 0 units box fix 1 bot move variable v_x NULL NULL v_V NULL NULL units box thermo_style custom step elapsed v_Rx c_1[1] v_x v_Vx run 500000 clear