[lammps-users] question about stress tensor

I output the stress tensor per atom in the dump file. But to calculate the stress ACF and the viscosity of the system, I need the total stress of the system. If I want to get the total stress of the system, do I just add all the stress tensors of all the atoms at a given time step? or is there some other way to do it?

Total stress should be the same as total pressure (suitably normalized).