-
Notifications
You must be signed in to change notification settings - Fork 16
Installation
Jon Drobny edited this page Nov 8, 2022
·
42 revisions
Without optional features, RustBCA should compile with one command using rustup/cargo on Windows, MacOS, and Linux systems. HDF5 and rcpr
, the Adaptive Chebyshev Proxy Rootfinder with Automatic Subdivision and Polynomial Rootfinder package, work on Linux with some dependencies, listed below. HDF5 has been tested on Windows, but HDF5 1.10.6 must be used. rcpr
has not yet been successfully compiled on Windows. However, it can be compiled on Windows Subsystem for Linux (WSL) and likely on Ubuntu for Windows or Cygwin.
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, may require the following to be installed, depending on the system:- gcc
- build-essential
- cmake
- gfortran
- liblapack-dev
- libblas-dev
- liblapacke-dev
- 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 Python toml library from source, because the current version on PyPi doesn't include the numpy encoder/decoder.
git clone https://github.com/uiri/toml.git
cd toml
python3 setup.py install
- Optional: Build RustBCA with optional dependencies: python bindings, hdf5, and/or rcpr (with your choice of backed: openblas, netlib, or intel-mkl):
cargo build --release --features cpr_rootfinder_netlib,hdf5_input
cargo build --release --features cpr_rootfinder_openblas,hdf5_input
cargo build --release --features python
- Optional:
cargo test --features cpr_rootfinder_*
will run all required and optional tests for desired backend *