MCNPy
A Python package for working with MCNP input and output files. MCNPy provides a lightweight alternative to mcnptools, offering essential functionality for parsing, analyzing, and manipulating MCNP files in Python.
Features
- Parse and manipulate MCNP input files (materials, PERT cards)
- Read and analyze MCTAL output files
- Compute sensitivity data
- Generate and visualize sensitivity profiles
- Create Sensitivity Data Files (SDF)
Installation
pip install mcnpy
Quick Start
import mcnpy
# Read an MCNP input file
inputfile = "path/to/input_file"
input_data = mcnpy.read_mcnp(inputfile)
# Read a MCTAL file
mctalfile = "path/to/mctal_file"
mctal = mcnpy.read_mctal(mctalfile)
# Access materials
materials = input_data.materials
# Compute sensitivity data
from mcnpy.sensitivities import compute_sensitivity
sens_data = compute_sensitivity(inputfile, mctalfile, tally=4, nuclide=26056, label='Sensitivity Fe-56')
Documentation
For complete documentation, examples, and API reference, visit: MCNPy Documentation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Release files for mcnpy 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcnpy-0.2.5.tar.gz | 74.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcnpy-0.2.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 157.8 kB
Release files / mcnpy-0.2.5.tar.gz
| Download URL | mcnpy-0.2.5.tar.gz |
|---|---|
| Size | 74.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9998a955e8bd4d4f9818056ba459088421ccd85860dbea4aaec2dcbb7f01f26
|
|
BLAKE2b-256 checksum How to use checksums |
f5d67781af15240e5156467574e0abd86ebc51cab9a46682d0d6a23d5f620526
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / mcnpy-0.2.5-py3-none-any.whl
| Download URL | mcnpy-0.2.5-py3-none-any.whl |
|---|---|
| Size | 83.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7818891336e3bf0adfe6b1c5d84927b0fa841397bdb13e2d16594c45cf86a1ce
|
|
BLAKE2b-256 checksum How to use checksums |
5991233e04216db46646437ec854483572b5a05641995cff77a8155822593c62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|