Thanks for your interest in the Psi4NumPy tutorials. The DFT tutorials are still in beta and hopefully we will get to GGA/meta at some point.
V_builder is the name of a function defined in the VV10 and GRAC tutorials and passed to ks_helper.py. If you want to compute V potentials from an arbitrary kernel you can use:
import numpy as np
mol = psi4.geometry("""
scf_e, wfn = psi4.energy("PBE/6-31G", return_wfn=True)
# Grab relevant data
nbf = wfn.nmo()
Vpot = wfn.V_potential()
# Set a density
D = wfn.Da()
# Compute V by passing in a matrix to populate
V = psi4.core.Matrix(nbf, nbf)
Hi, would it be possible to compute V potential from an arbitrary Hermitian complex density matrix? I am having some trouble with the set_D function since it seems that D must be passed as psi4.core.Matrix object. If I define such psi4 Matrix using “from_array” function, any imaginary part will be discarded
Unfortunately none of the code (including our XC evaluator) is able to handle complex values. If you know of a code that can evaluate complex XC derivatives we could probably patch something together however.