Skip to content

tjz21/DFT_PIB_Code

Repository files navigation

Opening the Density-Functional Theory Black Box


'It is nice to know that the computer understands the problem. But I would like to understand it too.'

- Eugene Wigner


Documentation Status Python 3.10 License: MIT Latest Release ChemRxiv DOI:<10.1021/acs.jchemed.3c00535>

This repository contains three Google Colab notebooks that are designed to facilitate understanding of Density-Functional Theory (DFT) through interactive visualizations. Our motivation for developing this software stems from the knowledge deficiency that is often produced from using DFT as a black box in commercial software. By applying DFT to the familiar particle in a box model system employing a real-space grid basis, we hope to have reduced DFT to its fundamental essence fit for pedagogy. Brief instructions for executing the code are provided at the beginning of each notebook and a problem sheet for getting started is attached. The notebooks can be accessed without any installation through Google Colab by simply clicking on the links and signing in with a Google account (offline alternative is provided here). Python programming knowledge is not required, and docs are hosted through ReadTheDocs.


Notebook 1–Particle in a 3D Box

In this notebook, we’ll consider the particle in a three-dimensional box system treated in any undergraduate physical chemistry textbook. High-quality energy level diagrams and isosurface renderings of the wavefunction can be generated from user-specified box lengths. Depicted here is the 321 state of an anthracene-like box of dimensions 16 x 8 x 3 Bohr.

Click here to open the notebook in Google Colab:

Open In Colab






Notebook 2–PAH Frontier Orbitals

Next, we’ll look at a real chemical system in the form of polycyclic aromatic hydrocarbons (PAHs). We can perform Hartree-Fock/STO-3G calculations to find the shapes and energies of their frontier molecular orbitals, which can make for interesting comparisons with the analogous results from Notebook 1.

Open In Colab



Notebook 3–Density-Functional Theory

Finally, we’ll reconsider the system from Notebook 1, but now we’ll turn on electron-electron interaction through the Kohn-Sham potential. We’ll consider each term of the single-particle Hamiltonian and put everything together into a self-consistent field (SCF) DFT calculation. We can then analyze the how the density and eigeneneriges change as a function of SCF iteration number. LDA and PBE are the available exchange-correlation functionals.

Full theory notebook:

Open In Colab


Abbreviated notebook with the DFT calculator and analysis tools:

Open In Colab



Citation

If you would like to cite this work, please refer to the following publication (BibTeX):

Hirschi, J. S.; Bashirova, D.; Zuehlsdorff, T. J. Opening the Density Functional Theory Black Box: A Collection of Pedagogic Jupyter Notebooks. J. Chem. Educ. 2023, 100 (11), 4496-4503. https://doi.org/10.1021/acs.jchemed.3c00535