newton on variable T equal 300 variable P equal 1.0 timestep 1 thermo 10000 units real dimension 3 boundary p p p include "system.in.init" read_data system.data include "system.in.settings" velocity all create $T 825577 dist gaussian neighbor 2.0 bin neigh_modify every 1 delay 1 check yes fix NVT all nvt temp $T $T 100.0 dump 1 all custom 100000 dump.lammpstrj id type x y z dump_modify 1 sort id run 100 variable Cx equal 28.0 # the center of the sample in the x direction variable Cy equal 28.0 # the center of the sample in the y direction variable Cz equal 28.0 # the center of the sample in the z direction variable R equal 19.64157993 # the radius of the spherical vessel variable rc equal 0.7*v_R ################# region SP sphere ${Cx} ${Cy} ${Cz} ${rc} side in units box group ball dynamic all region SP every 1 group ball include molecule variable Mx atom x*q variable My atom y*q variable Mz atom z*q compute dipole ball reduce sum v_Mx v_My v_Mz ################# # #set atom * image 0 0 0 compute mychunk all chunk/atom bin/sphere ${Cx} ${Cy} ${Cz} 0.0 ${rc} 1 nchunk every ids every compute dipole1 all dipole/chunk mychunk fix test1 all ave/time 100 1 100 c_dipole1[*] file tmp1.out mode vector fix test2 all ave/time 100 1 100 c_dipole[*] file tmp2.out mode vector run 10000 write_data system_ice.data clear