AlexanderMath
AlexanderMath
Thanks for taking the time to dive into the code Anthony! :) **My take:** We should change default to an interesting use-case that has 10^3 iterations (e.g. like this [video](https://github.com/graphcore-research/pyscf-ipu/blob/main/nanoDFT/h2o.gif),...
No reason, `sto3g` default sounds reasonable for initial playing around with code. We probably removed a few memory optimizations from nanoDFT in favor of simplicity, hence the OOM. Did anyone...
Added the following to both `density_functional_theory.py` and `nanoDFT.py` so it caches by default. ``` os.environ['TF_POPLAR_FLAGS'] = """--executable_cache_path=/tmp/ipu-pyscf-cache/""" ``` Note: The computational graph shouldn't change between molecules with the same number...
**Note:** If we use autodiff/`jax.grad` we need to store "activations" during `jax.lax.fori_loop(0, opts.its, nanoDFT_iteration, ..)`. We might use [jax.checkpoint](https://jax.readthedocs.io/en/latest/_autosummary/jax.checkpoint.html) to only store `density_matrix` of shape `(N,N)` in each iteration, and...
Another implementation (thanks to @paolot-gc) https://github.com/erikkjellgren/SlowQuant/blob/master/slowquant/molecularintegrals/electronrepulsion.py
Another implementation (watch our for license) https://github.com/theochem/gbasis
> a way to compute log-determinants cheaply. Perhaps I'm misunderstanding. Isn't `log det(M) = sum_i lg( eigh[i] )` so eigenvalues are sufficient?
Sorry. I meant to say `eigh_tridiagonal(M, eigvals_only=True)` instead of `eigh`; that is, only compute eigenvalues using tridiagonal structure. For a tridiagonal matrix you can compute the log determinant as ```...
Even `jax.grad(lg(det(M))` doesn't require eigenvectors only inverse (see section 2.1.4 or eq 57 in the [matrix cookbook](https://www.math.uwaterloo.ca/~hwolkowi/matrixcookbook.pdf)).
for others just do this and it'll work ``` conda create -n boltz_py311 python=3.11 conda activate boltz_py311 pip install boltz ```