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.
A list packages can be found here: Package list
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).
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.
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.
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>
.
The latest builds for the master branch and stable version are stored on Cachix:
- Cache URL: https://nix-qchem.cachix.org
- Public key: nix-qchem.cachix.org-1:ZjRh1PosWRj7qf3eukj4IxjhyXx6ZwJbXvvFk3o3Eos=
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"
.
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).
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.
-
Build the installer
nix-build -A qchem.q-chem-installer
. This will install Q-Chem into the store and prepare a preliminarylicense.data
file, and prepare a script, that helps you to obtain the finallicense.data
. Theqchem.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 tolicense@q-chem.com
. -
After you have received your license file from
license@q-chem.com
, point$NIXQC_LICQCHEM
orlicQChem
to this file. Theqchem.q-chem
attribute can be used normally, now; i.e.nix-build -A qchem.q-chem
.
Configuration options can be set directly via config.qchem-config
alongside other nixpkgs config options.
allowEnv
: Allow to override the configuration from the environment (default false whenconfig.qchem-config
is used).prefix
: The packages of the overlay will be placed in subset specified byprefix
(defaultqchem
).srcurl
: URL for non-free packages. If set this will override therequireFile
function of nixpkgs to pull all non-free packages from the specified URLoptpath
: Path to packages that reside outside the nix store. This is mainly relevant for Gaussian and Matlab.licMolpro
: Molpro license token string required to run molpro.optArch
: Set gcc compiler flags (mtune
andmarch
) to optimize for a specific architecture. Some upstream packages will be overridden to use make use of AVX (seenixpkgs-opt.nix
). Note, that this also overrides the stdenvuseCuda
: Uses Cuda features in selected packages.licQChem
: Path to a Q-Chem license file as obtained via mail.
The overlay will check for environment variables to configure some features:
NIXQC_PREFIX
NIXQC_SRCURL
NIXQC_OPTPATH
NIXQC_LICMOLPRO
NIXQC_AVX
: seeoptAVX
, setting this to 1 corresponds totrue
.NIXQC_OPTARCH
NIXQC_CUDA
: seeuseCuda
, setting this to 1 corresponds totrue
.NIXQC_LICQCHEM
: seelicQChem