This code is a fork of FermiFlow, extended to 3D molecules with the use of QMCTorch. Note that QMCTorch also needs to be installed to be able to use its orbitals and nuclear potential. The code requires python >= 3.6, <=3.8 and PyTorch 1.8.2 LTS. GPU support is highly recommended. The transformation of electronic coordinates is implemented as a continuous normalizing flow, making use of the differentiable ODE solver torchdiffeq with O(1) memory consumption.
Run python src/Fermion_3D_base.py --help
to check out the available parameters and options for the zero-temperature variational Monte Carlo (VMC) code of a 3D molecule. Below is a simple example:
python src/Fermion_3D_base.py --molecule 'He 0 0 0' --nup 1 --ndown 1 --batch 2000 --iternum 1000 --cuda 0
The backflow transformation consists of two potentials, which are each represented by a MLP with one hidden layer of 50 nodes. In the file src/Fermion_3D_base.py (lines 88 and 93), the MLP architectures can be adjusted. As of now this cannot be done through the options. Due to current limititations of QMCTorch, only equal number of spin-up and spin-down electrons are allowed.
Clone the repository and install the code from source:
git clone https://github.com/NLESC-JCER/fermiflow-qmctorch/
cd fermiflow-qmctorch
pip install -e ./
For QMCTorch:
git clone https://github.com/NLESC-JCER/QMCTorch/
cd qmctorch
pip install -e ./