The stress tensor of an atomistic system