atom_style full
neighbor 3.0 bin
neigh_modify delay 5 every 1 check yes
read_data gufinal2-oh1.data
#lattice diamond 3.5667
#region box1 cylinder z 9 16.5 3 3 18 units box
#create_atoms 1 region box1
#group tip region box1
# define region before define group
region rfix block INF INF INF INF INF -8 units box
region r1 block INF INF INF INF -8 -4.5 units box
region r2 block INF INF INF INF -4.5 -1 units box
region r3 block INF INF INF INF -1 INF units box
region th1 block INF INF INF 3.5 -8 INF units box
region th2 block INF INF 29.5 INF -8 INF units box
group gfix region rfix
group g1 region r1
group g2 region r2
group g3 region r3
group gth1 region th1
group gth2 region th2
group gth union gth1 gth2
group gthg12 subtract gth g3
group gthg3 subtract gth gthg12
group g12 union g1 g2
group gf12 union gfix g12
# compute and velocity
variable fg3x equal fcm(g3,x)#x component of the total force on group g3
variable fg3y equal fcm(g3,y)
variable fg3z equal fcm(g3,z)
variable vg3x equal vcm(g3,x)#x component of velocity of the center of mass of group g3
variable vg3y equal vcm(g3,y)#y component of velocity of the center of mass of group g3
variable pg3x equal xcm(g3,x)#x component of position of the center of mass of group g3
variable pg3y equal xcm(g3,y)#y component of position of the center of mass of group g3
variable pg3z equal xcm(g3,z)#z component of position of the center of mass of group g3
variable pg2x equal xcm(g2,x)#x component of position of the center of mass of group g2
variable pg2y equal xcm(g2,y)#y component of position of the center of mass of group g2
variable pg2z equal xcm(g2,z)#z component of position of the center of mass of group g2
variable vg2x equal vcm(g2,x)#x component of velocity of the center of mass of group g2
variable vg2y equal vcm(g2,y)#y component of velocity of the center of mass of group g2
#displace_atoms g3 rotate 21.27 25.45 8.08 0.0 0.0 1.0 10.0 units box
#displace_atoms g3 move 0.0 0.0 0.5 units box
compute temp1 g3 temp
compute temp2 g3 temp/com
compute temp3 g12 temp
compute temp4 gthg12 temp
compute temp5 gthg3 temp
compute temp6 gthg3 temp/com
compute cf1 g3 group/group gf12
compute ke1 g3 ke
compute pe1 g3 pe/atom
compute peg3 g3 reduce sum c_pe1
compute pe2 g12 pe/atom
compute peg12 g12 reduce sum c_pe2
velocity gfix set 0.0 0.0 0.0 units box
#velocity tip set 0.0 0.0 0.0 units box
velocity g12 create 10 4928459 rot yes dist gaussian units box
velocity g3 create 10 4928459 rot yes dist gaussian units box