Instructions

Requirements

Posidonius requires Rust and Python installed in your system (Linux/OSX/Windows WSL):

  • Rust: The simplest way to install Rust is to run rustup from command line: curl https://sh.rustup.rs -sSf | sh. Once installed, rust toolchain can be upgraded to the latest version by running rustup update.
  • Python: Most linux distribution already include Python, but if the user needs to install its own version then Anaconda Python is a good option. Just download Anaconda Python 3.7 64-Bit installer from the command line.

Download

Posidonius can be downloaded from github:

Installation

First, install the N-body simulator by running from the current directory:

cargo install --path . --force

The executable will be copied into $HOME/.cargo/bin/. Then, you need to download the models data, either from the input data linked to the Posidonius github release or the latest, for instance:

wget https://www.cfa.harvard.edu/~sblancoc/posidonius/input.tar.gz
tar -zxvf input.tar.gz
rm -f input.tar.gz

A directory named input/ should now exist in your Posidonius directory. Now you can install the Posidonius python package to create cases by running one of these three options:

  • Install locally using a virtual python environment (you will need to remember to source the activate script every time you open a new window):
python -m venv venv
source venv/bin/activate
python setup.py install
  • Install locally for your user (e.g., $HOME/.local/lib/python3.7/site-packages/):
python setup.py install --user
  • Install globally for all the users in the system (may require administrator access):
python setup.py install

Uninstall

Both parts of Posidonius can be uninstalled by executing:

cargo uninstall posidonius
python setup.py install --user --record files.txt
cat files.txt | xargs rm -rf && rm -f files.txt

The python part will not require the flag --user if you picked the global installation. Or if you chose the python virtual environment, it would be enough to deactivate the environment (execute deactivate) and remove the venv/ directory.