# bulk SiC with vashishta potenial # Author: Wei Chen, IPE newton on variable T equal 300 variable P equal 35.0 units metal atom_style charge pair_style vashishta read_data "system.data" pair_coeff * * SiC.vashishta Si C velocity all create $T 825577 dist gaussian neighbor 0.3 bin neigh_modify every 5 delay 5 check yes group Si type 1 group C type 2 fix NPT all npt temp $T $T 100.0 iso $P $P 1000.0 timestep 0.002 thermo 10000 dump 1 all custom 10000 dump.lammpstrj id type x y z dump_modify 1 sort id run 1000000 compute 1 all pe compute 2 all ke compute 3 all temp variable Mx atom x*q variable My atom y*q variable Mz atom z*q compute dipole all reduce sum v_Mx v_My v_Mz variable dipole_x equal c_dipole[1] variable dipole_y equal c_dipole[2] variable dipole_z equal c_dipole[3] variable MM equal v_dipole_x*v_dipole_x+v_dipole_y*v_dipole_y+v_dipole_z*v_dipole_z fix 1 all ave/time 1000 1 1000 c_1 c_2 c_3 v_dipole_x v_dipole_y v_dipole_z file output.txt mode scalar ave one fix 2 all ave/correlate 5 100 10000 c_dipole[*] type auto ave running file dipole_correlation.txt overwrite fix 3 all ave/time 10 10 100 v_MM file dipole_avg.txt mode scalar ave running overwrite compute myRDF all rdf 100 1 1 1 2 2 1 2 2 fix RDF all ave/time 100 10 1000 c_myRDF[*] file rdf.txt mode vector ave running overwrite run 1000000 clear