about stress tensor and pressure tensor

Hi all,

When I only using nvt to thermostat the system, the average stress sensor of all the atoms is quite different from negative of pressure tensor.Btw, I use periodic boundary condition.
Should the value of them be the same when only using nvt?



Are you saying that if you run NVE you get agreement
between summing the per-atom stress and the total pressure,
whereas if you run NVT you do not? I doubt this. I don't see
how the thermostatting would affect the stress/pressure calculations