Publication Cover
Molecular Physics
An International Journal at the Interface Between Chemistry and Physics
Volume 122, 2024 - Issue 5
361
Views
0
CrossRef citations to date
0
Altmetric
Research Article

Propagators for molecular dynamics in a magnetic field

ORCID Icon, ORCID Icon & ORCID Icon
Article: e2259008 | Received 14 Jun 2023, Accepted 05 Sep 2023, Published online: 25 Sep 2023

ABSTRACT

Ab initio molecular dynamics in a magnetic field requires solving equations of motion with velocity-dependent forces – namely, the Lorentz force arising from the nuclear charges moving in a magnetic field and the Berry force arising from the shielding of these charges from the magnetic field by the surrounding electrons. In this work, we revisit two existing propagators for these equations of motion, the auxiliary-coordinates-and-momenta (ACM) propagator and the Tajima propagator (TAJ), and compare them with a new exponential (EXP) propagator based on the Magnus expansion. Additionally, we explore limits (for example, the zero-shielding limit), the implementation of higher-order integration schemes, and series truncation to reduce computational cost by carrying out simulations of a HeH+ model system for a wide range of field strengths. While being as efficient as the TAJ propagator, the EXP propagator is the only propagator that converges to both the schemes of Spreiter and Walter (derived for systems without shielding of the Lorentz force) and to the exact cyclotronic motion of a charged particle. Since it also performs best in our model simulations, we conclude that the EXP propagator is the recommended propagator for molecules in magnetic fields.

GRAPHICAL ABSTRACT

1. Introduction

Since the first simulations more than 50 years ago [Citation1,Citation2], molecular dynamics has become a ubiquitous tool in computational chemistry, allowing for the calculation of reaction rates and energies [Citation3], the exploration of reaction networks [Citation4,Citation5], and the prediction of vibrational spectra [Citation6–9], including infrared, Raman, and circular dichroism spectroscopies. The principal idea is to solve the equations of motion (1) mIx¨I=dE(x)dxI,x=(x1xN),(1) to determine the motion of a set of N nuclei with masses m1,mN and positions x1(t),xN(t). The potential E(x) and the corresponding gradient are usually determined using force-field or (for smaller systems) ab initio methods, while the equations of motion are solved using propagators such as the velocity Verlet algorithm [Citation10,Citation11] or higher-order schemes [Citation12,Citation13].

In a magnetic field B, a classical particle of charge qI experiences an additional Lorentz force: (2) mIx¨I=dE(x)dxIqIB×x˙I.(2) More than 20 years ago, Spreiter and Walter recognised that the appearance of this velocity-dependent force requires a modification of the velocity Verlet scheme [Citation14]. Their algorithm, which relies on a Taylor expansion, has been incorporated into well-known software packages [Citation15,Citation16] and has been employed in diverse applications [Citation17–19].

Taking into account the electrons as quantum particles within the Born–Oppenheimer approximation, the energy becomes dependent on the magnetic field [Citation20–26], while the velocity-dependent force assumes a more general form [Citation27–29]: (3) mIx¨I=dE(x,B)dxI+J=1NAIJ(x,B)x˙J.(3) Here, the last term contains not only the bare Lorentz force acting on the nuclei [see Equation (Equation2)], but also a contribution from the Berry curvature [Citation30,Citation31], reflecting the shielding of the nuclei by the electrons [Citation32,Citation33] and introducing a coupling between the motion of different nuclei [Citation34,Citation35].

While the form and the implications of Equation (Equation3) were discussed more than three decades ago [Citation27,Citation36,Citation37], there are only a few examples where it has been actually solved for a molecular system in a magnetic field. Ceresoli and coworkers simulated an H2 model system in 2007, integrating the equations of motion with a Runge–Kutta scheme [Citation28]. In 2021, Peters and coworkers were the first to conduct accurate dynamics of H2 using the auxiliary-coordinates-and-momenta (ACM) propagator [Citation29], which is derived from a general scheme for propagating nonseparable Hamiltonians by Tao [Citation38]. A more extensive study was conducted by Monzel and coworkers [Citation39] in 2022, studying H2 and LiH with the Tajima (TAJ) propagator, originating from particle physics [Citation40].

