Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main in dev #164

Merged
merged 152 commits into from
Nov 24, 2023
Merged
Changes from 1 commit
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
cff5770
Update LICENSE
NicoRenaud Apr 6, 2022
48e204b
hrv 0.27
NicoRenaud Apr 6, 2023
2848b3a
remove np deprecation warning supression
NicoRenaud Apr 6, 2023
e16db65
add libstd
NicoRenaud Apr 6, 2023
ccb3117
install mpi
NicoRenaud Apr 6, 2023
e340f84
remove 3.7
NicoRenaud Apr 6, 2023
99dd8b8
remove autograd.F
NicoRenaud Apr 6, 2023
17f62e4
simplify build
NicoRenaud Apr 6, 2023
55b1c6d
fix pip install
NicoRenaud Apr 6, 2023
38c5737
add libstdcxx
NicoRenaud Apr 6, 2023
129d7d9
Merge pull request #140 from NLESC-JCER/fix_master_23
NicoRenaud Apr 6, 2023
3a0166f
first draft of the paper
NicoRenaud Apr 11, 2023
07cdbfc
added picture
NicoRenaud Apr 11, 2023
a00e3ba
add workflow
NicoRenaud Apr 11, 2023
c2e6570
add workflow
NicoRenaud Apr 11, 2023
bf68aff
add workflow
NicoRenaud Apr 11, 2023
4f09d77
add workflow
NicoRenaud Apr 11, 2023
dc55f1e
add workflow
NicoRenaud Apr 11, 2023
8febc8d
add workflow
NicoRenaud Apr 11, 2023
744b042
add workflow
NicoRenaud Apr 11, 2023
80fe96b
add workflow
NicoRenaud Apr 11, 2023
647ee83
fix figure
NicoRenaud Apr 11, 2023
4f9afb7
add workflow
NicoRenaud Apr 11, 2023
43416e2
Merge branch 'paper' of https://github.com/NLESC-JCER/QMCTorch into p…
NicoRenaud Apr 11, 2023
b168405
new picture
NicoRenaud Apr 11, 2023
fee089a
draft paper
NicoRenaud Apr 11, 2023
3bb1fd0
Merge branch 'paper' of https://github.com/NLESC-JCER/QMCTorch into p…
NicoRenaud Apr 11, 2023
21bd08d
draft
NicoRenaud Apr 11, 2023
870ac4b
Add files via upload
NicoRenaud Apr 11, 2023
c4f0216
draft paper
NicoRenaud Apr 11, 2023
469e174
draft paper
NicoRenaud Apr 12, 2023
e394fe9
added qmc pic
NicoRenaud Apr 12, 2023
b4278d9
added 1min intro
NicoRenaud Apr 12, 2023
9a98d6b
doc
NicoRenaud Apr 12, 2023
1e0ea82
fix list of tensor in hdf5_utils
NicoRenaud Apr 12, 2023
93e8d7b
fixed opt example
NicoRenaud Apr 12, 2023
1c69f93
fix optimization example
NicoRenaud Apr 12, 2023
bc07dd0
fix missing variables
NicoRenaud Apr 12, 2023
baa4bab
working on the doc
NicoRenaud Apr 13, 2023
8cf625b
doc
NicoRenaud Apr 14, 2023
4d272b1
added hdf5 for notebooks
NicoRenaud Apr 14, 2023
d1e08eb
move example in docs
NicoRenaud Apr 14, 2023
a5c3181
move pics in docs
NicoRenaud Apr 14, 2023
3faa258
clean figs
NicoRenaud Apr 14, 2023
cf95f0c
clean up doc structure
NicoRenaud Apr 14, 2023
d80fe9c
opt tuto
NicoRenaud Apr 14, 2023
755dca9
added nbsphinx
NicoRenaud Apr 14, 2023
cdab5ab
added requirements for nbshinx
NicoRenaud Apr 14, 2023
999ab6c
allow error nbsphinx
NicoRenaud Apr 14, 2023
60eaf3b
fix horovod tuto
NicoRenaud Apr 14, 2023
a9280a8
clean nb output
NicoRenaud Apr 14, 2023
bd41fec
add ams calculator
NicoRenaud Apr 21, 2023
51efe6d
make bohr possible for adf2023
NicoRenaud Apr 21, 2023
23ab8f2
Merge pull request #142 from NLESC-JCER/adf2023_calc
NicoRenaud Apr 21, 2023
ea32d10
add doc about ams driver
NicoRenaud Apr 21, 2023
6da8180
added scf example
NicoRenaud Apr 21, 2023
85e38b5
merged the adf calcs
NicoRenaud Apr 21, 2023
9da7f8e
versionning
NicoRenaud Apr 21, 2023
2aa6904
improves docstring
NicoRenaud Apr 23, 2023
896f8cd
fixed matj in docstring
NicoRenaud Apr 24, 2023
46b8041
rename solvers
NicoRenaud Apr 24, 2023
ed02189
fixed adf calc for extra basis in 2020+
NicoRenaud Apr 24, 2023
b62d802
doc for wave functions
NicoRenaud Apr 24, 2023
5876efa
doc for wave functions
NicoRenaud Apr 24, 2023
1818e83
fix fdoc
NicoRenaud Apr 24, 2023
ad7b8f1
fix fdoc
NicoRenaud Apr 24, 2023
7bf5fe5
fix some docstrings
NicoRenaud Apr 25, 2023
5590971
expanded wf explanation
NicoRenaud Apr 25, 2023
9da24a5
clean up some doc
NicoRenaud Apr 25, 2023
e8db1ac
fix math
NicoRenaud Apr 25, 2023
5d01451
fix math
NicoRenaud Apr 25, 2023
ff30b81
rename combined jastrow
NicoRenaud Apr 25, 2023
0da91c1
fix picture
NicoRenaud Apr 25, 2023
1925bf2
fix spelling errors
NicoRenaud Apr 25, 2023
6463a85
fix codacy
NicoRenaud Apr 26, 2023
b64dc6a
fix spelling mistakes
NicoRenaud Apr 26, 2023
c7f3ac2
Merge pull request #141 from NLESC-JCER/paper
NicoRenaud Apr 26, 2023
4f9b9fb
replace codacy badge
NicoRenaud Apr 28, 2023
9c6a2e1
Added DOO for qmc=chem
NicoRenaud May 12, 2023
8fbcfe2
fix paper
NicoRenaud May 12, 2023
6b74ff9
Merge branch 'master' of https://github.com/NLESC-JCER/QMCTorch
NicoRenaud May 12, 2023
56ac662
Update paper.md
NicoRenaud May 13, 2023
9e14b01
Update paper.md
NicoRenaud May 13, 2023
db501c7
Update paper.md
NicoRenaud May 13, 2023
005f76c
Update paper.md
NicoRenaud May 13, 2023
d0a25ca
Update paper.md
NicoRenaud May 13, 2023
2c9e8fc
Update paper.md
NicoRenaud May 13, 2023
439a79e
Merge pull request #144 from NLESC-JCER/NicoRenaud-paper-patch-1
NicoRenaud May 13, 2023
73bb164
fix conversion
NicoRenaud Aug 29, 2023
2274ca6
fix anthony
NicoRenaud Aug 29, 2023
0f96c3a
Update paper.bib
NicoRenaud Aug 29, 2023
68d446c
added references
NicoRenaud Aug 29, 2023
4ab751a
fix bib
NicoRenaud Aug 29, 2023
4bd1f54
Merge pull request #147 from NLESC-JCER/fix_anthony_mol
NicoRenaud Aug 29, 2023
40d136f
Merge pull request #148 from NLESC-JCER/review_paper
NicoRenaud Aug 29, 2023
49a6ed7
fix size issue
NicoRenaud Oct 19, 2023
9938815
check for jastow before resetting params
NicoRenaud Oct 25, 2023
5c27746
clean up get basis
NicoRenaud Oct 25, 2023
d77368e
added rd yaml file
NicoRenaud Oct 25, 2023
23f59b5
added rtdyaml
NicoRenaud Oct 25, 2023
6424cf5
Merge pull request #152 from NLESC-JCER/issue149_docs
NicoRenaud Oct 25, 2023
66fd172
added theme
NicoRenaud Oct 25, 2023
965cf99
removed the rtd yaml
NicoRenaud Oct 25, 2023
775165a
Update README.md
NicoRenaud Oct 25, 2023
3a98e68
horovod install
NicoRenaud Oct 25, 2023
f02c982
Merge pull request #143 from NLESC-JCER/NicoRenaud-codacy
NicoRenaud Oct 25, 2023
07ebf63
add gxx install
NicoRenaud Oct 26, 2023
bee4ff2
added pep517 ignore flag as recommended
NicoRenaud Oct 26, 2023
3034993
install packaging and use pip3
NicoRenaud Oct 26, 2023
e9de5df
downgrade setupools
NicoRenaud Oct 26, 2023
34eab79
remove stdcxx install ...
NicoRenaud Oct 26, 2023
3c24145
install cmake
NicoRenaud Oct 26, 2023
cedc320
upgrade pip
NicoRenaud Oct 26, 2023
01a3631
fix typo
NicoRenaud Oct 26, 2023
764494c
stdxx again
NicoRenaud Oct 26, 2023
38ac3d9
stdcxx
NicoRenaud Oct 26, 2023
0fa2d1f
env var for horovod
NicoRenaud Oct 26, 2023
b906aa5
codacy fix
NicoRenaud Oct 26, 2023
45cc6bf
wheel
NicoRenaud Oct 26, 2023
6069631
install pytorch from pip
NicoRenaud Oct 26, 2023
95609a2
install pytorch from pip
NicoRenaud Oct 26, 2023
a463eac
install pytorch from pip
NicoRenaud Oct 26, 2023
71525f9
remove hvd test
NicoRenaud Oct 26, 2023
273cb08
start fixing inter issue
NicoRenaud Oct 26, 2023
6a4123c
start fixing inter issue
NicoRenaud Oct 26, 2023
77aaddc
fix interpolate
NicoRenaud Oct 26, 2023
53289b4
deprecate integrator
NicoRenaud Oct 26, 2023
c9b9589
reverted to pytorch2.0.0
NicoRenaud Oct 26, 2023
43eaff5
fix ypo
NicoRenaud Oct 26, 2023
54bd7c2
reactivte hrovod test
NicoRenaud Oct 27, 2023
92fe2bb
Merge branch 'master' into issue150_dimensions
NicoRenaud Oct 27, 2023
7f0620a
bumped action version
NicoRenaud Oct 27, 2023
db0b001
Merge pull request #153 from NLESC-JCER/bump_action
NicoRenaud Oct 27, 2023
2851980
Merge pull request #151 from NLESC-JCER/issue150_dimensions
NicoRenaud Oct 27, 2023
209559c
bump version
NicoRenaud Oct 27, 2023
8ced0f9
change log
NicoRenaud Oct 27, 2023
bfabcb0
change log [skip ci]
NicoRenaud Oct 27, 2023
5cfaf74
cast to int
NicoRenaud Nov 11, 2023
33a3d8f
Update qmctorch.rst
NicoRenaud Nov 11, 2023
6bf1788
Update qmctorch.rst
NicoRenaud Nov 11, 2023
1fb6eaa
Update wfopt.ipynb
NicoRenaud Nov 11, 2023
3f6b047
Update geoopt.ipynb
NicoRenaud Nov 11, 2023
fa2af24
removed empty cell
NicoRenaud Nov 11, 2023
6915cb6
Merge pull request #156 from NLESC-JCER/Review-Tony
NicoRenaud Nov 11, 2023
228b440
Merge pull request #155 from NLESC-JCER/issue154_int_norm_orb
NicoRenaud Nov 11, 2023
adede99
Fix DOI
NicoRenaud Nov 13, 2023
5aed134
Merge pull request #157 from NLESC-JCER/Fix-DOI-paper
NicoRenaud Nov 13, 2023
29c5eff
bump version
NicoRenaud Nov 14, 2023
f1e4a53
Update paper.md
NicoRenaud Nov 21, 2023
c7ea891
Update paper.md
NicoRenaud Nov 21, 2023
1787a72
Merge pull request #158 from NLESC-JCER/typo-fix
NicoRenaud Nov 21, 2023
a1b4e11
Added JOSS badge
NicoRenaud Nov 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update paper.md
  • Loading branch information
