-
Notifications
You must be signed in to change notification settings - Fork 17
Installation
Jon Drobny edited this page Apr 17, 2025
·
46 revisions
Without optional features, RustBCA should compile with one command using rustup/cargo on Windows, MacOS, and Linux systems. HDF5 has been tested on Windows, but HDF5 1.10.6 must be used.
Manual Dependences:
- rustup, the Rust toolchain (includes cargo, the Rust package manager, rustc, the Rust compiler, and more).
Automatic Dependencies:
- see Cargo.toml for a complete list
Installation instructions (on most systems) After installing rustup:
git clone https://github.com/lcpp-org/RustBCA
cd RustBCA
cargo build --release
Optional Dependencies (I recommend you start without these until you know you need them):
- HDF5 libraries
-
rcpr
: https://github.com/drobnyjt/rcpr the CPR and polynomial rootfinder, required for using attractive-repulsive interaction potentials such as Lennard-Jones or Morse - Python 3.6+
- Numpy, Matplotlib, toml, Shapely, scipy
- Install curl,
apt-get install curl
- Install rustup, the Rust toolchain (includes rustc, the compiler, and cargo, the package manager) from https://rustup.rs/, by running:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
and following onscreen instructions - Build RustBCA:
git clone https://github.com/lcpp-org/rustBCA
cd rustBCA
-
cargo build --release
will build the code with optimizations intarget/release/
- input.toml is the default input file -- see Usage for more information
-
cargo test
will run all required tests -
cargo run --release examples/layered_geometry.toml
will run a basic simulation of 2 keV helium on a layered TiO2-Al-Si target.
- Optional: install Python 3.6+ (this comes natively in Ubuntu 18.04) for manipulating input files
- Optional: Install pip for Python-3,
apt-get install python3-pip
to install the Python package manager - Optional: Install Python libraries for making/manipulating rustbca input files,
python3 -m pip install numpy matplotlib shapely scipy
- Optional: Install toml library:
python3 -m pip install toml
- Optional: Build RustBCA with optional dependencies: python bindings, hdf5, and/or rcpr:
cargo build --release --features hdf5_input
cargo build --release --features cpr_rootfinder
cargo build --release --features python
- Optional:
cargo test --features cpr_rootfinder
will run all required and optional tests for CPR and polynomial rootfinder
Click Pages above to see all pages in the Wiki.
This page is a work in progress.