In this work, we introduce a new propagator that we refer to as the exponential (EXP) propagator. It is inspired by the fact that equations of type (4) c˙(t)=iH(t)c(t),c(t0)=c0,(4) can, for a sufficiently small time interval [t0,t], be solved exactly using the Magnus expansion [Citation41] and approximated using matrix exponential(s) of iH [Citation42]. Such equations appear, for example, in time propagations in time-dependent Kohn–Sham theory [Citation43] and in surface-hopping algorithms [Citation44], where c corresponds to a vector of state amplitudes, while H is the Hamiltonian matrix containing energies of and couplings between the states. Here, we compare the EXP propagator to the previously published ACM and TAJ propagators, regarding their theoretical foundation, their time-step requirements, their performance during actual simulations, and properties, such as their behaviour in the zero-field case [see Equation (Equation1)], in the zero-shielding case [see Equation (Equation2)], and in the cyclotron limit [only the Lorentz force in Equation (Equation2)]. We use simulations of a HeH+ model system to corroborate our theoretical findings and test schemes to further reduce the computational cost.

Having established the equations of motion, their propagation, and the weak-field limit for the step size in Sections 2.12.3, respectively, we derive the working equations of propagators in the absence of a field as well as the ACM, TAJ, and EXP propagators in Sections 2.42.7 and compare them in Section 2.8. Computational details for the HeH+ simulations are given in Section 3, while the results of these simulations are presented and discussed in Section 4. Conclusions and an outlook are given in Section 5.

2. Theory

2.1. Equations of motion

Within the Born–Oppenheimer approximation, the equations of motion of a molecule in a magnetic field are given by [Citation27–29] (5) MIR¨I=E(R,B)RI+J=1Nnuc[ΩIJ(R,B)δIJZIB~]R˙J.(5) Here, we use indices I,J, for the Nnuc nuclei. RI, ZI, MI, and R˙I are the position, charge, mass, and velocity of nucleus I, while the 3Nnuc-dimensional column vector R denotes the collective nuclear coordinates: (6) R=(R1RNnuc),RI=(RIxRIyRIz)(6) We represent the uniform magnetic field B of strength B by the 3×3 antisymmetric matrix B~ in the manner (7) B~=(0BzByBz0BxByBx0),B=(BxByBz),B=|B|(7) so that (8) B~R˙I=B×R˙I.(8) The first term in Equation (Equation5) is the gradient of the Born–Oppenheimer electronic energy, obtained at some ab initio level of theory, (9) E(R,B)=ϕ(R,B)|Hel(R,B)|ϕ(R,B),(9) where Hel(r,R,B) and ϕ(r;R,B) are the electronic Hamiltonian and wave function, respectively, both of which depend on the electronic coordinates r [over which the integration is performed in Equation (Equation9)]. The second term in Equation (Equation5) is the Lorentz force arising from the nuclear charge screened by the surrounding electrons. This shielding is represented by the Berry curvature, whose IJ blocks, (10) ΩIJ(R,B)=(ΩIxJx(R,B)ΩIxJy(R,B)ΩIxJz(R,B)ΩIyJx(R,B)ΩIyJy(R,B)ΩIyJz(R,B)ΩIzJx(R,B)ΩIzJy(R,B)ΩIzJz(R,B)),(10) are Cartesian matrices whose elements (here we only show the xy-element), (11) ΩIxJy(R,B)=2ϕ(R,B)RIx|ϕ(R,B)RJy,(11) are determined from derivatives of the electronic wave function with respect to the corresponding nuclear coordinates. For more details on the calculation (at the Hartree–Fock level of theory) and interpretation of the Berry curvature, see Refs. [Citation30–33].

With M being the 3Nnuc×3Nnuc-dimensional matrix with the nuclear masses MI on the diagonal, we can define the kinetic momenta of the nuclei as (12) Π=MR˙.(12) We may now rewrite the nuclear equations of motion in Equation (Equation5) in the more convenient form (13) Π˙=F(R,B)+W(R,B)Π,(13) where F(R,B) is the 3Nnuc-dimensional vector of the Born–Oppenheimer gradient forces and W(R,B) is a 3Nnuc×3Nnuc matrix, whose IJ blocks of dimension 3×3 contain the corresponding block of the Berry curvature as well as the contribution from the bare (unscreened) Lorentz force: (14) WIJ(R,B)=MJ1[ΩIJ(R,B)δIJZIB~].(14) The form of the equations of motion given in Equation (Equation13) highlights that the effect of the magnetic field is twofold: It changes the potential energy surface leading to different Born–Oppenheimer gradient forces and it introduces an additional, velocity-dependent term.

