Can either install all required packages onto your env or use a singularity image (directions below Using Singularity (Build) and Slurm with singularity). If installing into your env, use the following command and run using Run Example
pip install -e .
run the h3.py config for 300 QMC steps
spinornet --config='./spinornet/configs/h3.py' --config.optim.iterations=300
We need to first build the image on a machine where docker and singualrity are both available. root permission is not required, but typically you need to be added to a docker user group by your cluster admin to be able to build a docker image (see here and here).
The first step is to run a Docker container registry that sets up a local docker image registry at localhost:5000:
docker run -d -p 5000:5000 --restart=always --name registry registry:2Then, build the docker image from Dockerfile. Log outputs are available at docker_build.log:
docker build -t localhost:5000/spinornet --progress=plain . &> docker_build.logPush the image to localhost:5000.
docker push localhost:5000/spinornetTo test your docker
docker run --name spinornet_test -dt --gpus all --mount type=bind,source=./,target=/home/spinornet localhost:5000/spinornetdocker exec -it spinornet_test /bin/bashThe next step builds the singularity image. The singularity image is pretty large (~6G) so it is recommended that you build it at a non-backed-up folder on the cluster, typically some kind of scratch folder.
SINGULARITY_NOHTTPS=true singularity build spinornet.sif docker://localhost:5000/spinornet:latestWe can now safely remove the registry container.
docker container stop registry && docker container rm registrysingularity exec --no-home --nv --bind .:/home/spinornet --pwd /home/spinornet $SCRATCH/spinornet.sif /bin/bash -c \
&& 'python run_spinornet.py --config=./spinornet/configs/h3.py --config.optim.iterations=300'For testing/analysis, can open a vscode remote with singularity. Suggest to follow the instructions here: here. When that is setup, you can open an ipynb, click Select Kernel. For the first time "selecting kernel", will need to "install suggested extensions Python + Jupyter". After installation, click on "select kernel" again and should be able to select the singularity python.
This repository contains code for the paper https://pubs.acs.org/doi/abs/10.1021/acs.jctc.5c01243. If you find this code useful, please cite the paper:
@article{zhan-2025-expres-deter,
author = {Ni Zhan and William A. Wheeler and Gil Goldshlager
and Elif Ertekin and Ryan P. Adams and Lucas
K. Wagner},
title = {Expressivity of Determinantal Ansatzes for Neural
Network Wave Functions},
journal = {Journal of Chemical Theory and Computation},
volume = 21,
number = 19,
pages = {9612-9619},
year = 2025,
doi = {10.1021/acs.jctc.5c01243},
url = {http://dx.doi.org/10.1021/acs.jctc.5c01243},
}