Installation Guide

This guide covers installation of gauNEGF and its dependencies.

Prerequisites

  • Gaussian Development Version (gauNEGF drives Gaussian through its Python interface)

  • gauopen 3.0 Python interface for Gaussian

  • Python 3.7 or higher

  • NumPy 1.26 or lower (for gauopen 3.0 compatibility)

  • SciPy, Matplotlib

  • JAX (for JIT compilation and GPU support)

  • threadpoolctl 3.1 or higher (caps the host BLAS threads during the density step; installed automatically by pip install -e .)

Installation Steps

  1. Install Python Dependencies

    pip install "numpy<=1.26" scipy matplotlib jax "threadpoolctl>=3.1"
    

    To install JAX with GPU support, you will need to install CUDA and also install the [cudaXX] extra, where XX is the CUDA version you are using (e.g. [cuda12] for CUDA 12).

    pip install "jax[cuda12]"
    

Environment Setup

  1. Ensure Gaussian is installed and properly licensed

    • Follow Gaussian installation guide for your system

    • Set up required environment variables

    • Test Gaussian installation

  2. Set the required environment variables:

    export GAUSSIAN_DIR=/path/to/gaussian
    export GAUSS_SCRDIR=/path/to/scratch
    

    Note: to use CUDA with JAX you may need to unset the LD_LIBRARY_PATH environment variable before running Python:

    unset LD_LIBRARY_PATH
    
  3. Set up gauopen by running make -f qc.make in the gauopen directory, and make the gauopen directory importable (import gauopen must work).

Installing gauNEGF

Clone the repository and install:

git clone https://github.com/wliverno/GauNEGF.git
cd GauNEGF
pip install -e .

pip install -e . installs the Python dependencies listed in setup.py (numpy, scipy, matplotlib, jax, threadpoolctl). gauopen is not on PyPI and must be installed separately (step 3 above).

Verification

Test the installation by first creating a Gaussian input file, for example ‘H2.gjf’:

%chk=H2.chk
#p b3lyp/6-31g(d,p)

H2 molecule for NEGF-DFT

0 1
H    0.000000    0.000000    0.000000
H    0.000000    0.000000    0.7414

Then you can run the following code to test the installation:

from gauNEGF.scf import NEGF

# Initialize NEGF object
negf = NEGF(fn='H2', func='b3lyp', basis='6-31g(d,p)')

This will initialize the NEGF object by reading from the checkpoint file or running a new SCF in Gaussian.