Python 3.7 script that uses networkx
this script is part of the public domain
CC0 1.0 Universal (CC0 1.0)
Author: Markus Penz (2021)
This code has evolved into a small library with a lot of additional features called qmodel.
Scripts used for M. Penz and R. van Leeuwen, Density-Functional Theory on Graphs, J. Chem. Phys. 155, 244111 (2021) (arxiv link)
defining a many-particle graph Hamiltonian with scalar_potential, peierls_phase, and interaction_potential
calculating eigensystem, including ground-state energy, density, and current
display graph and associated fermionic graph
Scripts used for M. Penz and R. van Leeuwen, Geometrical Perspective on Spin-Lattice Density-Functional Theory (2024) (arxiv link)
scripts-perspective-spin-lattice.zip
creates the plots for the Anderson impurity model and the densities of randomly chosen potentials on the tetrahedron graph, also includes two Mathematica notebooks