A high‑performance workflow suite for MCNP6 simulations, bridging the gap between resource‑aware task orchestration and lightning‑fast data post‑processing.
Running MCNP simulations often involves tedious manual work: babysitting system resources to avoid freezes, manually organizing piles of output files, and extracting tally data by hand.
MCNP-Automation-Toolkit eliminates that drudgery with a dual‑engine approach:
- The Orchestrator (Python) – intelligently manages your hardware and schedules tasks so your PC stays responsive.
- The Parser (C) – extracts simulation results at blazing speed, turning messy
.ofiles into clean spreadsheets.
Whether you're running a single case or a hundred, this toolkit lets you focus on science, not housekeeping.
| Component | Language | What it does |
|---|---|---|
| Runner / Orchestrator | Python | Monitors CPU/RAM, queues input files, launches MCNP instances, and provides a retro‑style dashboard while you wait. |
| Data Parser | C | Scans gigabytes of .o files, aligns tally results with your source.csv, and produces consolidated reports in CSV format. |
Both tools can be used independently, or you can chain them together for a fully automated workflow.
git clone https://github.com/10809104/MCNP-Automation-Toolkit.git
cd MCNP-Automation-Toolkitcd Parser
gcc -o MCNP_Parser.exe main.c -lcomdlg32 -lshell32 -lgdi32 -lwininet -lurlmon -lshlwapiNote: You can skip this step by downloading
MCNP_Parser.exefrom the Releases page.
cd ../Runner
pip install -r requirements.txt # only requires psutil- Option A (source):
python MCNP_Runner.py - Option B (pre‑built): Download
MCNP_Runner.exefrom Releases and double‑click.
The GUI will guide you through selecting:
- Your MCNP environment batch file (e.g.,
mcnp_630_env.bat) - The working directory containing your
model parameter - The specific input files to run
- CPU and RAM usage limits
After all simulations finish, you can run MCNP_Parser.exe
The GUI will guide you to:
- Click HELP to understand the required file structure and placement
- Select the source CSV files
- Choose the working directory containing your
.ooutput files - After processing completes, decide whether to merge the results into a single
.xlsxfile
MCNP-Automation-Toolkit/
├── Runner/ # Python source for the Orchestrator
│ ├── MCNP_Runner.py # Main entry point
│ ├── requirements.txt # Python dependencies
│ └── README.md # Component‑specific docs
│
├── Parser/ # C source for the Data Parser (flat structure for Dev‑C++)
│ ├── main.c # Main program (originally in src/)
│ ├── config.h # Configuration header
│ ├── tools.h # Core parsing functions
│ ├── merge.ps1 # PowerShell script for Excel integration
│ ├── MCNP_Parser.dev # Dev-c++
│ ├── MCNP_Parser.ico # Application icon (optional)
│ ├── MCNP_Parser.rc # Application icon config
│ ├── version.txt # for auto update
│ └── README.md # Component‑specific docs
│
├── Examples/ # Result screenshots and sample outputs
│ ├── runner_demo.png
│ ├── parser_demo.png
│ └── sample_report.csv
│
└── README.md # This file
Note for Dev‑C++ users: All C source files are kept in the same directory (
Parser/) for easy opening with Dev‑C++ projects. Simply openmain.cand compile.
The retro‑style dashboard showing active tasks and resource usage
Clean, aligned CSV output ready for analysis
This project is licensed under the MIT License – see the LICENSE file for details.
Developer's Note: This toolkit was born from real nuclear engineering research. You may encounter mixed Chinese/English comments in the source – a mark of its "battle‑tested" origins.
About Parser/You can get more fromMCNP-Data-Toolkit
Now go automate your MCNP workflow!
Made with ❤️ by KikKoh