2.2. Propagators: general considerations

The main objective of this theory section is to discuss how these modified equations of motion can be integrated efficiently using different propagators. We denote by (15) xa=R(t+aΔt),(15) (16) πa=MR˙(t+aΔt),(16) the position and momentum, respectively, of the system at time a relative to time t in units of the time step Δt. Introducing the notation (17) fa=F(xa,B),(17) (18) wa=W(xa,B),(18) we may now express the equations of motion in terms of differentials with respect to the factor a (19) π˙a=Δt1πaa=fa+waπa,(19) (20) x˙a=Δt1xaa=M1πa.(20) The choice of the step length Δt, here appearing as a prefactor, will be discussed in the next subsection.

In this notation, a propagator is defined as a scheme that updates the coordinates (x0x1) and momenta (π0π1) for a given Δt. Since Equations (Equation19) and (Equation20) depend on each other, they are usually solved alternately for a series of substeps. To ease their reading, we will only derive working equations for a single set of those substeps, (21) π0πa:πa=Δt0a(fα+wαπα)dα+π0,(21) (22) x0xb:xb=ΔtM10bπβdβ+x0,(22) where x0 and π0 are initial values and a and b are arbitrary step lengths in units of Δt. Equations for all other substeps can then be derived by adjusting the initial values and step lengths accordingly.

To evaluate the integrals in Equations (Equation21) and (Equation22), we will draw inspiration from the mean-value theorems. They state that, for real-valued functions φ(α) and ψ(α) that are continuous in [0,a], there exists a point 0ba such that (23) 0aφ(α)dα=(b),(23) and (24) 0aφ(α)ψ(α)dt=ψ(0)0bφ(α)dα+ψ(a)baφ(α)dα.(24) The corresponding statements are not guaranteed to hold for vector-valued functions; however, we will at one point rely on them as approximations. Specifically, we use the forms (25) 0aφ(α)dαφ(b)0adα=aφ(b),(25) and (26) 0aψ(α)φ(α)dα0bψ(α)φ(0)dα+baψ(α)φ(a)dα,(26) to approximate integrals over two vectors of continuous functions φ(α) and ψ(α). Note that both the midpoint rule and the trapezoidal rule can be derived from these mean-value approximations by choosing b=a/2 and, in case of latter, ψ(α)=1: (27) 0aφ(α)dαφ(a/2)0adα=aφ(a/2)(27) (28) 0aφ(α)dα0a/2φ(0)dα+a/2aφ(1)dα=a2[φ(0)+φ(1)](28)

2.3. Choice of step size

The error introduced by a given propagator depends on the applied step size Δt. Before considering the different propagators, we discuss briefly in this subsection the restriction on the time step imposed by an external magnetic field. As in field-free simulations, we demand that the time step Δt is significantly smaller than the fastest molecular vibration. In addition, we demand that the matrix Δtwa is convergent for all a, meaning that (29) limn[Δtwa]n=0(29) Introducing the spectral radius ρ (30) ρ(waTwa)=ωa,(30) which we loosely interpret as a cyclotron frequency, we have (31) limn[Δtwa]nlimnΔtnρ(waTwa)n/2=limn(Δtωa)n(31) in some matrix norm . Consequently, Equation (Equation29) holds when (32) Δt<ωa1.(32) This weak-field limit, as defined by Spreiter and Walter [Citation14], means that the time step is small enough to resolve the cyclotronic motion. For a neutral molecule, the charge–mass ratio is roughly on the order of 104a.u., so that (33) ωa104B.(33) Time steps of up to 100 a.u. (2.4 fs) therefore allow for simulations in field strengths up to about 10B0, covering the entire range of field strengths from the (particularly interesting) intermediate regime (<1B0) up to the Landau regime.

2.4. Propagators in the absence of a field

