  We use numerical simulations to investigate the importance of HD formation
and cooling on the first generation of metal-free stars in a LCDM cosmology. We
have implemented and tested non-equilibrium HD chemistry in an adaptive mesh
refinement simulation code and applied it to two situations. (1) It is first
applied to the formation of 10^5 - 10^6 Msun halos which form in the absence of
any ionizing source. We show, in agreement with previous work, that HD cooling
is of only marginal importance for most halos; however, we find that for the
lowest mass halos, HD cooling can equal or surpass the H2 cooling rate. This
leads to a population of stars formed in halos with effective HD cooling that
are less massive by a factor of ~6 compared to halos dominated by H2 cooling.
(2) In the second part of the paper, we ionize the halos in order to explore
the impact of HD cooling in the presence of an ample population of free
electrons. This leads to cooler temperatures (due to the electron- catalyzed
production of H2) and somewhat lower resulting proto-stellar mass. Adding HD
chemistry lowers the temperature further, to the level of the CMB. We find that
HD cooling dominates over H2 cooling in the density range 10^2 cm^-3 to 10^6
cm^-3, but above this density, the temperature rises and H2 cooling dominates
again. Because of this, the accretion rate on to the protostar is almost the
same as in the H2 case (at least for accreted masses below 50-100 Msun),
therefore we argue that HD cooling in ionized halos will probably not result in
a population of significantly lower mass stars.