NicoRenaud authored May 13, 2023
commit 005f76c483d006b0161f3b317578c3e4756752a8
10 changes: 4 additions & 6 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ bibliography: paper.bib

Quantum Monte-Carlo (QMC) simulations allow to compute the electronic structure of quantum systems
with high accuracy and can be parallelized over large compute resources. QMC relies on the variational principle and optimize a wave function ansatz to minimize the total energy of the quantum system. `QMCTorch` expresses this optimization process as a machine learning problem where the wave function ansatz is encoded
in a physically-motivated neural network. The use of `PyTorch` as a backend to perform the optimization, allows
leveraging automatic differentiation to compute the gradients of the total energy w.r.t. the variational parameters
as well as GPU computing to accelerate the calculation. `QMCTorch` supports the use of both Gaussian and Slater type orbitals via interface to popular quantum chemistry packages `pyscf` and `ADF`.
in a physically-motivated neural network. The use of `PyTorch` as a backend to perform the optimization, allows leveraging automatic differentiation and GPU computing to accelerate the development and deployment of QMC simulations. `QMCTorch` supports the use of both Gaussian and Slater type orbitals via interface to popular quantum chemistry packages `pyscf` and `ADF`.


# Statement of need

`QMCTorch` is a Python package using `PyTorch` [@pytorch] as a backend to perform Quantum Monte-Carlo (QMC) simulations, namely Variational Monte-Carlo, of molecular systems. Many software such as `QMCPack`[@qmcpack], `QMC=Chem` [@qmcchem], `CHAMP` [@champ] provide high-quality implementation of advanced QMC methodologies in low-level languages (C++/Fortran). Python implementations of QMC such as `PAUXY` [@pauxy] and `PyQMC` [@pyqmc] have also been proposed to facilitate the use and development of QMC techniques. Large efforts have been made to leverage recent development of deep learning techniques for QMC simulations with for example the creation of neural-network based wave-function ansatz [@paulinet; @ferminet] that lead to very interesting results. `QMCTorch` allows to perform QMC simulations using physically motivated neural network architectures that closely follow the wave function ansatz used by QMC practitioners. Its architecture allows to rapidly explore new functional forms of some key elements of the wave function ansatz. Users do not need to derive analytical expressions for the gradients of the total energy w.r.t. the variational parameters, that are simply obtained via automatic diffentiation. This includes for example the parameters of the atomic orbitals that can be varioationally optimized and the atomic coordinates that allows `QMCTorch` to perform geometry optimization of molecular structures. In addition, the GPU capabilities offered by `PyTorch` combined with the parallelization over multiple computing nodes obtained via `Horovod` [@horovod], allow to deploy the simulations on large heterogenous computing architectures. In summary, `QMCTorch` provides QMC practionners a framework to rapidly protoytpe new ideas and to test them using modern computing ressources.
`QMCTorch` is a Python package using `PyTorch` [@pytorch] as a backend to perform Quantum Monte-Carlo (QMC) simulations, namely Variational Monte-Carlo, of molecular systems. Many software such as `QMCPack`[@qmcpack], `QMC=Chem` [@qmcchem], `CHAMP` [@champ] provide high-quality implementation of advanced QMC methodologies in low-level languages (C++/Fortran). Python implementations of QMC such as `PAUXY` [@pauxy] and `PyQMC` [@pyqmc] have also been proposed to facilitate the use and development of QMC techniques. Large efforts have been made to leverage recent development of deep learning techniques for QMC simulations with for example the creation of neural-network based wave-function ansatz [@paulinet; @ferminet] that have lead to very interesting results. `QMCTorch` allows to perform QMC simulations using physically motivated neural network architectures that closely follow the wave function ansatz used by QMC practitioners. Its architecture allows to rapidly explore new functional forms of some key elements of the wave function ansatz. Users do not need to derive analytical expressions for the gradients of the total energy w.r.t. the variational parameters, that are simply obtained via automatic diffentiation. This includes for example the parameters of the atomic orbitals that can be varioationally optimized and the atomic coordinates that allows `QMCTorch` to perform geometry optimization of molecular structures. In addition, the GPU capabilities offered by `PyTorch` combined with the parallelization over multiple computing nodes obtained via `Horovod` [@horovod], allow to deploy the simulations on large heterogenous computing architectures. In summary, `QMCTorch` provides QMC practionners a framework to rapidly protoytpe new ideas and to test them using modern computing ressources.