For the field-free case, w is zero so that we can directly apply the mean-value approximation Equation (Equation25) to Equations (Equation21) and (Equation22): (34) πa=Δt0afαdα+π0aΔtfb+π0(34) (35) xb=ΔtM10bπβdβ+x0bΔtM1πa+x0(35) As shown in Algorithm 1, both equations are solved alternately using the current forces and momenta as mean values to propagate the momenta and positions, respectively. The remaining task is now to come up with a series of a's and b's (denoted by the vectors a and b) to approximate the mean values. The lengths of a and b (K + 1 and K) reflect the order K of the scheme.

In the standard velocity Verlet scheme (K = 1) [Citation10,Citation11], we set a=[0.5,0.5] and b=[1.0], so that we obtain: (36) π0.5VV=0.5Δtf0+π0(36) (37) x1VV=Δt[M1π0.5VV]+x0(37) (38) π1VV=0.5Δtf1+π0.5VV(38) Note that this quadrature corresponds to solving the full integral (a=1) in Equation (Equation34) with the trapezoidal [see Equation (Equation28)] and the full integral in Equation (Equation35) (b=1) with the midpoint rule [see Equation (Equation27)]. As a consequence of this the velocity Verlet algorithm is symplectic, time-reversible, and of second-order accuracy. However, it has been shown that higher-order schemes [Citation12,Citation13], can significantly increase the stability of the dynamics.

Unfortunately, there is no straightforward expansion of the upper scheme towards systems with velocity-dependent forces since, taking the velocity Verlet algorithm as an example, the step of Equation (Equation38) becomes (39) π10.5Δt(f1+w1π1)+π0.5(39) The mismatch between the required (π1) and the available (π0.5) momenta for the propagation leads to a systematic error in the integration of the equations of motion [Citation29]. Clearly, there is a need to develop alternative propagators, which will be done in the following subsections.

2.5. Auxiliary-coordinates-and-momenta propagator

The auxiliary-coordinates-and-momenta (ACM) propagator method was proposed by Tao for general nonseparable Hamiltonians [Citation38] and adapted by Peters and coworkers for molecular simulations in a magnetic field [Citation29]. The idea is to circumvent the mismatch in Equation (Equation39), by introducing an additional pair of coordinates and momenta (x,π) that are kept close to the original pair (x,π) during the dynamics (xx and ππ). If this coupling is sufficiently strong, we can write the propagation of π in terms of π and x (40) πaaΔt[fb+wbπb]+π0,(40) (41) xbbΔt[M1πa]+x0.(41) and the propagation of π in terms of π and x (42) πbbΔt[fa+waπa]+π0,(42) (43) xaaΔt[M1πb]+x0,(43) The only remaining step is the coupling of coordinates and momenta, which is done when all quantities x, π, x, and π are at the same time step by carrying out, for a given coupling constant s, the transformation [Citation29] (44) (xcxcM1πcM1πc)sbs(xcxcM1πcM1πc)(44) with the coupling matrix (45) sbs=12(1+cosχ1cosχs1sinχs1sinχ1cosχ1+cosχs1sinχs1sinχssinχssinχ1+cosχ1cosχssinχssinχ1cosχ1+cosχ)(45) where (46) χ=sbΔt(46) Setting s=0 reduces the coupling matrix to the unity matrix, while setting it to s=π/(cΔt) leads to a complete exchange of x and π with x and π and vice versa. The pseudo code for a general ACM propagator of order K is given in Algorithm 2.

2.6. Tajima propagator

An alternative to the ACM propagator is the Tajima (TAJ) propagator. Initially used in particle physics [Citation40], it was rewritten for molecular applications by Monzel et al. [Citation39]. Here, we present a slightly different derivation of the working equations that starts with applying the mean-value approximations [Equations (Equation25) and (Equation26)] to Equation (Equation21): (47) πaaΔtfb+Δt0cwαπ0dα+Δtcawαπadα+π0(47) Assuming that c=a/2 and that both integrals have the same mean value wb, we obtain: (48) [1a2Δtwb]πaaΔtfb+[1+a2Δtwb]π0(48) Introducing the inverted matrix (49) vbc=[1cΔtwb]1,(49) we arrive at the working equation for the TAJ propagator, (50) πavba/2(aΔtfb+[1+a2Δtwb]π0),(50) yielding the algorithm in Algorithm 3. In the weak-field limit [see Equation (Equation29)], we can expand the matrix inversion in a Neumann series: (51) vbc=n=0[cΔtwb]n=n=0N1[cΔtwb]n+O([Δtωb]N)(51) In standard applications, we expect this series to converge fast. Using the estimate in Equation (Equation33) with B = 0.1 and Δt=10 in atomic units, the error is on the order of 108 when using N=2. Consequently, we can avoid the (comparably) high computational cost of matrix inversions during the simulations.

