This package manager is designed to set up a development environment for nuclear physics simulations and calculations. It automates the installation/update of various packages and libraries (PyNE, OpenMC, DAGMC, and Geant4) required for running nuclear physics simulations and analyses.
-
Download the latest release and extract it to your local machine.
Using wget:
wget "https://github.com/nukehub-dev/NukeBox/archive/refs/tags/v0.1.3.tar.gz" -O - | tar -xz
Using curl:
curl -L "https://github.com/nukehub-dev/NukeBox/archive/refs/tags/v0.1.3.tar.gz" | tar -xz
Using Git: (Download the most recent commit)
git clone "https://github.com/nukehub-dev/NukeBox.git"
-
Go to the NukeBox directory.
cd NukeBox*
-
Make the
install-nukebox.sh
script executable.chmod +x install-nukebox.sh
-
Run the script.
./install-nukebox.sh
The script will guide you through the installation process and prompt you for necessary configuration options.
During the installation process, you'll be asked for the following configuration options:
-
Installation Directory Path: Set the path where all the software will be installed. You can use the current directory or specify a custom directory.
-
Environment Name: Enter a name for the virtual environment that will be created. The default name is
nuke
, but you can provide a custom name. -
Geant4 Data Library Path: If you choose to install Geant4 data, provide the path for the Geant4 data library. The default is a directory within the virtual environment.
-
Cross Section Library Path: If you choose to install cross sections, provide the path for the cross section library. The default is a directory within the virtual environment.
-
Auto Download Geant4 Data: Choose whether to automatically download Geant4 data. Enter
y
for yes orn
for no. -
Auto Download Cross Sections: Choose whether to automatically download cross sections. Enter
y
for yes orn
for no.
You can also provide the configuration options directly from the command line.
./install-nukebox.sh -d <installation-directory> \
-e <environment-name> \
-g <geant4-data-library-path> \
-c <cross-section-library-path>
-
Operating System Detection: The script attempts to automatically detect the operating system and its version. It supports systems with
/etc/lsb-release
,/etc/debian_version
, and systems withlsb_release
binary. If the detection fails, the script will notify the user that their OS is not supported and provide an option to manually override the OS detection. -
Dependencies Installation: The script installs various packages through
apt-get
. The following packages are installed:software-properties-common
python3-dev
python3-pip
python3-venv
wget
build-essential
git
cmake
gfortran
qtbase5-dev
libblas-dev
liblapack-dev
libeigen3-dev
hdf5-tools
g++
libhdf5-dev
libboost-dev
libboost-python-dev
cython3
-
Python Environment Setup: The script creates a Python virtual environment using
venv
in the specified installation directory. It installs the following Python packages usingpip3
:numpy
cython<3
setuptools
jinja2
progress
tables
future
-
MOAB (Mesh-Oriented datABase) Installation: MOAB is a software component that provides a flexible, efficient, and easy-to-use interface for storing and accessing mesh data in MOAB-based applications. The script installs MOAB version 5.4.1 with support for HDF5 and Python.
-
Geant4 (for GEometry ANd Tracking) Installation: Geant4 is a software toolkit that simulates the passage of particles through matter. The script installs version 11.1.2 of Geant4, with the option to install data libraries in a specified path. The geant4-pybind package is used to enable Python support.
-
DAGMC (Direct Accelerated Geometry Monte Carlo) Installation: DAGMC is an extension of Geant4 that enables direct use of CAD (Computer-Aided Design) geometry in Monte Carlo radiation transport simulations. The script installs DAGMC with support for MOAB and Geant4.
-
OpenMC (Open Monte Carlo) Installation: OpenMC is an open-source Monte Carlo particle transport simulation code that focuses on neutron criticality and radiation shielding problems. The script installs OpenMC with support for DAGMC.
-
PyNE (Nuclear Engineering Toolkit) Installation: PyNE is a Python package for nuclear engineering and data processing. It provides various functionalities, including nuclear data, geometry processing, and more. The script installs PyNE with support for MOAB and DAGMC.
-
Create Program File: The script creates an executable program file (shell script) in the specified installation directory with the given environment name.
-
Add to Path: The script adds the NukeBox directory to the user's
PATH
environment variable.
Once the installation is complete, the script will create a program file named after the specified environment name (e.g., nuke
).
Commands:
-h
or--help
: Display help-V
or--version
: Display versionactivate
: Activate the NukeBox environmentdeactivate
: Deactivate the NukeBox environmentupdate <module>
: Update componentcore
: Update NukeBoxgeant4
: Update Geant4 to the latest versiondagmc
: Update DAGMC to the latest versionopenmc
: Update OpenMC to the latest versionpyne
: Update PyNE to the latest versionall
: Update all components (NukeBox, Geant4, DAGMC, OpenMC, and PyNE)
endf <library>
: Set the path for cross-section data library:endfb70
: ENDF/B-VII.0 (70)endfb71
: ENDF/B-VII.1 (71)lib80x
: ENDF/B-VIII.0/X (80X)
uninstall
: Uninstall the NukeBox toolkit
Usage:
nuke <command> [options]
Note:
- Use
activate
to activate the NukeBox environment. - Use
deactivate
to deactivate the NukeBox environment. - Use
update
with specific components to update them individually. - Use
update all
to update all components. - Use
endf <library>
to set the cross-section data library path. - Use
uninstall
to completely uninstall the NukeBox toolkit.
Examples:
nuke activate
nuke update geant4
nuke update all
nuke endf endfb70
nuke uninstall
The installer script provides a list of recommended Python packages in the packages.txt
file. These packages complement the functionality of the installed software. To install them, use:
nuke activate
pip3 install -r packages.txt --default-timeout=0
Please ensure that you have appropriate permissions to install software on your system. The script may require you to enter your administrator password (sudo) during the installation process.
- The script is primarily designed for systems that use
apt-get
package manager. If your system doesn't supportapt-get
, the installation process may not work as expected. - The script is intended for use with Linux-based systems, and its compatibility with other operating systems (e.g., macOS, Windows) may vary.
- Use the script at your own risk. Always review and understand the code before executing any script on your system.
- Before running the script, make sure to read and understand the installation process, as it may involve modifying your system's settings.
This project is licensed under the MIT License.
The NukeBox program is provided for informational purposes only. The authors and contributors are not responsible for any damages or issues caused by using this script. Use it at your own risk.
Contributions to this project are welcome. If you find any issues or have improvements to suggest, feel free to open a GitHub issue or create a pull request. For more information, check out the CONTRIBUTING page.
For any questions or inquiries, please contact through:
- GitHub: nukehub-dev
- NukeTalk: https://talk.nukehub.org