On galactic scales, the surface density of star formation appears to be well correlated with the surface density of molecular gas. This has led many authors to suggest that there exists a causal relationship between the chemical state of the gas and its ability to form stars – in other words, the assumption that the gas must be molecular before star formation can occur. We test this hypothesis by modelling star formation within a dense cloud of gas with properties similar to a small molecular cloud using a series of different models of the chemistry, ranging from one in which the formation of molecules is not followed and the gas is assumed to remain atomic throughout, to one that tracks the formation of both H2 and CO. We find that the presence of molecules in the gas has little effect on the ability of the gas to form stars: star formation can occur just as easily in atomic gas as in molecular gas. At low densities (<104 cm−3), the gas is able to cool via C+ fine-structure emission almost as efficiently as via CO rotational line emission, while at higher densities, the main cooling process involves the transfer of energy from gas to dust, meaning that the presence of molecules is again unimportant. Cooling by H2 is particularly inefficient, accounting for as little as 1 per cent of the overall cooling in the cloud. Rather than the chemical makeup, we find that the most important factor controlling the rate of star formation is the ability of the gas to shield itself from the interstellar radiation field. As this is also a prerequisite for the survival of molecules within the gas, our results support a picture in which molecule formation and the formation of cold gas are both correlated with the column density of the cloud – and thus its ability to shield itself – rather than being directly correlated with each other.