fix stress tensor calculation for tersoff and sw