Look at LAMMPS doc page for compute pressure. Please send future questions to LAMMPS mailing list, cc'd on this message
http://lammps.sandia.gov/doc/compute_pressure.html