pyGWBSE is a high-throughtput python workflow package designed to perform automtaed GW-BSE (Bethe-Salpeter Equation) calculation. The pyGWBSE package leverages well known computational tools: pymatgen, atomate, fireworks and first principles software such as: VASP and Wannier90 to perform high-throughput GW-BSE calculations. The workflow creates, computes, analyzes and stores all relevant simulation parameters and results in a queryable MongoDB database that can be accessed through our API. Check out our documentation or the paper!
pyGWBSE package takes input structure of materials and performs GW-BSE simulations for studying excited state properties. It performs automated convergence calculations required to obtain accurate results from such simulations. pyGWBSE uses widely used VASP software to perform first-principles calculations. It uses Wannier90 software to obtain quasiparticle (QP) bandstructure (both the one-shot G0W0 and partially self-consistent GW0 level) using maximally localized wannier functions. The electron and hole effective masses are computed using Sumo package. pyGWBSE is also capable of solving BSE, which calculates absorption spectra of materials that incorporates excitonic effects and is accurate enough to comapre with experimental spectra. In addition to performing excited state property simulations, pyGWBSE also computes several key electronic structure properties of materials such as, orbital resolved density of states (both at DFT and QP level), real and imaginary part of the dielectric function (with and without incorporating electron-hole interaction), the exciton energies, and their corresponding oscillator strengths, band-edges, static dielectric tensors etc.
IMPORTANT NOTE: Atomate and FireWorks do not run on Windows OS. You need a unix-based OS (Mac or Linux) in order for these packages to run. As such, all setup instructions are given for Unix systems.
- Download the repo from the green code icon or via github's clone method.
git clone https://github.com/cmdlab/pyGWBSE.git
- Install pyGWBSE in a clean enviromnent using python=3.9. I suggest using Anaconda3 to manange environments.
conda create --name pygwbse python=3.9
- Activate the pyGWBSE environment and run the line below in the pyGWBSE directory to install:
pip install -r requirements.txt
- After installation, pyGWBSE needs to be added to your python path. This can be done by running the first line below OR by adding the 2nd line listed below to your .bashrc file. Only necessary if python cannot find the package or the setup.py failed for some reason.
python setup.py develop
orpython setup.py install
export PYTHONPATH="$HOME/path_to_package/pyGWBSE:$PYTHONPATH"
- If this is your first time installing the package dependencies listed below, please ensure you have followed the respective setup instructions:
- To run jupyter notebooks on various resources the ipykernel has to be installed. Sometimes this isn't enough and you need explicitly add the kernel to the list of environments. Via the command line:
- Activate your environment
conda activate pygwbse
- Install ipykernel
python -m pip install ipykernel
- Add pygwbse kernel
python -m ipykernel install --user --name pygwbse
The pyGWBSE package dependancies have a lot of documentation to look over. I will highlight the essential documentation to get started as quickly as possible.
- atomate requires the most set up. Mainly, creating a directory scaffold and writing the 5 required files to connect to the database and run jobs. (MongoDB or free Atlas MongoDB is required)
- pymatgen has a command line tool installed to set up default directory paths called pmg. There are 2 essential commands you have to run to use pyGWBSE on any system.
- Reference directory for the VASP POTCARs. You need to have the POTCARs from VASP yourself.
pmg config -p <EXTRACTED_VASP_POTCAR> <MY_PSP>
- Default pseudopotential files from VASP
pmg config --add PMG_DEFAULT_FUNCTIONAL PBE_54
- VASP should be installed with Wannier90 support (for more information visit here). We have tested our code with VASP.5.4.4. The VASP execution command should be specified in atomate config file my_fworker.yaml as,
vasp_cmd: "srun --mpi=pmi2 [location of VASP executable] > vasp.log"
- Wannier90 version 3.1.0 should be installed (for more information visit here). The Wannier90 execution command should be specified in the atomate config file my_fworker.yaml as,
- wannier_cmd: "[location of Wannier90 executable] > wannier90"
- Sumo version 2.2.5 should be installed (for more information visit here). The Sumo execution command should be specified in the atomate config file my_fworker.yaml as,
- sumo_cmd: "sumo-bandstats"
To get started using pyGWBSE, various tutorials and examples have been created using Jupyter Notebooks. These notebooks demonstrate the basic functionality of pyGWBSE to enable users to quickly learn how to use the various modules within this package. These can be found under pyGWBSE/examples.
- If you have a new install you likely do not have the gcc compiler that pymatgen requires. In that case run
sudo apt install build-essential
sudo apt-get install manpages-dev
If you use pyGWBSE in your research, please consider citing the paper!
Tathagata Biswas, Arunima K. Singh. pyGWBSE: A high throughput workflow package for GW-BSE calculations. https://arxiv.org/abs/2210.00152