include reset_force.in label atomi variable atomi loop 1 \$(v_natoms-1) variable xi equal x[\${atomi}] variable yi equal y[\${atomi}] variable zi equal z[\${atomi}] label atomj variable atomj loop \$(v_atomi+1) \${natoms} variable xj equal x[\${atomj}] variable yj equal y[\${atomj}] variable zj equal z[\${atomj}] variable dx equal \$(v_xi-v_xj) variable dy equal \$(v_yi-v_yj) variable dz equal \$(v_zi-v_zj) if "\$(v_dx>0.5*v_lx)" then & "variable dx equal \$(v_dx-v_lx)" if "\$(v_dx<-0.5*v_lx)" then & "variable dx equal \$(v_dx+v_lx)" if "\$(v_dy>0.5*v_ly)" then & "variable dy equal \$(v_dy-v_ly)" if "\$(v_dy<-0.5*v_ly)" then & "variable dy equal \$(v_dy+v_ly)" if "\$(v_dz>0.5*v_lz)" then & "variable dz equal \$(v_dz-v_lz)" if "\$(v_dz<-0.5*v_lz)" then & "variable dz equal \$(v_dz+v_lz)" variable r2 equal \$(v_dx*v_dx+v_dy*v_dy+v_dz*v_dz) variable r2Inv equal \$(1.0/v_r2) variable r6Inv equal \$(v_r2Inv*v_r2Inv*v_r2Inv) variable f equal \$(24*v_epsilon*v_sigma6*v_r6Inv*(2*v_sigma6*v_r6Inv-1)*v_r2Inv) variable dfx equal \$(v_dx*v_f) variable dfy equal \$(v_dy*v_f) variable dfz equal \$(v_dz*v_f) variable fxi equal v_fx_\${atomi}+v_dfx variable fyi equal v_fy_\${atomi}+v_dfy variable fzi equal v_fz_\${atomi}+v_dfz variable fxj equal v_fx_\${atomj}-v_dfx variable fyj equal v_fy_\${atomj}-v_dfy variable fzj equal v_fz_\${atomj}-v_dfz variable fx_\${atomi} equal \$(v_fxi) variable fy_\${atomi} equal \$(v_fyi) variable fz_\${atomi} equal \$(v_fzi) variable fx_\${atomj} equal \$(v_fxj) variable fy_\${atomj} equal \$(v_fyj) variable fz_\${atomj} equal \$(v_fzj) next atomj jump SELF atomj next atomi jump SELF atomi