Source-linked AI summary

QWalk: A Quantum Monte Carlo Program for Electronic Structure

Lucas K. Wagner, Michal Bajdich, Lubos Mitas

arXiv:0710.4361v1physics.comp-phphysics.atm-clusphysics.chem-ph

TL;DR

Accurate electronic structure remains challenging where density-functional methods are inadequate and accurate post-Hartree–Fock methods scale poorly. QWalk is a modular, general-purpose QMC program; it handles medium-to-large electronic systems, including reported systems of up to 135 atoms.

  • Problem

    Density-functional theory does not accurately describe some systems and effects, while accurate post-Hartree–Fock methods have substantial computational cost and poor scaling.

    Source: §I · p. 1
  • Method

    QWalk implements quantum Monte Carlo methods in a general-purpose C++ program organized as modular, pluggable abstractions.

    Source: §I · p. 1, §III · p. 3
  • Results

    QWalk has been used on systems with up to 135 atoms and is described as working efficiently in parallel on medium-to-large electronic systems.

    Source: A. Boundary Conditions · p. 6, §X · p. 10
  • Takeaways & Limitations

    The authors hope QWalk's free GPL release will broaden QMC development and use, and its modular design is straightforward to extend beyond continuous-space electron-ion Hamiltonians.

    Source: §X · p. 10

    The maximum system size is mostly limited by available computer time.

    Source: §X · p. 10

Abstract

from arXiv · show

We describe QWalk, a new computational package capable of performing Quantum Monte Carlo electronic structure calculations for molecules and solids with many electrons. We describe the structure of the program and its implementation of Quantum Monte Carlo methods. It is open-source, licensed under the GPL, and available at the web site http://www.qwalk.org

I. INTRODUCTION

Electronic-structure methods face a trade-off between accuracy and scaling: DFT is inaccurate for some systems, while accurate post-Hartree–Fock methods scale poorly. The paper presents QWalk as a general-purpose QMC program and describes variational Monte Carlo (VMC) sampling and wave-function optimization.

I. INTRODUCTION

  • Accurate post-Hartree–Fock methods can scale as O(N^5−7), while methods scaling at most O(N^3) with higher accuracy than DFT remain difficult to find.DFT is not accurate for some systems and effects, including van der Waals systems, transition-metal systems, and many excitations.Source: §I · p. 1
  • Quantum Monte Carlo uses stochastic algorithms on the full 3N_e-dimensional many-body wave function, with O(N^2−3) scaling depending on the quantity and parallel implementations reaching 99% efficiency.QMC has been applied to model systems, atoms, molecules, and solids; for tested extended systems it is described as the most accurate available method for total energies.Source: §I · p. 1
  • QWalk is a general-purpose C++ program for QMC calculations, incorporating state-of-the-art algorithms in a fast, flexible code.The paper presents a summary of its current capabilities; the program had already been used in several publications.Source: §I · p. 1

A. Variational Monte Carlo

  • VMC evaluates expectation values by stochastic integration over electron configurations, avoiding the restrictions or cost of reducing high-dimensional integrals to products of low-dimensional ones.This stochastic approach permits explicitly correlated trial wave functions and other functional forms, provided the function and its derivatives can be evaluated quickly.Source: A. Variational Monte Carlo · pp. 1–2
  • VMC samples configurations according to Ψ_T^2 with Metropolis moves and estimates the energy by averaging the local energy over those samples.The code separates sampling and evaluation of energy or other properties from wave-function optimization.Source: A. Variational Monte Carlo · p. 2
  • Wave-function parameters are optimized by minimizing energy or another objective, including local-energy variance, which vanishes for an exact eigenstate.Optimization uses a fixed set of sample points, so estimates of small energy differences can be more precise than total-energy estimates.Source: A. Variational Monte Carlo · p. 2

B. Projector Monte Carlo

Projector Monte Carlo improves on a trial variational wave function by projecting toward a ground state, subject to a fixed-node constraint in the stochastic formulation. QWalk implements Diffusion Monte Carlo and Reptation Monte Carlo, which trade access to distributions and correlations against branching or rejection-related limits.

