The momentGW code is a Python package for performing calculations within the GW approximation, along with other associated methods, using moment-conserving solutions to the Dyson equation.
A diverse range of self-consistent schemes are available, along with dTDA and dRPA polarizabilities, unrestricted and/or periodic boundary conditions, tensor hypercontraction, optical excitations, and more.
The momentGW package, along with dependencies, can be installed as
git clone https://github.com/BoothGroup/momentGW.git
cd momentGW
python -m pip install . --userThe momentGW solvers are built on top of the PySCF package, and the classes behave similarly to other post-mean-field method classes in PySCF, e.g.:
from pyscf import gto, scf
from momentGW import GW
mol = gto.M(atom="H 0 0 0; Li 0 0 1.64", basis="6-31g")
mf = scf.RHF(mol).run()
gw = GW(mf)
gw.kernel(nmom_max=3)The examples directory contains more detailed usage examples.
The methods implemented in this package have been described in the following papers:
The data presented in the publications can be found in the benchmark directory.
Contributions are welcome, and can be made by submitting a pull request to the master branch.
The code uses NumPy-style docstrings and is formatted using ruff.
The package includes pre-commit hooks to apply these formatting rules.
To install the necessary packages for development, install the package with the dev extra:
python -m pip install .[dev] --user