Carlo
Unlike in DFT, obtaining forces with QMC is by far more difficult. By assum- ing the Born-Oppenheimer approximation, the nuclei are treated as classical
particles and the 3M -dimensional force acting on all the M atoms is defined as
F ≡ −∇REV[Ψ] , (4.1)
where ∇R is the gradient relative to the Cartesian coordinates R of all the nuclei and EV[Ψ] is the variational energy associated to the electronic wave- function Ψ corresponding to R. As a functional of Ψ, EV[Ψ] depends on R through the Hamiltonian ˆH and the wavefunction Ψ which has an implicit dependence in the parameter set α that has to be optimized variationally by minimizing the variational energy for the given R, and an explicit dependence if ψ is defined in the localized basis set, as our case. Therefore, the local energy eL which appears in the evaluation of EV[Ψ] also depends on R through both the Hamiltonian and the wavefunction.
Eq. (4.1) can be factorized in the following analytic expression
F = FHF+ FPulay+ Fα (4.2) FHF= −hΨ| ∂ ∂RH|Ψiˆ hΨ|Ψi (4.3) FPulay= −2hΨ| ˆOR ˆ H|Ψi − hΨ| ˆOR|ΨiEV hΨ|Ψi (4.4) Fα= −∂EV ∂α ∂α ∂R (4.5)
where the three components FHF, FPulay and Fα are given respectively by the explicit dependence on R of the Hamiltonian and the explicit and implicit dependence of the wavefunction.
In principle, the term Fα is the most complicated because the deriva- tives ∂R∂α are very difficult to evaluate. Fortunately, when the parameter set α is optimized to reach the minimum of EV, ∂E∂αV = 0 for each component and Fα is exactly zero. Therefore, we can safely ignore Fα in our calcula- tions. The other two terms FHF, FPulayare referred as the Hellmann-Feynman term and the Pulay term. The Hellmann-Feynman term resembles the force computed by applying the Hellmann-Feynman theorem. Actually, in VMC calculations, the Hellmann-Feynman theorem is not applicable because the wavefunction is neither an eigenstate of ˆH nor normalized. Only when the wavefunction approaches an eigenstate of ˆH, the Pulay term becomes zero and the Hellmann-Feynman term converges to the exact Hellmann-Feynman force.
We can also consider the Cartesian coordinates R as optimizable param- eters and the forces as energy derivatives with respect to them. By joining them with the parameters of the wavefunction we can achieve the structural and wavefunction optimization at the same time.
In practice, the forces can be computed with the finite difference method. The force component p = 3(a − 1) + i acting on atom a in the direction of
i ∈ {1, 2, 3} which represents x, y or z, is computed as
Fp = −
EV(R +~ip∆) − EV(R)
∆ + O(∆) (4.6)
where ~ip is the pth unit vector in the 3M -dimensional coordinate space and ∆ is the displacement of the atom considered. ∆ is chosen small enough such that the finite difference error is negligible. However, the straightforward application of any finite difference method is very inefficient. When the energy values of two configurations are obtained by independent measurements, the error of the energy difference remains similar to the error of the energy due to the propagation of errors. Thus, the error in the energy derivatives diverges as
1
∆ as ∆ → 0. This issue has been solved by the introduction of two technical improvements.
The first one is the correlated sampling (CS) [74] which allows the compu- tation of the energy derivatives with errors much smaller than those obtained in the straightforward way. By employing the same Markov chain for two sets of nuclear coordinates R1 within a very small distance (∆ in our way of computing forces), the statistical error in the energy difference goes to zero as ∆ → 0 and the corresponding error in the energy derivative remains finite.
The other improvement is the space warp coordinate transformation (SWCT) [75]. We will not explain this method in detail and the interested readers can refer to ref. [74]. The CS plus SWCT implementation was first introduced for structural optimization [25]. In this thesis we just remark that the net force felt by an isolated molecule should be exactly zero. In practice, only after the SWCT the estimator of the net force gives zero variance, namely the translation invariance is fulfilled.
In the limit ∆ → 0, the finite difference forces computed by the correlated sampling converge to the analytic forces. However, the analytic differentiation of forces also has intrinsic infinite variance. In the Hellmann-Feynman term, the derivative ∂R∂ H diverges when the electrons are very close to the nuclei andˆ also when they are close to the nodal surface defined by ΨT = 0. Meanwhile, the Pulay term diverges when a configuration approaches the nodal surface. To solve these issues, large improvements have been done using the reweighting methods for the stochastic sampling [45,46,47,50]. Ref. [45] solves the infinite variance problem of FHF contribution due to very close electron-ion distance while ref. [47] and ref. [50] solve the infinite variance problem at the nodal surface of both FHF and FPulay contributions for periodic boundary systems and open boundary systems. In the next section, the solution to the infinite variance on the FPulay term for both boundary conditions will be discussed.
A further step for efficient and accurate QMC forces has been recently introduced by S. Sorella and L. Capriotti [48]. In the finite difference way, 3M 1We can also measure the energy difference of two consecutive sets of wavefunction parameters by correlated sampling during the wavefunction optimization.
energy evaluations are required to compute all the forces by displacing each ionic coordinate individually. They introduced the algorithmic differentiation (AD) which is capable of computing all the components of the ionic forces in a computational time only four times larger than the time of a VMC energy calculation.
By employing all the techniques above, we are able to realize the calcu- lation of forces at an affordable computational cost with increasing system size.