2.7. Exponential propagator

A general approach to solving first-order linear differential equations is the Magnus integrator method. Specifically, we may write (52) πa=Δtγaexp(yα,a)fαdα+exp(yγ,a)πγ(52) where γ is chosen so that the Magnus series [Citation41], (53) yγ,a=Δtγadαwα+12(Δt)2γadαγαdβ[wα,wβ]+,(53) converges. From ya,a=0 and (54) exp(yγ,a)a=Δtwaexp(yγ,a),(54) it is straightforward to verify that Equation (Equation52) solves Equation (Equation19) and is thus an alternative to Equation (Equation21). We can set γ to zero from now on, since our choice of step size in Equation (Equation32) ensures the convergence of the Magnus series in this case. Truncating the Magnus series after the first term and applying the mean-value approximation [Equation (Equation25)], the matrix exponential becomes (55) exp(yα,a)exp([aα]Δtwb)=ubaα,(55) where we have introduced the matrix exponential (56) ub=exp(Δtwb)(56) Equation (Equation52) now becomes: (57) πaΔt0aubaαdαfb+ubaπ0(57) Approximating the remaining integral via the midpoint rule [Equation (Equation27)], we obtain (58) πaaΔtuba/2fb+ubaπ0=uba/2[aΔtfb+uba/2π0](58) as the exponential propagator (EXP) for the nuclear momenta in magnetic fields; see Algorithm 4. The matrix exponential can be expanded as (59) ubc=n=01n![cΔtwb]n=n=0N11n![cΔtwb]n+O([Δtω]N/N!).(59) In contrast to the Neumann series, this series converges unconditionally, for all step sizes.

2.8. Comparison of the propagators

We close this section by discussing a few properties of the introduced propagators. The results are summarised in Table . From Algorithms 2–4, we see that the ACM propagator is about three times more expensive than the other schemes, requiring 3K instead of K forces and Berry curvature calculations per step. In addition, it depends on the definition of a parameter (s), which has an influence on the stability of the dynamics. Moreover, unlike the ACM propagator, TAJ and EXP propagators converge to the correct zero-field solution when setting B and therefore wb to zero.

Table 1. Comparison of the auxiliary coordinates and momenta (ACM), Tajima (TAJ), and exponential (EXP) propagator.

As the correct zero-shielding limit, we define the propagators derived by Spreiter and Walter, which were constructed for the special case where the Berry curvature is zero. While their working equations clearly differ from the ACM propagator, we can compare them to the TAJ and EXP propagators by assuming a single particle with charge Z1 and mass M1, experiencing a time-dependent external force f and a magnetic field of strength Bz in the z-direction. In this particular case, w and thus ua and va are constants (60) w=(0ω0ω00000)ω=BzZ1M1,(60) and the velocity Verlet variants of the EXP and TAJ propagator reduce to (61) π1EXP=Δt2(u0.25f1+u0.75f0)+u1π0,(61) (62) π1TAJ=Δt2(v0.25f1+v0.25[1+Δt4w]v0.25f0)+v0.25[1+Δt4w]v0.25[1+Δt4w]π0,(62) respectively. Expanding ua and va up to second order (63) ua=1+aΔtw+12a2(Δt)2w2+O([Δt]3)(63) (64) va=1+aΔtw+a2(Δt)2w2+O([Δt]3)(64) and using the Taylor expansion of the forces in y-direction (65) f1y=f0y+Δtdf0ydt+O([Δt]2),(65) we obtain, for both EXP and TAJ, an expression that is identical to those obtained by Spreiter and Walter via inversion [see Equation (16) in Ref. [Citation14]] and via Taylor expansion [see Equation (39) in Ref. [Citation14]]: (66) π1x=π0x+Δt2[f0x+f1x+2ωπ0y]+14(Δt)2[2ωf0y2ω2π0x]+O([Δt]3)(66) Their difference, however, becomes obvious when additionally setting the forces in Equations (Equation61) and (Equation62) to zero: (67) π1EXP=u1π0(67) (68) π1TAJ=v0.25[1+Δt4w]v0.25[1+Δt4w]π0(68) In this cyclotron limit, the EXP propagator collapses to the exact result for the cyclotron motion of a single, charged particle (69) π1EXP=(cos(Δtω)sin(Δtω)0sin(Δtω)cos(Δtω)0000)π0,(69) while TAJ introduces an error at the order of O([Δtω]3). For the previously mentioned estimate [see Equation (Equation33)] with B = 0.1 and Δt=10, this results in an error at the order of 1012 (all given in atomic units). Thus, in practice EXP and TAJ trajectories and their computational cost will be very similar.

