[lammps-users] Temperature calculations and print during Shock simulations

Dear Lammps users,
I am trying to simulate the shock behaviour of Nickel. I have the following
issues:-

   - When I am calculating temperature by excluding the centre of mass
   velocity of the bins taking an atom variable, I am unable to print the
   value of temperature, because *fix ave/chunk* takes only per-atom values.
   - If I am using simply fix ave/chunk for temp, the temperature is
   increasing rapidly beyond the melting point during shock.

My Script is given below:

*####################Shock compression in
Nickel#####################################units metalboundary p p
patom_style atomic# ---------- Create Atoms --------------------- lattice
      fcc 3.524 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1region
box block -52.86 52.86 -52.86 52.86 -352.4 352.4 units boxcreate_box
   1 boxcreate_atoms 1 box #define the potential#pair_style
eam/alloypair_coeff * * NiAlH_jea.eam.alloy Ni#mass 1 58.9332mass 1
58.70#mass 3 51.996#mass 4 55.847#mass 5 54.9380 #compute the
properties#compute disp all displace/atomcompute mytemp all temp#compute
mytemp1 all temp/comcompute peratom all pe/atomcompute
pe all reduce ave c_peratomcompute ke all ke/atomcompute ke1 all
reduce ave c_kecompute myCOM all comcompute velZ all property/atom
vzcompute vorvol all voronoi/atomcompute strs all stress/atom
NULL virialcompute pr all reduce sum c_strs[1] c_strs[2]
c_strs[3]compute press all reduce sum
c_strs[3]#########Minimization#######min_style cgminimize 1e-15
1e-15 10000 10000velocity all create 300.0 1231141 dist gaussian rot
yes#######Relaxation at 300K using NPT ensemble for 60ps######timestep
0.001fix 1 all npt temp 300 300 0.01 iso 0 0 100thermo 1000thermo_style
custom step pxx pyy pzz lx ly lz temp pe ke etotaldump 1 all
custom 10000 Relax_NPT_*.dump id type mass x y z vx vy vz c_peratom run
100000unfix 1undump 1write_restart Equi.restart reset_timestep
0#########Equilibration using NVE ensemble for 100ps (Langevin dynamics at
300 K)##########change_box all boundary p p s remap units boxfix 1 all
nvethermo_style custom step lx ly lz temp pe etotal pxx pyy pzz
pressdump 1 all custom 10000 Relax_NVE_*.dump id type mass x y
z vx vy vz c_peratom thermo 1000timestep 0.001run 40000unfix
1undump 1write_restart restart.relax.nvereset_timestep 0fix 1 all
nvethermo
10#############################################################Calculation
of Temprature and pressure of Bins ##########variable meanpress atom
-(c_strs[1]+c_strs[2]+c_strs[3])/3/c_vorvol[1]/10e4variable p2 equal
"-pxx/10000"variable p3 equal "-pyy/10000"variable p4 equal
"-pzz/10000"variable stressZ atom c_strs[3]/c_vorvol[1]/10e4variable tmp
equal "lz"variable L0 equal ${tmp}variable strain equal "(lz -
v_L0)/v_L0"variable p1 equal
"v_strain"######################################################################################Execution
of Shock along Z direction#######################################fix
rigidWall all wall/reflect zlo EDGE zhi EDGE units boxfix walls all
wall/piston zlo pos -352.4 vel 10 units box compute mytemp2 all
temp/partial 0 0 1compute parts all chunk/atom bin/1d z lower 0.02
units reducedcompute chunkCOM all com/chunk partscompute myChunk all
vcm/chunk partsvariable trKE atom
mass*(c_velZ-c_myChunk[3])*(c_velZ-c_myChunk[3])/2 variable temp atom
c_trKE/(1.5*8.61e-5)fix density_prof all ave/chunk 1 10 10 parts
density/mass file profile.denzfix potential_prof all ave/chunk
1 10 10 parts c_peratom file profile.mpPotentialfix ke_prof all
ave/chunk 1 10 10 parts c_ke file profile.mpkefix stress_prof
all ave/chunk 1 10 10 parts v_stressZ file profile.stressfix
meanstr_prof all ave/chunk 1 10 10 parts v_meanpress file
profile.meanpressfix vel_prof all ave/chunk 1 10 10 parts
c_velZ file profile.VelocityZfix temp_prof all ave/chunk 1 10
10 parts c_temp file profile.mptemptimestep 0.001thermo_style custom
step lx ly lz temp pe etotal v_strain v_p2 v_p3 v_p4 pressdump 1 all
custom 20 dump.shock.* id type mass x y z c_peratom c_ke v_temp c_velZ
c_disp[3] c_disp[4] c_strs[3]run 40000*
Please help me, how to calculate and print the temperature during shock
simulations?