Skip to content

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.

Installation

Manual Dependences:

  • rustup, the Rust toolchain (includes cargo, the Rust package manager, rustc, the Rust compiler, and more).

Automatic Dependencies:

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

Instructions for Ubuntu 18.04 LTS:

  1. Install curl, apt-get install curl
  2. 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
  3. Build RustBCA:
  • git clone https://github.com/lcpp-org/rustBCA
  • cd rustBCA
  • cargo build --release will build the code with optimizations in target/release/
  1. input.toml is the default input file -- see Usage for more information
  2. cargo test will run all required tests
  3. cargo run --release examples/layered_geometry.toml will run a basic simulation of 2 keV helium on a layered TiO2-Al-Si target.

Optional dependencies

  1. Optional: install Python 3.6+ (this comes natively in Ubuntu 18.04) for manipulating input files
  2. Optional: Install pip for Python-3, apt-get install python3-pip to install the Python package manager
  3. Optional: Install Python libraries for making/manipulating rustbca input files, python3 -m pip install numpy matplotlib shapely scipy
  4. Optional: Install toml library:
python3 -m pip install toml
  1. 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
  1. 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.

Start Here

Home page

Installation

Selected Benchmarks

Frequently Asked Questions

FAQ

This page is a work in progress.

Using the Standalone Code

Input Files

Output Files

Error Messages

Interaction Potentials

Standalone Code Examples

Layered Targets

2D Geometry

Spherical Geometry

3D Geometry

Gaseous Targets

Multiple Interaction Potentials

Output Histograms

Bindings

Python

C/C++

Fortran

Clone this wiki locally