I want to compute pressure tensor. My test system is melt problem in examples folder. (all files is attached) I get the pressure tensor Pzz by two ways. First, from thermo compute pressure. Second, I write my own script to compute pressure tensor, but with same formula as lammps definition (http://lammps.sandia.gov/doc/compute_pressure.html). However, these results are very different. I checked my script many times and could found programming typo. Therefore, I don't know where is wrong? Could any one take a moment to help me figure it out?
I attached lammps input, and my own python script(usage: ./press.py dump).
Thanks all in advance

I suggest you look at the details of how LAMMPS computes a pressure - e.g.
pair_lj_cut.cpp and compute_presure.cpp and put in some print
statements if you need to. If you isolate the different terms, you should
be able to find what is the difference compared to your calculation.
E.g. do it for a 2-atom system.