B. Projector Monte Carlo

  • Projector Monte Carlo applies e^−(H−E_0)τ to a trial wave function to project toward the ground state of a given symmetry as τ increases.The ground-state energy is obtained within the trial wave function's nodal boundaries.Source: B. Projector Monte Carlo · pp. 2–3
  • The fixed-node constraint uses the trial wave function's nodes as an approximation to the ground-state nodes, and projector Monte Carlo typically obtains 90–95% of correlation energy with polynomial scaling.The stated scaling is proportional to N_e^α, with α = 2 or 3 depending on implementation and system.Source: B. Projector Monte Carlo · p. 2
  • Diffusion Monte Carlo reaches the mixed distribution Ψ_TΦ_0 through branching, but does not provide the pure distribution and branching can spoil imaginary-time data or reduce efficiency.Despite these limitations, the paper describes DMC as probably the most efficient current way to obtain the fixed-node ground-state energy.Source: B. Projector Monte Carlo · p. 3
  • Reptation Monte Carlo provides the pure distribution and imaginary-time correlations without branching, but rejection can slow the path and restrict projection to finite τ.QWalk's RMC is approximately as efficient as DMC until rejection rates rise; slowdown occurs at about 150 electrons, depending on trial-wave-function quality.Source: B. Projector Monte Carlo · p. 3

III. ORGANIZATION AND IMPLEMENTATION

QWalk uses a modular, abstraction-based design that keeps the QMC method separate from the system and wave-function components it uses. The VMC example shows how interchangeable modules can be combined through common interfaces.

III. ORGANIZATION AND IMPLEMENTATION

  • The coarse-grained modular design lets contributors replace or rewrite components by changing one line in the main code.The paper says this structure provides flexibility while keeping the code base relatively simple and separable.Source: §III · p. 3
  • QWalk’s modules form a tree of successive abstractions, with each level able to use replaceable modules of the same type.The VMC example combines a Slater determinant and Jastrow factor through a Multiply wave-function object.Source: §III · pp. 3–4, Figure 1 · p. 4
  • The VMC method operates through wave-function, system, and random-dynamics interfaces without depending on which compatible modules are plugged in.The paper presents this as a sketch of the algorithm and points to an appendix example of creating a new module.Source: §III · p. 4

IV. METHODS

The VMC module samples the trial-wave-function probability density with Metropolis and supports correlated sampling for small energy differences. A simple code example illustrates the implementation.

A. Variational Monte Carlo

  • The VMC module uses Metropolis sampling of the probability density ΨT^2(R).The method also supports correlated sampling for small energy differences between very similar systems.Source: A. Variational Monte Carlo · p. 4
  • Figure 2 presents a sketch of simple VMC code, with the full function omitted for space.The implementation operates through wave-function, system, and random-dynamics interfaces.Source: Figure 2 · p. 4
  • Table II lists the optimization objective functions implemented in QWalk.The optimization methods are described as capable of optimizing the first three objective functions in that table.Source: Table II · p. 5

B. Optimization of Wave Functions

QWalk implements three wave-function optimization methods, along with DMC, RMC, and correlated sampling. Their trade-offs include optimization cost, access to pure distributions, and how sample weights are determined.

B. Optimization of Wave Functions

  • OPTIMIZE uses conjugate gradients, OPTIMIZE2 uses a low-variance Hessian estimator and Newton’s method, and NEWTON OPT adds correlated sampling to select step length.OPTIMIZE2 can directly optimize energy for systems up to 320 electrons at slightly greater cost than OPTIMIZE; NEWTON OPT has a more expensive iteration than the other two methods.Source: B. Optimization of Wave Functions · p. 5

C. Diffusion Monte Carlo

  • DMC uses constant-walker branching to control weight fluctuations and preserve parallel load balancing; cutting off extreme weights avoids an efficiency problem.For fluctuations beyond ten standard deviations of the energy, QWalk smoothly brings the effective time step for the weights to zero; the cutoff bias vanishes as the time step goes to zero or the trial function approaches the exact one.Source: C. Diffusion Monte Carlo · p. 5

D. Reptation Monte Carlo

  • In RMC, local-energy fluctuations in the Green’s-function component can trap the path, so the effective time step is cut off as in DMC; the branching component is otherwise smooth.Acceptance/rejection uses only the branching part of the Green’s function, and the bounce algorithm improves efficiency by letting the path explore many-body phase space more quickly.Source: D. Reptation Monte Carlo · p. 5

E. Correlated Sampling

  • Correlated sampling uses the same samples for similar systems to reduce variance in their difference, with method-specific weights for VMC versus DMC and RMC.The weighted difference is averaged over samples from the primary distribution; DMC and RMC weights approximate the Green’s function using the method of Filippi and Umrigar.Source: E. Correlated Sampling · p. 6

