The overall goal of the Psi4NumPy project is to provide an interactive quantum chemistry framework for reference implementations, rapid prototyping, development, and education. To do this, quantities relevant to quantum chemistry are computed with the Psi4 electronic structure package, and subsequently manipulated using the Numerical Python (NumPy) package. This combination provides an interface that is both simple to use and remains relatively fast to execute.
A series of short scripts demonstrating the implementation of Hartree-Fock Self-Consistent Field, SCF Response, Møller-Plesset Perturbation Theory, Symmetry-Adapted Perturbation Theory, Coupled Cluster Theory, and more are provided for the reference of the quantum chemistry community at large to facilitate both reproducibility and low-level methodological understanding. Additionally, the Tutorials folder above represents an interactive educational environment containing modules discussing the theory and implementation of various quantum and computational chemistry methods. By leveraging the popular Jupyter Notebook application, each tutorial is constructed as hybrid theory and programming in an easy to use interactive environment, removing the gap between theory and implementation.
If you have comments, questions, or would like to contribute to the project please see our contributor guidelines.
- Obtain required software
- Psi4NumPy (clone this repository; no install available)
- Psi4
- Option 1 (easiest): Download installer and install according to instructions.
# Have Psi4conda installer (http://psicode.org/downloads.html) >>> bash psi4conda-{various}.sh # Check `psi4` command in path; adjust path if needed # **IF** using DFT tutorials, >>> conda update psi4 -c psi4/label/dev
- Option 2 (easy): Download Conda package according to instructions
# Have Anaconda or Miniconda (https://conda.io/miniconda.html) >>> conda create -n p4env psi4 -c psi4 >>> bash >>> source activate p4env # Check `psi4` command in path; adjust path if needed # **IF** using DFT tutorials, >>> conda update psi4 -c psi4/label/dev
- Option 3 (medium): Clone source and compile according to instructions
# Get Psi4 source >>> git clone https://github.com/psi4/psi4.git >>> git checkout v1.1 >>> cmake -H. -Bobjdir -Doption=value ... >>> cd objdir && make -j`getconf _NPROCESSORS_ONLN` # Find `psi4` command at objdir/stage/<TAB>/<TAB>/.../bin/psi4; adjust path if needed # **IF** using DFT tutorials, >>> git checkout master # `make` again
- Option 1 (easiest): Download installer and install according to instructions.
- Python 2.7+ (incl. w/ Psi4 Options 1 & 2)
- NumPy 1.7.2+ (incl. w/ Psi4 Options 1 & 2)
- Scipy 0.13.0+
- Enable Psi4 & PsiAPI
- Find appropriate paths
>>> psi4 --psiapi-path export PATH=/path/to/dir/of/python/interpreter/against/which/psi4/compiled:$PATH export PYTHONPATH=/path/to/dir/of/psi4/core-dot-so:$PYTHONPATH
- Export relevant paths
>>> bash >>> export PATH=/path/to/dir/of/python/interpreter/against/which/psi4/compiled:$PATH >>> export PYTHONPATH=/path/to/dir/of/psi4/core-dot-so:$PYTHONPATH
- Find appropriate paths
- Run scripts as conventional Python scripts
- Example: Run
DF-MP2.py
>>> python psi4numpy/Moller-Plesset/DF-MP2.py
- Example: Run
New users can follow the Getting Started notebook or the PsiAPI documentation for an introduction to running Psi4 within the PsiAPI.
A tutorial that covers the basics of NumPy can be found here.
This repository contains
- reference implementations, which provide working Python scripts implementing various quantum chemical methods, and
- interactive tutorials, which provide Jupyter notebooks presenting a hybrid theory-and-implementation educational framework for learning to program quantum chemistry methods.
Reference implementations are organized into top-level directories corresponding to the over-arching theory upon which each method is based, i.e., both EOM-CCSD and TD-CCSD are contained in the Coupled-Cluster directory. All interactive tutorials are contained in the top-level directory Tutorials. These tutorials are organized in logical order of progression, which is enumerated in detail here.
This repostitory has recently been updated to be compatible with Psi4 version 1.1.
Please see the v1.0
branch for a Psi4 v1.0 compliant Psi4NumPy version.