3. Computational details

3.1. Diatomic model system

To conduct a study of the performance of the previously discussed propagators, we carry out simulations of a diatomic model system perpendicular to the magnetic field. It has been shown that, in this particular case, the Berry curvature can be represented exactly by a set of Berry charges QIJ(R,B) and Berry charge fluctuations PIJ(R,B) [Citation30,Citation33] (70) ΩIJ(R,B)=QIJ(R,B)B~PIJ(R,B)[B~R¯IJR¯IJTR¯IJR¯IJTB~],(70) where R¯IJ is the normalised interatomic distance vector: (71) R¯IJ=dIJ1[RJRI]dIJ=|RJRI|(71) For a more detailed derivation and discussion of QIJ(R,B) and PIJ(R,B), we refer the reader to Refs. [Citation32,Citation33,Citation45].

Our model system has been designed to reproduce the properties of HeH+ at field strength 0.1B0, with energies E(dHeH), Berry charges QIJ(dHeH), and Berry charge fluctuations PIJ(dHeH) obtained by spline fitting of Hartree–Fock (HF)/lu-aug-cc-pVTZ [Citation46–48] results for different bond lengths (dHeH) at this field strength. The prefix ‘lu-’ indicates the use of an uncontracted London orbital basis set, as suggested in Ref. [Citation49]. The Berry charges and Berry charge fluctuations were extracted from the numerical Berry curvature [Citation30] in a least-squares fashion (see Ref. [Citation33]). All calculations were performed with the London [Citation50] programme package. The resulting bond-length dependence of the energy and charges is shown in Figure . We note that HeH+ dissociates into He with effective charge ZHe+QHeHe=0 and a proton H+ with effective charge ZH+QHH=1. In the bonding region, both nuclear charges are partially screened by the electrons. Note that, in our calculations, we neglect the magnetic-field dependence of the electronic energy itself E(dHeH), of the Berry charges, QIJ(dHeH), and of the Berry fluctuations PIJ(dHeH). The magnetic field therefore enters the calculations only through the explicit field-dependence of the model Berry curvature – that is, by the dependence on B~ in Equation (Equation70). This approach allows for a more systematic study of the propagators, since only the velocity-dependent forces increase linearly with B, while the potential-energy surface and the electronic structure remain unaffected. Because of its overall charge, small mass, and significant geometry dependence of the screening [see Figure (b)], the HeH+ model system can be regarded as an extreme case, featuring (comparably) large cyclotron frequencies (ω).

Figure 1. Bond-length (dHeH) dependent energies (a) and charges (b) derived from the Berry curvature of HeH+ at the HF/lu-aug-cc-pVTZ level of theory perpendicular to a field of B=0.1B0. We consistently use atomic units.

Figure 1. Bond-length (dHeH) dependent energies (a) and charges (b) derived from the Berry curvature of HeH+ at the HF/lu-aug-cc-pVTZ level of theory perpendicular to a field of B=0.1B0. We consistently use atomic units.

3.2. Molecular simulations

All NVE simulations (constant number of particles, volume, and energy) were conducted in the xy-plane with the magnetic field aligned along the z-axis. Each simulation began at the equilibrium geometry, with random initial momenta. We investigated the ACM propagator Algorithm 2, the TAJ propagator Algorithm 3, and the exponential operator Algorithm 4 at three different orders K: the velocity-Verlet (VV) scheme [Citation10,Citation11] with K = 1, the OM scheme of Omelyan et al. [Citation12] with K = 4, and the RK4 scheme (S6/O4 in Ref. [Citation13]) with K = 6. The corresponding factors a and b are given in Table .

Table 2. Coefficients a and b for the different integrators of order K used in this work.

