Nix-QChem / NixOS-QChem

Nix expressions for HPC/Quantum chemistry software packages
MIT License
79 stars 17 forks source link
computational-chemistry hpc nix quantum-chemistry

built with nix DOI:10.1002/qua.26872

NixOS-QChem

Nix expressions for HPC/Quantum chemistry software packages.

The goal of this project is to integrate software packages into nixos to make it suitable for running it on a HPC cluster. It provides popular quantum chemistry packages and performance optimization to upstream nixpkgs.

Available Packages

A list packages can be found here: Package list

Citation

The design and packaging approach of the overlay are published here: M.Kowalewski, P. Seeber, Int. J. Quantum. Chem., e26872 (2022)

If you have used NixOS-QChem to perform calculation please cite the above mentioned paper with the following sentence. This enable others to reproduce your calculations by using the same computational environment.

All calculation have been performed using a reproducible environment using the
Nix package manager together with NixOS-QChem (commit <10 digits of SHA-1>) [1].

[1] M.Kowalewski, P. Seeber, Int. J. Quantum. Chem., e26872 (2022).

Usage

Overlay

The repository comes as a nixpkgs overlay (see Nixpkgs manual for how to install an overlay). The contents of the overlay will be placed in an attribute set under nixpkgs (default qchem). The original, but overridden nixpkgs will be placed in qchem.pkgs. This allows for composition of the overlay with different variants.

There is a branch (release-XX.XX) for every stable version of nixpkgs (nixos-XX.XX).

examples/pinned-project-shell/shell.nix and examples/jupyter/shell.nix also contain examples how to compose a package set and define an environment with packages from the overlay.

Channel

Via release.nix a nix channels compatible nixexprs tarball can be generated: nix-build release.nix -A qchem.channel If you have set a different cfg.prefix/NIXQC_PREFIX adapt the expression to match the chosen subset name.

NUR

The applications from the overlay are also available via Nix User Repository (NUR) (qchem repo). Access via e.g.: nix-shell -p nur.repos.qchem.<package name>.

Binary cache

The latest builds for the master branch and stable version are stored on Cachix:

If you are allowed to add binary substituters (as trusted user), you may simply add it with nix-shell -p cachix --run "cachix use nix-qchem".

Configuration

The overlay can be configured either via an attribute set or via environment variables. If no attribute set is given the configuration the environment variables are automatically considered (impure).

Special Installation Instructions

Q-Chem

The Q-Chem version 5.{1..4} are packaged. Download the Linux binaries with all options enabled for your respective version at https://www.q-chem.com/install/#linux. Q-Chem is evaluated in two steps to obtain a valid license, after the installer has run.

  1. Build the installer nix-build -A qchem.q-chem-installer. This will install Q-Chem into the store and prepare a preliminary license.data file, and prepare a script, that helps you to obtain the final license.data. The qchem.q-chem-installer.getLicense attribute (available as ./result/bin/q-chem_prep_license) requires the following environment variables

    • $QCHEM_NODES: a space-separated list of nodes, for which a Q-Chem license should be obtained. All nodes must be reachable via MPI.
    • $QCHEM_MAIL: the e-mail address associated with the Q-Chem license. The license file will be sent to this address by Q-Chem.
    • $QCHEM_ORDNUM: the order number for Q-Chem.

      After these variables have been set, run ./result/bin/q-chem_prep_license. You should now have ./license.data. Send this file via mail to license@q-chem.com.

  2. After you have received your license file from license@q-chem.com, point $NIXQC_LICQCHEM or licQChem to this file. The qchem.q-chem attribute can be used normally, now; i.e. nix-build -A qchem.q-chem.

Configuration via nixpkgs

Configuration options can be set directly via config.qchem-config alongside other nixpkgs config options.

Configuration via environment variables

The overlay will check for environment variables to configure some features: