Determination of the shear viscosity of atomic liquids by non-equilibrium molecular dynamics