V. SYSTEMS

QWalk supports open and periodic boundary conditions, including real k-points for three-dimensional periodic systems. Its pseudopotential interface supports arbitrary maximum angular momentum and several potential forms.

A. Boundary Conditions

  • QWalk supports open or periodic boundary conditions, arbitrary molecular atoms, charge, spin state, finite electric fields, and real k-points in 3D periodic systems.A finite-size correction is given as δE = c rs, with c empirically fitted to 0.36 Hartrees; the code has been used for systems up to 135 atoms and 1080 electrons.Source: A. Boundary Conditions · p. 6

B. Pseudopotentials

  • QWalk accepts pseudopotentials as expansions of nonlocal angular-momentum operators for arbitrary maximum angular momentum.The potentials may use spline or Gaussian basis functions; soft potentials remove the Z/r divergence, and Troullier-Martins Hartree-Fock or DFT pseudopotentials also work.Source: B. Pseudopotentials · p. 6

VI. FORMS OF THE WAVE FUNCTION

QWalk supports interchangeable, combinable wave-function forms, with modular additions requiring one-electron value and derivative updates plus a main-code registration. Its Jastrow construction offers compact, optimizable correlation terms, while the Slater-Jastrow form is a common trial wave function.

VI. FORMS OF THE WAVE FUNCTION

  • The Slater-Jastrow trial wave function multiplies a single Slater determinant of Hartree-Fock or DFT orbitals by a correlation factor optimized in VMC.This form typically recovers 90%–95% of the correlation energy in DMC.Source: §VI · p. 6
  • QWalk’s modular structure lets users combine wave-function objects, and adding a form requires one-electron value and derivative updates plus one main-code line.The user must ensure the resulting wave function is properly antisymmetric and represents the problem correctly.Source: §VI · p. 6

A. Slater Determinant(s)

  • Slater determinants are sums weighted by coefficients that can optionally be optimized within VMC.Each determinant is formed from spin-up and spin-down one-particle orbitals.Source: A. Slater Determinant(s) · p. 6

B. Jastrow Factor

  • The Jastrow factor is an exponential correlation term built from electron and nuclear coordinates, with coefficients and basis parameters available for optimization.Its basis functions satisfy the exact electron-electron cusp conditions, using cusp values of 1/4 for like spins and 1/2 for unlike spins.Source: B. Jastrow Factor · p. 7
  • Additional Jastrow basis functions go smoothly to zero at a finite cutoff and typically require optimization of around 25 parameters.The electron-electron-nucleus term can be costly for large systems; including it makes the factor three-body rather than two-body.Source: B. Jastrow Factor · p. 7

C. Pfaffian Pairing Wave Function

QWalk implements Pfaffian pairing wave functions that generalize BCS pairing to include like-spin pairs and unpaired orbitals, while retaining BCS and Slater forms as special cases. Its backflow transformation changes the coordinates used in the antisymmetric wave function and reuses Jastrow terms.

C. Pfaffian Pairing Wave Function

  • QWalk’s Pfaffian implementation extends prior Jastrow-BCS pairing work for molecules, including the constant-particle-number projection of the BCS wave function.The general Jastrow-BCS form is a Jastrow factor multiplied by a determinant of opposite-spin pairing functions and extends to unequal spin counts.Source: C. Pfaffian Pairing Wave Function · p. 7
  • QWalk’s Pfaffian pairing wave function permits like-spin pairing in addition to the unlike-spin pairing of canonical BCS projection.The Pfaffian contains BCS without triplet pairing, and therefore also contains the Slater determinant wave function as a special case.Source: C. Pfaffian Pairing Wave Function · p. 7
  • The Pfaffian’s block matrices comprise singlet pairing, antisymmetric triplet pairing, and additional unpaired orbitals for spin-polarized systems.The Pfaffian operation ensures the total wave function is antisymmetric.Source: C. Pfaffian Pairing Wave Function · p. 7
  • The Pfaffian pairing expansion uses occupied and virtual orbitals, and pairing functions and unpaired orbitals are fully optimizable within VMC.Linear combinations of Pfaffians with one or multiple sets of pairing functions are also implemented.Source: C. Pfaffian Pairing Wave Function · p. 7