Each trajectory was simulated for 24 ps using (if not stated otherwise) an effective time step (Δt/K) of 0.1 fs, storing energies, geometries, and momenta every 2.4 fs. For the ACM propagator, we used an optimised coupling constant s=0.013. Where N is not given, we used the standard matrix-inversion and exponential algorithms of python3.6 to calculate v and u in the TAJ and EXP propagators, respectively, and the truncated series of Equations (Equation51) and (Equation59) otherwise. Estimating that Δtω=4.5×104B, we apply a magnetic-field range of 102103 in units of B0 to ensure that the weak-field condition in Equation (Equation32) holds for all simulations.

We use the standard deviation of the total energy (ϵtot) as a criterion for the stability of the dynamics. In order to estimate the cost-accuracy ratio of the methods, we also study the behaviour of this error measure with respect to the step length: (72) ϵtotpΔto(72) The prefactor p and the order o are determined as the intercept and slope of a log(ϵtot)-log(Δt)-plot, respectively, generated from a series of simulations with constant B but varying Δt between 0.01 fs and 0.6 fs. In addition, vibrational spectra [Citation8,Citation29] and the centre-of-mass motion are used to compare trajectories of the different propagators.

4. Results and discussion

In Figure , we have plotted ϵtot for HeH+ as a function of field strength B for the ACM, TAJ, and EXP propagators with K = 1. The results for K = 4 and K = 6 are very similar and therefore not included in the figure.

Figure 2. Standard deviation of the total energy (ϵtot) during simulations of the HeH+ model system using different magnetic field strengths and propagators with K = 1 (velocity Verlet): Auxiliary coordinates and momenta (ACM), Tajima (TAJ), and exponential (EXP) propagator.

Figure 2. Standard deviation of the total energy (ϵtot) during simulations of the HeH+ model system using different magnetic field strengths and propagators with K = 1 (velocity Verlet): Auxiliary coordinates and momenta (ACM), Tajima (TAJ), and exponential (EXP) propagator.

In general, all three propagators become less stable with increasing field strength – in particular the ACM propagator, for which the simulation at 103B0 becomes unstable. At this high field strength (characteristic of neutron stars rather than white dwarfs), a reoptimisation of the coupling-strength parameter s may be required. In agreement with a previous comparison of the ACM and TAJ propagators [Citation39], we note that the ACM propagator performs less well than the TAJ and EXP propagators. Since, in addition, the TAJ and EXP propagators are parameter-free and since they require only one rather than three force and Berry-curvature calculations per step, we conclude that the TAJ and EXP propagators are to be preferred over the ACM propagator.

While the EXP and TAJ propagators are indistinguishable at low field strengths, the EXP propagator becomes marginally more stable for B>10B0, as the cyclotronic centre-of-mass motion of the charged HeH+ system begins to dominate the trajectories. However, even at 10B0, the centre-of-mass motions and the vibrational spectra of the two propagators are still indistinguishable and in fact identical to those obtained with the ACM propagator; see Figure . In line with previous studies on diatomics [Citation29,Citation39], the peaks in the vibrational spectrum of HeH+ Figure (b) correspond to the cyclotronic centre-of-mass motion [30cm1, also visible in Figure (a)], rotation (370cm1), and vibration (3350cm1), and feature splitting patterns that arise from the couplings between the different modes. Selecting one set of simulations at low (B=0.1B0) and one at high field strengths (B=100B0), we list the order o and prefactor p of ϵtot with respect to Δt in Table . It clearly shows that all propagators with K = 1 are, just like VV in the field-free case, of second order in both regimes. Therefore, the trends of ϵtot in Figure  solely arise from p. Note that, while o is approximately constant, p might change for a different system.

