QEpy requires Python ≥3.8, Quantum ESPRESSO 7.2, NumPy, and f90wrap. MPI parallel builds also need mpi4py.
QEpy is under active development. Non-backward-compatible changes can happen. Clone the latest release often.
The PyPI package installs a serial build. For MPI parallel runs or custom features, install from source.
python -m pip install qepy
-fPICQE must be compiled with position-independent code before building QEpy:
./configure CFLAGS=-fPIC FFLAGS=-fPIC
make all
export qedir=$(pwd)
git clone --recurse-submodules https://github.com/Quantum-MultiScale/QEpy.git
qedir=/path/to/q-e python -m pip install ./QEpy
qedir must be the absolute path to your QE tree (the directory containing make.inc). If unset, the installer may download and compile QE automatically.
For a full source build of QE 7.2 and QEpy (MPI, custom features, HPC clusters), use the build skills in the QEpy repository. These are step-by-step recipes for humans and AI coding assistants. They are not a substitute for pip install qepy, which uses prebuilt wheels and does not require a local QE tree.
Skills live in QEpy/skills/ on the dev branch. Start with the skills README to pick the right file for your system.
Platform skills differ in compilers, MPI, and BLAS setup. The core workflow is the same and is spelled out in common.md:
Choose your platform below, open the matching skill file, and follow it together with common.md.
| Platform | Stack | Skill file |
|---|---|---|
| macOS | Open MPI · Apple Accelerate | qe72_qepy_macos_accelerate_skill.md |
| macOS · oneMKL | Open MPI · Intel oneMKL | qe72_qepy_macos_mkl_skill.md |
| Ubuntu | Intel MPI · oneMKL | qe72_qepy_ubuntu_intel_skill.md |
| Ubuntu · OpenBLAS | Open MPI · OpenBLAS | qe72_qepy_ubuntu_openblas_skill.md |
| RHEL 9 family | Intel MPI · oneMKL | qe72_qepy_rhel9_intel_skill.md |
| RHEL 9 · OpenBLAS | Open MPI · OpenBLAS | qe72_qepy_rhel9_openblas_skill.md |
| Amarel Rutgers HPC |
Intel 18 · SLURM · srun --mpi=pmi2 |
qe72_qepy_amarel_skill.md |
Helper scripts (in skills/):
preflight_macos.sh: check Homebrew, compilers, and which macOS skill to use before a long buildcheck_qepy_venv.sh: verify the virtualenv and that import qepy resolves to the install, not the source treeenv_amarel.sh: environment setup for batch jobs on AmarelPinned versions: QE tag qe-7.2, QEpy branch dev, GCC/GFortran 14, Python 3.10–3.12, f90wrap==0.2.14. Build QE with make all (not just pw.x) and always pass -fPIC.
sudo apt-get update
sudo apt-get install --upgrade -y make git python3-dev python3-pip wget
sudo apt-get install --upgrade -y gcc gfortran libblas-dev liblapack-dev libopenmpi-dev libfftw3-dev
git clone --depth=1 -b qe-7.2 https://gitlab.com/QEF/q-e.git
cd q-e
./configure CFLAGS=-fPIC FFLAGS='-fPIC -fallow-argument-mismatch' MPIF90=mpif90 \
--with-scalapack=no BLAS_LIBS='-lblas' LAPACK_LIBS='-llapack'
make all -j 8
cd ..
git clone --recurse-submodules https://github.com/Quantum-MultiScale/QEpy.git
qedir=$(pwd)/q-e python3 -m pip install -U ./QEpy
./configure \
FFLAGS='-fPIC -fallow-argument-mismatch' \
CFLAGS=-fPIC
./configure \
FFLAGS='-fPIC -fallow-argument-mismatch -ff2c -fno-second-underscore' \
CFLAGS='-fPIC -arch arm64' \
CPP='gcc -E' \
LDFLAGS=-headerpad_max_install_names
git submodule update --init --recursivetddft=yes python -m pip install ./QEpy (uses ce-tddft)configure workflow for QEAfter installation, verify with python -m qepy -h and see the tutorials for your first calculation.