In the polar regions, precipitation of solar high-energy protons and electrons affects the neutral composition of the middle atmosphere. Here we use the Sodankylä Ion and Neutral Chemistry model to calculate ionic production and loss rates of neutral HOx and NOy species, imposed by particle precipitation, for a range of atmospheric conditions and levels of ionization. We also analyse in detail the ionic reaction sequences leading to the HOx and NOy changes. Our results show that particle impact ionization and positive ion chemistry cause net production of N, NO, HNO2, H, andOH from N2 and H2O. On the other hand, negative ion chemistry redistributes the NOy species, without net production or loss, so that NO, NO2, and N2O5 are converted to HNO3 and NO3. Based on the model results, we provide tables of so-called P/Q numbers (i.e. production and loss rates of neutral species divided by ionization rates) at altitudes between 20 and 90 km. These numbers can be easily used to parameterise the ion chemistry effects when modelling atmospheric response to particle precipitation. Compared to earlier studies, our work is the first to consider in detail the NOy effect of negative ion chemistry, and the diurnal and seasonal variability of the P/Q numbers.