MCSim. GNU MCSim is a suite of simulation software.  It allows one to design one's own statistical or simulation models,
perform Monte Carlo simulations, and Bayesian inference through (tempered) Markov chain Monte Carlo simulations. The latest version allows parallel computing of Monte Carlo or MCMC simulations.

Description
GNU MCSim is a simulation and statistical inference tool for algebraic or differential equation systems, optimized for performing Monte Carlo analysis. The software comprises a model generator and a simulation engine:

 The model generator facilitates structural model definition and maintenance, while keeping execution time short. The model is coded using a simple grammar, and the generator translates it into C code. Starting with version 5.3.0, models coded in SBML can also be used.
 The simulation engine is a set of routines that are linked to the model in order to produce executable code. The result is that one can run simulations of the structural model under a variety of conditions.

Internally, the software uses the GNU Scientific Library for some of its numerical calculations.

History
The project began in 1991 in Berkeley when Don Maszle and Frederic Y. Bois translated in C and reorganized a program that Bois had developed at Harvard for his PhD thesis. The primary motivation for the work was to be able to quickly develop and easily maintain PBPK models. However, the syntax was defined with enough generality that many algebraic and first-order ordinary differential equations can be solved. The capability to perform efficient Monte Carlo simulations was added early on, for the research needs of the group. The code was made freely available from a server at UC Berkeley. Discussions with Stuart Beal at UCSF School of Pharmacy, led the team to investigate the use of Markov chain Monte Carlo techniques for PBPK models' calibration. The corresponding code was developed by Maszle, during a project in collaboration with Andrew Gelman, then professor at UC Berkeley Statistics Department. Additional code written by Ken Revzan allowed the definition and Bayesian calibration of hierarchical (multilevel) statistical models. At the time of these developments (around 1996) those capabilities were unique for a freely distributed, easily accessible, very powerful and versatile software. Since then the software has been consistently maintained and extended.

Released versions
 6.2.0 (3 June 2020)
 6.1.0 (19 February 2019)
 6.0.1 (5 May 2018)
 6.0.0 (24 February 2018)
 5.6.6 (21 January 2017)
 5.6.5 (27 February 2016)
 5.6.4 (30 January 2016)
 5.6.3 (1 January 2016)
 5.6.2 (24 December 2015)
 5.6.1 (21 December 2015)
 5.6.0 (16 December 2015)
 5.5.0 (17 March 2013)
 5.4.0 (18 January 2011)
 5.3.1 (3 March 2009)
 5.3.0 (12 January 2009)
 5.2 beta (29 January 2008)
 5.1beta (18 September 2006)
 5.0.0 (4 January 2005)
 4.2.0 (15 October 2001)
 4.1.0 (1 August 1997)
 4.0.0 (24 March 1997)
 3.6.0
 3.3.2

Licensing
GNU MCSim is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

Platform Availability
The C source code is provided and can be compiled on any machine with a C compiler. The GNU Scientific Library needs to be also available on the target platform to use a few extra distributions in statistical models. To take advantage of the SBML translation capabilities, the LibSBLM library should be installed. Starting with version 6.0.0 the Sundials Cvodes integrator is also used. To take advantage of parallel computation (from version 6.2.0 on) a MPI library needs to be installed.

See also
 Comparison of numerical analysis software
 List of numerical analysis software

References
Bois F., Maszle D., 1997, MCSim: A simulation program, Journal of Statistical Software, 2(9):http://www.stat.ucla.edu/journals/jss/v02/i09.

Jonsson F., Johanson G., 2003, The Bayesian population approach to physiological toxicokinetic-toxicodynamic models – An example using the MCSim software, Toxicology Letters 138:143-150.

Bois F., 2009, GNU MCSim: Bayesian statistical inference for SBML-coded systems biology models, Bioinformatics, 25:1453-1454, doi: 10.1093/bioinformatics/btp162.

Allen B.C., Hack E.C., Clewell H.J., 2007, Use of Markov chain Monte Carlo analysis with a physiologically-based pharmacokinetic model of methylmercury to estimate exposures in u.s. women of childbearing age, Risk Analysis, 27:947-959.

Covington T.R., Gentry P.R., et al., 2007, The use of Markov chain Monte Carlo uncertainty analysis to support a Public Health Goal for perchloroethylene, Regulatory Toxicology and Pharmacology, 47:1-18.

David R.M., Clewell H.J., et al., 2006, Revised assessment of cancer risk to dichloromethane II. Application of probabilistic methods to cancer risk determinations. Regulatory Toxicology and Pharmacology 45: 55–65.

Franks S.J., Spendiff M.K., et al., 2006, Physiologically based pharmacokinetic modelling of human exposure to 2-butoxyethanol, Toxicology Letters 162:164-173.

Hack E.C., 2006, Bayesian analysis of physiologically based toxicokinetic and toxicodynamic models, Toxicology, 221:241-248.

Hack E.C., Chiu W.A, et al., 2006, Bayesian population analysis of a harmonized physiologically based pharmacokinetic model of trichloroethylene and its metabolites, Regulatory Toxicology and Pharmacology, 46:63-83.

Lyons M.A., Yang R.S.H, Mayeno A.N., Reisfeld B. 2008, Computational toxicology of chloroform: reverse dosimetry using Bayesian inference, Markov chain Monte Carlo simulation, and human biomonitoring data, Environmental Health Perspectives, 116:1040-1046.

Marino, D. J., H. Clewell, et al., 2006, Revised assessment of cancer risk to dichloromethane: part I Bayesian PBPK and dose-response modeling in mice, Regulatory Toxicology and Pharmacology 45:44-54.

Mezzetti M., Ibrahim J.G., et al., 2003, A Bayesian compartmental model for the evaluation of 1,3-butadiene metabolism, Journal of the Royal Statistical Society, Series C, 52:291-305.

External links
 GNU MCSim home page

Free software programmed in C
Free Bayesian statistics software
Numerical software
GNU Project software
Mathematical optimization software