Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
camelto2 committed Sep 5, 2024
1 parent 512e363 commit 88ed15f
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 1 deletion.
66 changes: 66 additions & 0 deletions docs/bibs/methods.bib
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,69 @@ @article{Melton2016-2
Volume = {144},
Year = {2016}
}

@article{Sorella2001,
title = {Generalized Lanczos algorithm for variational quantum Monte Carlo},
author = {Sorella, Sandro},
journal = {Phys. Rev. B},
volume = {64},
issue = {2},
pages = {024512},
numpages = {16},
year = {2001},
month = {Jun},
publisher = {American Physical Society},
doi = {10.1103/PhysRevB.64.024512},
url = {https://link.aps.org/doi/10.1103/PhysRevB.64.024512}
}

@article{Casula2004,
author = {Casula, Michele and Attaccalite, Claudio and Sorella, Sandro},
title = "{Correlated geminal wave function for molecules: An efficient resonating valence bond approach}",
journal = {The Journal of Chemical Physics},
volume = {121},
number = {15},
pages = {7110-7126},
year = {2004},
month = {10},
abstract = "{We show that a simple correlated wave function, obtained by applying a Jastrow correlation term to an antisymmetrized geminal power, based upon singlet pairs between electrons, is particularly suited for describing the electronic structure of molecules, yielding a large amount of the correlation energy. The remarkable feature of this approach is that, in principle, several resonating valence bonds can be dealt simultaneously with a single determinant, at a computational cost growing with the number of electrons similar to more conventional methods, such as Hartree-Fock or density functional theory. Moreover we describe an extension of the stochastic reconfiguration method, which was recently introduced for the energy minimization of simple atomic wave functions. Within this extension the atomic positions can be considered as further variational parameters, which can be optimized together with the remaining ones. The method is applied to several molecules from Li2 to benzene by obtaining total energies, bond lengths and binding energies comparable with much more demanding multiconfiguration schemes.}",
issn = {0021-9606},
doi = {10.1063/1.1794632},
url = {https://doi.org/10.1063/1.1794632},
eprint = {https://pubs.aip.org/aip/jcp/article-pdf/121/15/7110/19183362/7110\_1\_online.pdf},
}

@article{Neuscamman2012,
title = {Optimizing large parameter sets in variational quantum Monte Carlo},
author = {Neuscamman, Eric and Umrigar, C. J. and Chan, Garnet Kin-Lic},
journal = {Phys. Rev. B},
volume = {85},
issue = {4},
pages = {045103},
numpages = {6},
year = {2012},
month = {Jan},
publisher = {American Physical Society},
doi = {10.1103/PhysRevB.85.045103},
url = {https://link.aps.org/doi/10.1103/PhysRevB.85.045103}
}

@article{Sorella2007,
author = {Sorella, Sandro and Casula, Michele and Rocca, Dario},
title = "{Weak binding between two aromatic rings: Feeling the van der Waals attraction by quantum Monte Carlo methods}",
journal = {The Journal of Chemical Physics},
volume = {127},
number = {1},
pages = {014105},
year = {2007},
month = {07},
abstract = "{We report a systematic study of the weak chemical bond between two benzene molecules. We first show that it is possible to obtain a very good description of the C2 dimer and the benzene molecule by using pseudopotentials for the chemically inert 1s electrons and a resonating valence bond wave function as a variational ansatz, expanded on a relatively small Gaussian basis set. We employ an improved version of the stochastic reconfiguration technique to optimize the many-body wave function, which is the starting point for highly accurate simulations based on the lattice regularized diffusion Monte Carlo method. This projection technique provides a rigorous variational upper bound for the total energy, even in the presence of pseudopotentials, and substantially improves the accuracy of the trial wave function, which already yields a large fraction of the dynamical and nondynamical electron correlation. We show that the energy dispersion of two benzene molecules in the parallel displaced geometry is significantly deeper than the face-to-face configuration. However, contrary to previous studies based on post-Hartree-Fock methods, the binding energy remains weak (≃2kcal∕mol) also in this geometry, and its value is in agreement with the most accurate and recent experimental findings [H. Krause et al., Chem. Phys. Lett. 184, 411 (1991)].}",
issn = {0021-9606},
doi = {10.1063/1.2746035},
url = {https://doi.org/10.1063/1.2746035},
eprint = {https://pubs.aip.org/aip/jcp/article-pdf/doi/10.1063/1.2746035/15399401/014105\_1\_online.pdf},
}




39 changes: 38 additions & 1 deletion docs/methods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ Optimizers
QMCPACK implements a number of different optimizers each with different
priorities for accuracy, convergence, memory usage, and stability. The
optimizers can be switched among “OneShiftOnly” (default), “adaptive,”
“descent,” “hybrid,” and “quartic” (old) using the following line in the
“descent,” “hybrid,” "stochastic_reconfiguration," and “quartic” (old) using the following line in the
optimization block:

::
Expand Down Expand Up @@ -1174,6 +1174,43 @@ Additional information and recommendations:
parameters discussed earlier for descent are useful for setting up
the descent engine to do this averaging on its own.

Stochastic Reconfiguration
^^^^^^^^^^^^^^^^^^^^^^^^^^
We have implemented a preliminary version of stochastic reconfiguration (:cite:`Sorella2001` and :cite:`Casula2004`),
currently only available in the batched drivers. The SR optimization reduces the
computational cost over the linear method by avoiding the need to build the
Hamiltonian derivative matrix elements, and instead only needs the derivative overlap
matrix. This can result in substantial savings when optimizing with very large parameter
counts, e.g. in orbital optimization. The SR method determines the parameter changes via

:math:`-\tau \mathbf{g} = \mathbf{S} \Delta \mathbf{p}`

where :math:`\mathbf{S}` is given by :math:`\langle \Psi_i | \Psi_j\rangle`, :math:`\mathbf{g}` is given by :math:`\langle \Psi_i | H | \Psi_0\rangle`, :math:`\Delta \mathbf{p}` is the parameter update, and :math:`\tau` is an effective timestep since the SR method can be interpretted as an imaginary time projection expanded in the parameter derivative basis.
The solution could be found by directly inverting the overlap matrix :math:`\mathbf{S}`, but this becomes prohibitive for large parameter counts. Therefore, we have implemented the conjugate gradient iterative scheme to solve the linear equation :cite:`Neuscamman2012`. This avoids having to directly invert the overlap matrix and significantly reduces the cost for large parameter counts.

Since we are using finite samples to represent the overlap matrix, it can become ill-conditioned. We choose to use a simple regularization scheme to improve the optimization, described in :cite:`Sorella2007`. The overlap matrix is scaled via :math:`\mathbf{S} \rightarrow \mathbf{S}(1+\epsilon \mathbf{I})`, where :math:`\epsilon` is a small scalar. This can be controlled through ``sr_regularization``.

By default, the parameter update is accepted as is, and the size of the proposed parameter changes can be controlled by the timestep :math:`\tau`. This parameter can be controlled via ``sr_tau``. If this parameter gets too large, the optimization can become unstable. Therefore, it is recommended to use a small timestep. Small timesteps require many more total optimization steps than is typically required by the linear method, so convergence should be carefully checked. Alternatively, it is possible to use the conjugate gradient step to determine the parameter update direction, and follow up with a line search, triggered via ``line_search``. This can result in much faster convergence at the expense of doing additional correlated sampling steps.

We are currently investigating various improvements to make this a more reliable optimizer.

``stochastic_reconfiguration`` method:

parameters:

+-----------------------+--------------+-------------+-------------+----------------------------------------------+
| **Name** | **Datatype** | **Values** | **Default** | **Description** |
+=======================+==============+=============+=============+==============================================+
| ``sr_tau`` | real | :math:`> 0` | 0.01 | Effective timestep for SR equation |
+-----------------------+--------------+-------------+-------------+----------------------------------------------+
| ``sr_tolerance`` | real | :math:`> 0` | 1e-06 | Convergence threshold for CG algorithm |
+-----------------------+--------------+-------------+-------------+----------------------------------------------+
| ``sr_regularization`` | real | :math:`> 0` | 0.01 | Scaling constant for S matrix regularization |
+-----------------------+--------------+-------------+-------------+----------------------------------------------+
| ``line_search`` | text | yes/no | no | Use linesearch to find optimal move |
+-----------------------+--------------+-------------+-------------+----------------------------------------------+


Quartic Optimizer
^^^^^^^^^^^^^^^^^

Expand Down

0 comments on commit 88ed15f

Please sign in to comment.