UCLCHEMCMC: A MCMC Inference tool for Physical Parameters of Molecular
  Clouds
  We present the publicly available, open source code UCLCHEMCMC, designed to
estimate physical parameters of an observed cloud of gas by combining Monte
Carlo Markov Chain (MCMC) sampling with chemical and radiative transfer
modeling. When given the observed values of different emission lines,
UCLCHEMCMC runs a Bayesian parameter inference, using a MCMC algorithm to
sample the likelihood and produce an estimate of the posterior probability
distribution of the parameters. UCLCHEMCMC takes a full forward modeling
approach, generating model observables from the physical parameters via
chemical and radiative transfer modeling. While running UCLCHEMCMC, the created
chemical models and radiative transfer code results are stored in an SQL
database, preventing redundant model calculations in future inferences. This
means that the more UCLCHEMCMC is used, the more efficient it becomes. Using
UCLCHEM and RADEX, the increase of efficiency is nearly two orders of
magnitude, going from 5185.33 \pm 1041.96 s for ten walkers to take one
thousand steps when the database is empty, to 68.89 \pm 45.39 s when nearly all
models requested are in the database. In order to demonstrate its usefulness we
provide an example inference of UCLCHEMCMC to estimate the physical parameters
of mock data, and perform two inferences on the well studied prestellar core,
L1544, one of which show that it is important to consider the substructures of
an object when determining which emission lines to use.