D. Backflow Correlated Wave Function

  • Backflow replaces electron positions in the antisymmetric wave function with quasi-coordinates dependent on all electron positions, potentially changing its nodes.This can improve the fixed-node approximation; QWalk’s implementation follows Refs..Source: D. Backflow Correlated Wave Function · p. 7
  • Backflow displacements include one-body, two-body, and three-body contributions whose terms reuse the corresponding Jastrow forms.Optimizing the Jastrow parameters within backflow can improve nodal structure and correlation energies.Source: D. Backflow Correlated Wave Function · p. 8

VII. ONE-PARTICLE ORBITAL EVALUATION

QWalk evaluates one-particle orbitals using either a localized-orbital cutoff method with linear scaling or a simpler BLAS method that can be faster for medium-sized systems. The example calculation proceeds from initial VMC sampling through wave-function optimization to correlated VMC and DMC.

VII. ONE-PARTICLE ORBITAL EVALUATION

  • For localized orbitals in large enough systems, CUTOFF MO evaluates all orbitals for all electrons in O(N) time by restricting work to nearby basis functions and their contributing orbitals.The setup builds coefficient-above-cutoff orbital lists at the start of the calculation.Source: §VII · p. 8
  • BLAS MO scales in principle as O(N^2), but can be faster than CUTOFF MO for medium-sized systems and computers with fast BLAS routines.It accumulates molecular orbitals from basis functions within range of the electron position.Source: §VII · p. 8

VIII. EXAMPLE CALCULATION

  • The example starts by evaluating a Slater wave function with 500 configurations over 16 blocks of 10 Monte Carlo steps at a 1.0 a.u. timestep.The final configurations are stored, and QWalk reports total energy and other accumulated properties.Source: §VIII · p. 8, Figure 4 · p. 9
  • The next stage requests optimization of a Slater-Jastrow wave function using the fixed set of walkers generated by the preceding VMC run.The converter supplies a null Jastrow that is combined with the previously used Slater determinant.Source: §VIII · pp. 8–9, Figure 5 · p. 9
  • The final example evaluates the optimized correlated wave function with VMC and then runs DMC immediately afterward.The DMC input uses a smaller 0.02 timestep and 50 steps per block.Source: §VIII · p. 9, Figure 6

IX. OTHER UTILITIES

QWalk imports orbitals from several electronic-structure codes, while its plane-wave-to-Gaussian converter seeks a localized LCAO representation by maximizing overlap. The conclusion presents QWalk as a parallel, modular QMC program whose scope can extend beyond electron-ion systems.

A. Conversion of One-particle Orbitals

  • QWalk can import orbitals from GAMESS, CRYSTAL, SIESTA, and GP, although the GP interface is not distributable because of licensing issues.More interfaces are planned and described as easy to add.Source: A. Conversion of One-particle Orbitals · p. 9

B. Plane Wave to LCAO converter

  • The plane-wave-to-LCAO converter maximizes overlap with a Gaussian representation, yielding coefficients through overlap matrices and an inverse of S.The overlap integrals use two-center integrals, and the limiting conversion step is calculating S^-1 with LAPACK routines; Gaussian representation can improve QMC performance by orders of magnitude over plane waves.Source: B. Plane Wave to LCAO converter · pp. 9–10

X. CONCLUSION

  • QWalk is presented as an efficient parallel, modular QMC program for medium-to-large electronic systems, with applicability extendable to BEC/BCS condensates and other quantum models.The conclusion says system modules can be modified for other interactions and one-particle and pair orbitals expanded using coded basis functions.Source: §X · p. 10

APPENDIX A: ADDING A MODULE

The appendix illustrates how to add a module using a Gaussian basis function. Modules follow the same pattern, with the functions to implement varying by module.

APPENDIX A: ADDING A MODULE

  • All modules can be added in the same way, differing only in which functions must be defined.The example uses a Basis function object because it has the fewest functions to fill in.Source: Appendix A · p. 10
  • The Gaussian basis module declares input reading, cutoff, value, and derivative/Laplacian functions, with alpha and cut as local variables.The example omits the getLap implementation for space.Source: Appendix A · p. 10
  • The Gaussian reader requires ALPHA and sets cut to sqrt(-log(1e-18/alpha)).If ALPHA is absent, it reports an error.Source: Appendix A · p. 10
  • For the example's single basis function, getVal stores exp(-alpha*r(1)) in vals(0), using an input array containing r, r^2, x, y, and z.The basis-function interface can represent multiple functions in the vals array.Source: Appendix A · p. 11
Loading 0710.4361v1…