DOE OSTI · 3027746
MontePy: a Python library for reading, editing, and writing MCNP input files.
Abstract
The Monte Carlo N-Particle (MCNP) radiation transport code is a highly capable and accurate code with a long legacy. MCNP uses the Monte Carlo simulation process to simulate the path of particles (e.g., neutrons, photons, charged particles, etc.), and their interaction with materials. It is widely used in nuclear engineering, high-energy physics, and other fields. Its origins in the mid-twentieth century predate many modern software conventions. MCNP users provide an input file to MCNP, which it then uses to create an internal representation of the simulation problem. These input files originally had to be stored as punchcard decks, and the user manual still uses the terminology of cards and decks, despite moving beyond punchcards. MCNP predates nearly all modern human readable markup or data serialization languages, such as the extensible Markup Language (XML), the Standard Generalized Markup Language (SGML), YAML (YAML Ain’t Markup Language), and Javascript Object Notation (JSON). Due to this, MCNP uses an entirely custom defined syntax language for its input, making off-the-shelf libraries for XML, YAML, and JSON impossible to use for scripting various operations on MCNP input files (Kulesza et al., 2022).
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Gale, Micah D. [Idaho National Laboratory (INL), Idaho Falls, ID (United States)] (ORCID:0000000164514818), Labossiere-Hickman, Travis J. [Idaho National Laboratory (INL), Idaho Falls, ID (United States)] (ORCID:0000000307423404), Carbno, Brenna Anne [Idaho National Laboratory (INL), Idaho Falls, ID (United States)] (ORCID:0009000566915128), Bascom, Andrew John [Idaho National Laboratory (INL), Idaho Falls, ID (United States)] (ORCID:0009000566915128). 2025-04-09. MontePy: a Python library for reading, editing, and writing MCNP input files.. https://doi.org/10.21105/joss.07951
Cite the original work for its findings. Save a collection to share your selection of sources.