We use nonequilibrium molecular dynamics to simulate steady state planar shear flow and planar elongational flow of fluids of small molecules at constant volume and temperature. The systems studied are Lennard–Jones diatomic molecules (chlorine), and a series of linear Lennard–Jones molecules with one, two, and four sites. In our simulations of planar elongational flow, we employ Kraynik–Reinelt periodic boundary conditions, which allow us to obtain precise values of the steady state planar elongational viscosity. We validate our application of Kraynik–Reinelt periodic boundary conditions by comparing the zero strain rate shear and elongational viscosities. The results show that the elongational viscosity is proportional to the shear viscosity in the zero strain rate limit, as expected. The viscosity, pressure, and internal energy of the atomic Lennard–Jones fluid show exactly the same behavior for the two types of flow when both sets of results are plotted against the second scalar invariant of the strain rate tensor. The results for the diatomic and four-site molecules show differences in the pressure, energy, and viscosity outside the Newtonian regime when plotted against the second scalar invariant of the strain rate tensor. The differences in the properties in the nonlinear regime increase with both strain rate and molecular length.