The chemistry and radiative cooling library Grackle provides options for primordial chemistry and cooling, photo-heating and photo-ionization from UV backgrounds, and support for user-provided arrays of volumetric and specific heating rates for astrophysical simulations and models. The library provides functions to update chemistry species; solve radiative cooling and update internal energy; and calculate cooling time, temperature, pressure, and ratio of specific heats (gamma), and has interfaces for C, C++, Fortran, and Python codes.
http://adsabs.harvard.edu/abs/2017MNRAS.466.2217S with a footnote to https://grackle.readthedocs.io/. More information: http://grackle.readthedocs.io/