Shouldn't you be summing across all axes *except* atom_axis?