# Wave Function Ansatz
Expand All @@ -51,9 +49,9 @@ The Jastrow factor and the sum of Slater determinants are then multiplied to yie

# Sampling, Cost Function & Optimization

QMC simulations use samples of the electronic density to approximate the total energy of the system. In `QMCTorch`, Markov-Chain Monte-Carlo (MCMC) techniques, namely Metropolis-Hasting and Hamiltonian Monte-Carlo, are used to obtained those sample. MCMC techniques require the calculation of the density for a given positions of the electrons: $\rho(R) = |\Psi(R)|^2$. This value is simply obtained by squaring the result of a forward pass of the network described above.
QMC simulations use samples of the electronic density to approximate the total energy of the system. In `QMCTorch`, Markov-Chain Monte-Carlo (MCMC) techniques, namely Metropolis-Hasting and Hamiltonian Monte-Carlo, are used to obtained those sample. Each sample, $R_i$, contains the positions of all the electrons contained in the system. MCMC techniques require the calculation of the density for a given positions of the electrons: $\rho(R_i) = |\Psi(R_i)|^2$ that can simply obtained by squaring the result of a forward pass of the network described above.

Each sample, $R_i$, contains the positions of all the electrons contained in the system. The value of local energy of the system is then computed at each sampling point and these values are summed up to compute the total energy of the system: $E = \sum_i \frac{H\Psi(R_i)}{\Psi(R_i)}$, where $H$ is the Hamiltonian of the molecular system: $H = -\frac{1}{2}\sum_i \Delta_i + V_{ee} + V_{en}$, with $\Delta_i$ the Laplacian w.r.t the i-th electron, $V_{ee}$ the coulomb potential between the electrons and $V_{en}$ the electron-nuclei potential. The calculation of the Laplacian of the Slater determinants can be performed using automatic differentiation but analytical expressions are often preferred as they are computationally more robust and less expensive [@jacobi_trace]. The gradients of the total energy w.r.t the variational parameters of the wave function, i.e. $\frac{\partial E}{\partial \theta_i}$ are simply obtained via automatic differentiation. Thanks to this automatic differentiation, users can define new kernels for the backflow transformation and Jastrow factor without having to derive analytical expressions of the energy gradients.
The value of local energy of the system is then computed at each sampling point and these values are summed up to compute the total energy of the system: $E = \sum_i \frac{H\Psi(R_i)}{\Psi(R_i)}$, where $H$ is the Hamiltonian of the molecular system: $H = -\frac{1}{2}\sum_i \Delta_i + V_{ee} + V_{en}$, with $\Delta_i$ the Laplacian w.r.t the i-th electron, $V_{ee}$ the coulomb potential between the electrons and $V_{en}$ the electron-nuclei potential. in `QMCTorch`, the calculation of the Laplacian of the Slater determinants can be performed using automatic differentiation but analytical expressions have also been implemented as they are computationally more robust and less expensive [@jacobi_trace]. The gradients of the total energy w.r.t the variational parameters of the wave function, i.e. $\frac{\partial E}{\partial \theta_i}$ are simply obtained via automatic differentiation. Thanks to this automatic differentiation, users can define new kernels for the backflow transformation and Jastrow factor without having to derive analytical expressions of the energy gradients.

Any optimizer included in `PyTorch` (or compatible with it) can then used to optimize the wave function. This gives users access to a wide range of optimization techniques that they can freely explore for their own use cases. Users can also decide to freeze certain variational parameters or defined different learning rates for different layers. Note that the positions of atoms are also variational parameters, and therefore one can perform geometry optimization using `QMCTorch`. At the end of the optimization, all the information relative to the simulations are dumped in a dedicated HDF5 file to enhance reproducibility of the simulations.

Expand Down