3. Installation via Nix

An easy and reliable way to get a complete pysisyphus installation, including additional quantum chemistry (QC) codes, is possible through the Nix package manager. Required Nix files for the QC codes and their dependencies (linear algebra & MPI libraries etc.) are provided by the NixOS-QChem overlay.

Nix installations are fully reproducible and extremely simple to accomplish for any potential pysisyphus user, as most of the necessary configuration is already described in the respective Nix files.

The Nix Pills series provides an informative introduction to the general concepts behind Nix.

Recent stable versions of pysisyphus are also directly included in NixOS-QChem. If you do not require a development version of pysisyphus, using the NixOS-QChem overlay is the preferred option. Otherwise, continue with the instructions below.

3.1. Prerequisites

Please follow the installation instructions in the nix manual to set up a working Nix installation on your system. You may want to enable the flakes and nix-command features for Nix.

3.2. Caching

The build time can be reduced drastically, if the quantum chemistry codes are fetched from a binary cache.

Pysisyphus provides a binary cache on Cachix.

Nix >= 2.6.0 with flakes directly supports the binary cache without further action required.

Alternatively, if you are allowed to add binary caches in nix, you may simply execute:

nix run nixpkgs#cachix use pysisyphus

3.3. Usage

You may use pysisyphus directly via Flakes without cloning any repository or local installation. Some examples how to use pysisyphus with nix:

Inspect the structure of pysisyphus' flake:

nix flake show github:eljost/pysisyphus

Directly run the pysis command on an input :

nix run github:eljost/pysisyphus input.yml

Start an interactive shell with a pysisyphus installation

nix shell github:eljost/pysisyphus

For developing and hacking pysisyphus and for legacy Nix commands, first lone the pysisyphus repository

git clone https://github.com/eljost/pysisyphus.git && cd pysisyphus

You may obtain a development shell for pysisyphus via

nix develop

build pysisyphus in the legacy nix style

nix-build ./nix/default.nix

or obtain a development legacy-style dev-shell

nix-shell ./nix/shell.nix

The Flake also offers options to build pysisyphus with proprietary components such as ORCA or Turbomole, e.g.

nix run .#pysisyphusOrca

or build singularity or docker containers:

nix bundle --bundler .#toSingularityImage