Since the EXP propagator is the most stable propagator, we restrict our attention to this propagator when investigating dependence on the propagator order K and on the truncation level N in the exponential series; see Figure (a,b), respectively. We expect the TAJ propagator to show a similar behaviour, while an investigation of the influence of K on the ACM propagator can be found in Ref. [Citation29]. At low field strengths, the higher-order schemes (i.e. OM with K = 4 and RK4 with K = 6) improve the stability of the EXP propagator by up to two orders of magnitude; see Figure (a). These higher-order schemes therefore allow for a significantly larger effective time step Δt/K (constant in Figure ), reducing the computational cost of the dynamics. Perhaps surprisingly, the OM and RK4 schemes become less stable than the lower-order VV scheme as the velocity-dependent forces become dominant in the Landau regime (beyond 10B0). Both observations are in line with the behaviour of o and p listed in Table . At 0.1B0, both OM and RK4 are of fourth order and show a significantly smaller p, while at 100B0 only p is smaller when comparing to the VV scheme with K = 1. Since the latter is not enough to compensate the increasing number of calculations per time step, the higher-order schemes become more expensive. Both Figure (a) and Table  prove that the coefficients a and b (see Algorithm 4) need to be adjusted at high field strengths to obtain o>2 in the Landau regime.

Simulations with a truncated exponential series at N = 2 in Equation (Equation59) reproduce the results obtained with the exact matrix exponential for field strengths up 10B0; see Figure . Since calculating a matrix exponential is (comparably) expensive, replacing it with a series will reduce the computation time. For N = 2 at higher field strengths, the truncation error exceeds O([ωΔt]2)=105, giving unstable dynamics. This indicates that N must be chosen with care.

Figure 3. Centre-of-mass motion (a) and vibrational spectra of He (b) obtained from the simulations of the HeH+ model system at B=10B0 using different propagators with K = 1 (Velocity Verlet): Auxiliary coordinates and momenta (ACM), Tajima (TAJ), and exponential (EXP) propagator.

Figure 3. Centre-of-mass motion (a) and vibrational spectra of He (b) obtained from the simulations of the HeH+ model system at B=10B0 using different propagators with K = 1 (Velocity Verlet): Auxiliary coordinates and momenta (ACM), Tajima (TAJ), and exponential (EXP) propagator.

Table 3. Orders (o) and prefactors (p) of the auxiliary coordinates and momenta (ACM), Tajima (TAJ), and exponential (EXP) propagator at two different field strenghts (B).

Figure 4. Influence of the order of the EXP propagator (K, a) and the truncation of the exponential series (N, b) on the standard deviation of the total energy (ϵtot) during simulations of the HeH+ model system using different magnetic field strengths. The reference (exact exponential with K = 1) is shown as a dashed black line in both plots.

Figure 4. Influence of the order of the EXP propagator (K, a) and the truncation of the exponential series (N, b) on the standard deviation of the total energy (ϵtot) during simulations of the HeH+ model system using different magnetic field strengths. The reference (exact exponential with K = 1) is shown as a dashed black line in both plots.

5. Conclusion and outlook

In this work, we have studied three propagators for molecular dynamics in a magnetic field – namely, the auxiliary-coordinates-and-momenta (ACM) propagator, the Tajima (TAJ) propagator, and the new exponential (EXP) propagator, testing their performance using simulations of a HeH+ model system at different field strengths (102103B0).

The EXP propagator, which was derived from a truncated Magnus expansion, correctly reduces to the standard velocity Verlet propagator in the zero-field limit, the propagators of Spreiter and Walter [Citation14], neglecting electron shielding, and the cyclotronic motion of a charged particle. Since it also performed best in our model simulations and showed the best stability, especially at higher field strengths, we recommend the EXP propagator for simulations of molecules in a magnetic field. However, the TAJ propagator delivers identical results at field strengths 1B0 and the more expensive ACM propagator might be useful for cases where the energy and/or the electron shielding depend on the nuclear momenta.

In the study of molecules in strong magnetic fields, we are usually interested in field strengths below 1B0 and apply time steps of Δt=0.1fs to resolve the molecular vibrations. In practice, these time steps are small enough to resolve the cyclotronic motion (weak field limit), while, additionally, allowing for the use of higher-order schemes and truncation of the exponential series to reduce the computational cost of the EXP propagator.

Acknowledgments

We thank Tanner Culpitt for helpful discussions.

Disclosure statement

No potential conflict of interest was reported by the author(s).

Additional information

Funding

This work was supported by the Research Council of Norway [Norges Forskningsråd] through ‘Magnetic Chemistry’ [grant number 287950] and CoE Hylleraas Centre for Quantum Molecular Sciences [grant number 262695]. The work also received support from the UNINETT Sigma2, the National Infrastructure for High Performance Computing and Data Storage, through a grant of computer time [grant number NN4654K].

References