# Simulate the movement of a rigid two-layer plate units metal atom_style atomic lattice fcc 4.08 region whole_box block 0 15 0 15 0 63 boundary p p p create_box 1 whole_box region r_plate block 0 15 0 15 31 32 create_atoms 1 region r_plate pair_style eam/alloy pair_coeff * * Au-Grochola-JCP05.eam.alloy Au neighbor 2.0 bin neigh_modify delay 3 timestep 0.0005 region r_top block 0 15 0 15 31 32 group g_top region r_top fix f1 g_top setforce 0 0 0 fix f2 all npt temp 300 300 0.5 x 0 0 0.5 y 0 0 0.5 compute com_2 g_top reduce ave vz variable x equal c_com_2 fix f_1 all print 100 "$x" file velocity.txt screen no thermo_style one thermo 100 velocity g_top set NULL NULL -1 units box dump 1 all cfg 100 d*.cfg mass type xs ys zs id vz run 10000 velocity g_top set NULL NULL 0 units box run 10000 velocity g_top set NULL NULL 1 units box run 10000 minimize 1.0e-15 1.0e-15 10000 10000 clear