Chapter I: Cayley modification for path-integral simulations
1.3 Theory
The theory introduced here adapts and advances previous mathematical results on the numerical approximation of general second order Langevin stochastic partial differential equations with space-time white noise.39
RPMD
We consider a quantum particle in 1D with Hamiltonian operator given by ห
๐ป = ๐ห2 2๐
+๐(๐ห) (1.3)
where ห๐, ห๐, and ๐ represent the particle position, momentum, and mass, respec- tively, and๐(๐ห) is a potential energy surface. All results presented here are easily generalized to multiple dimensional quantum systems.
The thermal equilibrium properties of the system are described by the quantum mechanical Boltzmann partition function,
๐ =Tr[๐โ๐ฝ๐ปห] , (1.4)
where๐ฝ= (๐๐ต๐)โ1is the inverse temperature. Using a path-integral discretization, ๐can be approximated by a classical partition function๐๐of a ring-polymer with ๐beads,5
๐๐= ๐๐ (2๐โ)๐
โซ ๐๐๐
โซ
๐๐๐๐โ๐ฝ ๐ป๐(๐,๐) , (1.5) where๐ = (๐0, . . . , ๐๐โ1)is the vector of bead positions, and๐is the corresponding vector of velocities. The ring-polymer Hamiltonian is given by
๐ป๐(๐,๐) =๐ป0
๐(๐,๐) +๐ext
๐ (๐), (1.6)
which includes contributions from the physical potential ๐ext
๐ (๐) = 1 ๐
๐โ1
โ๏ธ
๐=0
๐(๐๐) (1.7)
and the free ring-polymer Hamiltonian ๐ป0
๐(๐,๐) = ๐๐ 2
๐โ1
โ๏ธ
๐=0
h ๐ฃ2
๐+๐2
๐(๐๐+1โ๐๐)2i
, (1.8)
where ๐๐ = ๐/๐, ๐๐ = ๐/(โ๐ฝ) and ๐๐ = ๐0. If we let ๐ = 1 in Eq. (1.5), the classical partition function of the system (governed by a classical Hamiltonian, Eq. 1.6 with ๐ = 1) is recovered, i.e., ๐1 = ๐๐๐. In the limit ๐ โ โ, the path- integral approximation converges to the exact quantum Boltzmann statistics for the system, such that๐โ =๐. The thermal ensemble of ring-polymer configurations associated with Eq. (1.5) can be sampled using either molecular dynamics (leading to PIMD methods) or Monte Carlo (leading to PIMC methods).
The classical equations of motion associated with the ring-polymer Hamiltonian in Eq. (1.6),
ยค
๐๐ =๐ฃ๐, (1.9)
ยค ๐ฃ๐ =๐2
๐(๐๐+1+๐๐โ1โ2๐๐) โ 1 ๐
๐โฒ(๐๐),
yield the RPMD model for the real-time dynamics of the system.15,16 RPMD provides a means of approximately calculating Kubo-transformed thermal time- correlation functions, such as the position autocorrelation function
ห
๐ถ๐ ๐(๐ก) = 1 ๐
Tr[๐โ๐ฝ๐ปห๐ห(0)๐ห(๐ก)] (1.10)
where the Kubo-transformed position operator ห๐is
ห ๐ = 1
๐ฝ
โซ ๐ฝ
0
๐๐๐ปห๐ ๐ห โ๐๐ปห๐๐ (1.11) and the time-evolved operator ห๐(๐ก) is๐๐๐ป ๐กห /โ๐ ๐ห โ๐๐ป ๐กห /โ.
Specifically, the RPMD approximation to Eq. (1.10) is ๐ถห๐ ๐(๐ก) = 1
๐๐
โซ ๐๐๐
โซ
๐๐๐๐โ๐ฝ ๐ป๐(๐,๐)๐ยฏ(0)๐ยฏ(๐ก) (1.12) where ยฏ๐is the bead-averaged position
ยฏ
๐(๐ก) = 1 ๐
๐โ1
โ๏ธ
๐=0
๐๐(๐ก) , (1.13)
and the pair(๐(๐ก),๐(๐ก))are evolved by the RPMD equations of motion in Eq. (1.9) with initial conditions drawn from the classical Boltzmann-Gibbs measure.
The RPMD equations of motion can be compactly rewritten as ๐ยค
๐ยค
= ๐จ ๐
๐
+
0 ๐ญ(๐)/๐๐
, where ๐จ =
0 ๐ฐ
โ๐2 0
, (1.14)
๐ญ(๐) = โโ๐ext
๐ (๐), ๐ฐ is an๐ร๐identity matrix,0is an array of zeros, and๐2is the๐ร๐symmetric positive semi-definite matrix
๐2=๐2
๐
๏ฃฎ
๏ฃฏ
๏ฃฏ
๏ฃฏ
๏ฃฏ
๏ฃฏ
๏ฃฏ
๏ฃฏ
๏ฃฏ
๏ฃฏ
๏ฃฏ
๏ฃฏ
๏ฃฏ
๏ฃฐ
2 โ1 0 ยท ยท ยท 0 โ1
โ1 2 โ1 0 ยท ยท ยท 0 ..
. ..
. ..
. ...
... ... 0 ยท ยท ยท 0 โ1 2 โ1
โ1 0 ยท ยท ยท 0 โ1 2
๏ฃน
๏ฃบ
๏ฃบ
๏ฃบ
๏ฃบ
๏ฃบ
๏ฃบ
๏ฃบ
๏ฃบ
๏ฃบ
๏ฃบ
๏ฃบ
๏ฃบ
๏ฃป
. (1.15)
We recognize ๐2 as the 1D discrete Laplacian endowed with periodic boundary conditions; its spectral radius that scales as๐2, and since๐2 is circulant, it can be diagonalized by the๐ร๐orthogonal real discrete Fourier transform (DFT) matrix.
In particular, the spectral decomposition of๐can be written as
๐=๐ผ๐๐ ๐ผT, where๐๐ =diag(0, ๐1,๐, . . . , ๐๐โ1,๐) (1.16) is a diagonal matrix of eigenvalues given by
๐๐ ,๐ =
๏ฃฑ๏ฃด
๏ฃด
๏ฃฒ
๏ฃด๏ฃด
๏ฃณ
2๐๐sin ๐ ๐
2๐
if ๐ is even, 2๐๐sin
๐(
๐+1) 2๐
else,
(1.17)
In nontrivial applications, the RPMD equations of motion in Eq. (1.14) cannot be solved analytically. It is then necessary to employ approximate numerical integration of the equations of motion. As we discuss next, designing good numerical integrators for Eq. (1.14) is complicated by the interplay between the time-evolution of the free ring-polymer (obtained by setting๐ญ =0 in Eq. 1.14) and the contributions from the physical forces ๐ญ.
Cayley removes instabilities in a free ring-polymer mode
RPMD is an example of highly oscillatory Hamiltonian dynamics.40 To understand why numerical integration of such systems is tricky and why the Cayley modification is needed, it helps to consider the equations of motion for a particular normal mode of the free ring polymer with Matsubara frequency๐ >0:
๐ยค
ยค ๐ฃ
= ๐จ ๐
๐ฃ
where ๐จ=
0 1
โ๐2 0
, (1.18)
which are also the equations of motion for a linear oscillator with natural frequency ๐. If ๐ is large, Eq. (1.18) is highly oscillatory. Solving Eq. (1.18) amounts to approximating the matrix exponential exp(ฮ๐ก๐จ)whereฮ๐กis a timestep size. A good 2ร2 matrix approximation ๐ดฮ๐กshould satisfy:
(P1) Accuracy โฅ๐ดฮ๐กโexp(ฮ๐ก๐จ) โฅ=๐(ฮ๐ก3).
(P2) Strong Stability For all ๐ > 0, and for all ฮ๐ก smaller than some constant independent of๐, ๐ดฮ๐ก is a strongly stable symplectic matrix.
(P3) Time-Reversibility For all๐ > 0 andฮ๐ก > 0, ๐ดฮ๐ก is reversible with respect to the velocity flip matrix ๐น=
1 0 0 โ1
, i.e., ๐น ๐ดฮ๐ก๐น =๐ดโ1ฮ๐ก.
We briefly comment on each of these criteria for a good approximation. Prop- erty (P1) is a basic requirement that ensures second-order accuracy on finite-time intervals. Property (P3) is particularly useful for sampling from the stationary distribution, since a reversible map can be readily Metropolized41โ43, and since time-reversibility in a volume-preserving numerical integrator leads to a doubling of the accuracy order (see Propositions 5.2 and Theorem 6.2 of Ref.43, respectively).
Property (P2) is the most interesting. A symplectic matrix๐บ is stable if all powers of the matrix๐บare bounded. A symplectic matrix๐บisstrongly stableif๐บis stable and all sufficiently close symplectic matrices are also stable. In other words, ๐บ is strongly stable if there exists an๐ > 0, such that all symplectic matrices ๐บ๐ that are within a distance๐ away from ๐บare also stable. A sufficient condition for ๐บ to be strongly stable is that the eigenvalues of๐บare on the unit circle in the complex plane and are distinct; both the necessary and sufficient conditions for strong stability of symplectic matrices are known.44
-1 0 1 real -1
0 1
imaginary
-1 0 1
real -1
0 1
imaginary
(a)๐ก = ๐3 (b)๐ก = ๐4
Figure 1.1: Eigenvalues of2ร2symplectic matrices.Eigenvalues of a symplectic matrix ๐บ = exp(๐ก๐จ) (black dots) are plotted in the complex plane along with eigenvalues of a perturbed symplectic matrix ๐บ๐ = exp( (1/2)๐ก๐ฉ)exp(๐ก๐จ)exp( (1/2)๐ก๐ฉ) (grey dots). The elements of ๐จ and ๐ฉ are specified in the text. For both values of๐ก, ๐บ is stable since its eigenvalues lie on the unit circle. When the eigenvalues of๐บare not distinct, then as shown in (a),๐บ๐ has an eigenvalue with modulus greater than one, and hence, ๐บ๐ loses stability.
However, if the eigenvalues of๐บare distinct, then๐บis strongly stable, and as shown in (b), ๐บ๐ is stable since its eigenvalues remain on the unit circle.
Figure 1.1 illustrates the concept of strong stability. In particular, for different values of๐ก(as indicated in each panel), the black dots correspond to the eigenvalues of the symplectic matrix๐บ=exp(๐ก๐จ)with๐ =3, and the grey dots are the eigenvalues of a perturbation of๐บwhich preserves the symplectic nature of the matrix, specifically ๐บ๐ = exp( (1/2)๐ก๐ฉ)exp(๐ก๐จ)exp( (1/2)๐ก๐ฉ) where ๐ฉ =
0 ๐ ๐ 0
and ๐ = 0.15. For any๐ก, note that the two eigenvalues of๐บare always on the unit circle, and hence, ๐บ is always stable, but as the figure shows,๐บis not always strongly stable. Indeed, in Figure 1.1 (a), we see that the two eigenvalues of ๐บ, represented by a single black dot, are both equal to (โ1,0), which violates the condition for strong stability, and in this case, we see that one of the eigenvalues of๐บ๐ has modulus greater than unity, which implies that ๐บ๐ is unstable. In Figure 1.1 (b), the two eigenvalues of ๐บ are distinct and equal to (0,ยฑ1), and hence, ๐บ is strongly stable. Since ๐บ is strongly stable, and ๐ is sufficiently small, ๐บ๐ has eigenvalues that are on the unit circle, and hence, is itself stable. For a more detailed discussion of the concept of strong stability of symplectic matrices, see Section 42 of Ref.45.
A natural candidate for an approximation๐ดฮ๐กthat satisfies these criteria is the Verlet integrator, which is ubiquitous in the classical simulation of molecular systems.46โ49 For a single Matsubara frequency of the free ring polymer, the Verlet integrator gives
๐ดฮ๐ก =
"
1โ ฮ๐ก2๐2
2 ฮ๐ก
โ1
2ฮ๐ก ๐2(2โ ฮ๐ก2๐2
2 ) 1โ ฮ๐ก2๐2
2
#
. (1.19)
However, forฮ๐ก > 2/๐, the eigenvalues of ๐ดฮ๐ก are real and distinct, so that one of them has modulus> 1, and therefore the powers of ๐ดฮ๐ก grow exponentially. Thus,
-1 0 1 real -1
0 1
imaginary
-1 0 1
real -1
0 1
imaginary
(a) exp(ฮ๐ก๐จ) (b) cay(ฮ๐ก๐จ)
Figure 1.2: Eigenvalues of the exponential vs. Cayley maps. Eigenvalues of exp(ฮ๐ก๐จ) (a) and cay(ฮ๐ก๐จ) (b) at 50 different timestep sizes between 0.05 and 5.0 (evenly spaced) and with๐=3, color-coded from blue (smallest) through green and yellow to red (largest).
For exp(ฮ๐ก๐จ), the eigenvalues rotate around the unit circle multiple times. However, for cay(ฮ๐ก๐จ), the eigenvalues start near(1,0), but never reach (โ1,0). Since the eigenvalues of cay(ฮ๐ก๐จ)are always distinct, it provides strong symplectic stability, whereas the matrix exponential loses strong stability every time the eigenvalues hit the horizontal axis. In both panels, the eigenvalue associated with the ring-polymer centroid motion is excluded.
numerical stability requires ฮ๐ก < 2/๐, and Verlet does not satisfy (P2), since this numerical stability requirement is not uniform in๐.
Surprisingly, the exact solution for the normal-mode dynamics also does not satisfy (P2). To see why, note that the eigenvalues of the matrix exponential exp(ฮ๐ก๐จ)are ๐ยฑ๐๐ฮ๐กand (P2) requires that๐๐๐ฮ๐ก โ ๐โ๐๐ฮ๐กwhich is violated if and only if
ฮ๐ก = ๐ ๐
๐ for all๐ โฅ 1 . (1.20)
At these timesteps, the exact solution violates strong stability. This is illustrated in Figure 1.2 (a), where the two eigenvalues of exp(ฮ๐ก๐จ) are plotted in the complex plane for a range of time-step sizes. Although the two eigenvalues of exp(ฮ๐ก๐จ) lie on the unit circle for allฮ๐ก, strong stability fails to hold whenever the eigenvalues are both equal to(ยฑ1,0).
A simple strategy to avoid these artificial resonances is to use a random timestep size ๐ฟ๐ก, e.g., take as timestep size an exponential random variable ๐ฟ๐ก with mean ฮ๐ก. Averaging exp(๐ฟ๐ก๐จ) over the exponential probability density function yields ๐ดฮ๐ก = E(exp(๐ฟ๐ก๐จ)) = (๐ฐ โ ฮ๐ก๐จ)โ1, where here ๐ฐ is the 2 ร2 identity matrix.
Unfortunately, as can be easily verified, this matrix satisfies none of our criteria:
it is neither symplectic, nor reversible, nor sufficiently accurate. However, we can easily turn this approximation into one that satisfies (P1), by simply composing 1/2 step of this integrator with 1/2 step of its adjoint ๐ดโ1ฮ๐ก. This correction yields the Cayley transform of the matrixฮ๐ก๐จ,
cay(ฮ๐ก๐จ) โก (๐ฐโ (1/2)ฮ๐ก๐จ)โ1(๐ฐ+ (1/2)ฮ๐ก๐จ). (1.21)
In fact, the Cayley transform satisfies all three of the specified criteria for a good numerical integrator. It is time-reversible since ๐นcay(ฮ๐ก๐จ)๐น = (๐น โ (1/2)ฮ๐ก๐น ๐จ)โ1(๐น + (1/2)ฮ๐ก๐จ๐น) = cay(ฮ๐ก๐จ)โ1, where we used that ๐นโ1 = ๐น.
It is a symplectic matrix since
cay(ฮ๐ก๐จ)๐๐ฑcay(ฮ๐ก๐จ) = ๐ฑ where ๐ฑ =
0 1
โ1 0
where we used the fact that๐จis a Hamiltonian matrix (See Ref.50, Section 2.5). More importantly, it is a strongly stable symplectic matrix for all ฮ๐ก > 0, as illustrated in Figure 1.2 (b); in contrast with the exponential map, for all ๐ > 0 and ฮ๐ก > 0 the eigenvalues of the Cayley map are(4โฮ๐ก2๐2ยฑ4๐ฮ๐ก ๐)/(4+ฮ๐ก2๐2), which are distinct and of unit modulus. Thus, not only is every matrix power of cay(ฮ๐ก๐จ) bounded, but the Cayley map is strongly stable uniformly in๐ andฮ๐ก.
Cayley removes instabilities in microcanonical RPMD
For numerical integration of the conservative RPMD equations of motion (Eq. 1.9 or Eq. 1.14), it is standard practice9,16to employ a symmetrically split second-order integrator of the form in Eq. (1.2).
Furthermore, it is standard practice to exactly perform the free ring-polymer time evolution step,16using an exponential map of the form exp(ฮ๐ก ๐ฟ0) =exp(ฮ๐ก๐จ)where ๐จis the matrix associated with the dynamics of the free ring-polymer Hamiltonian,
๐ยค ๐ยค
= ๐จ ๐
๐
. (1.22)
In practice, the exact exponential map is executed by successively(i)changing from the Cartesian bead positions and velocities to the normal modes of the free ring polymer,(ii)numerically integrating each of the uncoupled normal mode equations of motion, and(iii)translating the time-evolved normal mode coordinates back into the Cartesian bead positions and velocities. Therefore, the numerical stability of standard RPMD numerical integration may be analyzed in normal mode coordinates, where the free ring-polymer equations of motion in Eq. (1.22) decouple into a system of๐independent oscillators with natural frequencies given by the eigenvalues of the matrix๐in Eq. (1.17).
By applying Eq. (1.20) to each normal mode coordinate, we find that strong stability of the exact free ring-polymer time evolution is violated when
ฮ๐ก = ๐ ๐
๐๐ for all๐ โฅ 1 and 1โค ๐ โค ๐โ1. (1.23) Unstable pairs of ฮ๐ก and ๐ are plotted using solid lines in Fig. 1.3(b) for selected values of ๐ and ๐. The horizontal asymptotes in this figure reflect the fact that the eigenvalues of๐converge to the eigenvalues of the continuous Laplacian endowed with periodic boundary conditions.
Unlike the exact free ring-polymer step used in standard RPMD numerical integra- tion, the Cayley modification exp(ฮ๐ก ๐ฟ0) โcay(ฮ๐ก๐จ)is strongly stable for allฮ๐ก >0 uniformly in๐. To see this, note that the Cayley transform can be equivalently com- puted in either bead or normal mode coordinates. More precisely, let๐2 =๐ผ๐2
๐ ๐ผT by the spectral decomposition of๐ given in Eq. (1.16). Direct computation then shows that
cay(ฮ๐ก๐จ) =
๐ผ 0 0 ๐ผ
cay
ฮ๐ก
0 ๐ฐ
โ๐2
๐ 0
๐ผT 0 0 ๐ผT
.
Using this correspondence, one can invoke the preceding results on the one- dimensional oscillator, to conclude that cay(ฮ๐ก๐จ)is second-order accurate, strongly stable symplectic, and time-reversible.
Since the Cayley transform meets our criteria (P1)-(P3), and under suitable condi- tions on the force ๐ญ, the Cayley modification to the RPMD numerical integrator is provably stable and second-order accurate on finite-time intervals with a stability requirement that is uniform with respect to the number of ring polymer beads. On the other hand, standard RPMD integrators may display artificial resonance instabilities because the free RP step is not always strongly stable. These insta- bilities often manifest as exponential growth in energy when strong stability is lost, as will be discussed in Section 1.4.
We emphasize that the improved numerical stability of the Cayley modification comes at zero cost in terms of algorithmic complexity or computational expense, and it preserves the same order of accuracy for the overall timestep. Use of this improved integration algorithm simply involves replacing the exact normal mode free ring-polymer step in the standard RPMD integrator with the Cayley modification.
Algorithmic comparison: Standard vs. Cayley
For complete clarity, we now present a side-by-side comparison of the full RPMD timestep (Eq. 1.2) with the free ring-polymer motion exp(ฮ๐ก ๐ฟ0)implemented using either the standard exponential map (i.e., exact normal mode evolution) or via the Cayley modification. In both cases, the full RPMD timestep associated with the splitting in Eq. (1.2) is implemented using the algorithm
Velocity half-step: ๐ โ๐+ ฮ๐ก
2 ๐ญ ๐๐
Free ring-polymer step: (๐,๐) โFRP(๐,๐;ฮ๐ก) Force evaluation: ๐ญ=โโ๐ext
๐ (๐)
Velocity half-step: ๐ โ๐+ ฮ๐ก
2 ๐ญ ๐๐
(1.24)
In standard RPMD numerical integration, the free ring-polymer step is performed exactly, using:
1. Convert bead Cartesian coordinates to normal modes using the orthogonal transformation:
๐=๐ผ๐ and ๐=๐ผ๐ (1.25)
where๐ผis the real DFT matrix defined in Eq. (1.16).
2. From ๐ก to ๐ก + ฮ๐ก, exactly evolve the free ring polymer in the normal mode coordinates:
๐๐(๐ก+ฮ๐ก) ๐๐(๐ก+ฮ๐ก)
=exp(ฮ๐ก๐จ๐) ๐๐(๐ก)
๐๐(๐ก)
(1.26) where
๐จ๐ =
0 1
โ๐2
๐ 0
,
for 0โค ๐ โค ๐โ1 with๐๐ defined in Eq. (1.17).
3. Convert back to bead Cartesian coordinates using the inverse of๐ผ, which is just its transpose, since๐ผis orthogonal.
In the Cayley modification, the only change is to use the following in place of Eq. (1.26):
๐๐(๐ก+ฮ๐ก) ๐๐(๐ก+ฮ๐ก)
=cay(ฮ๐ก๐จ๐) ๐๐(๐ก)
๐๐(๐ก)
, (1.27)
where cay is the Cayley transform given in Eq. (1.21).