Density artefacts at interfaces caused by multiple time-step effects in molecular dynamics simulations [version 1; peer review: 1 approved, 1 approved with reservations]

Background: Molecular dynamics (MD) simulations have become an important tool to provide insight into molecular processes involving biomolecules such as proteins, DNA, carbohydrates and membranes. As these processes cover a wide range of time scales, multiple timestep integration methods are often employed to increase the speed of MD simulations. For example, in the twin-range (TR) scheme, the nonbonded forces within the long-range cutoff are split into a shortrange contribution updated every time step (inner time step) and a less frequently updated mid-range contribution (outer time step). The presence of different time steps can, however, cause numerical artefacts. Methods: The effects of multiple time-step algorithms at interfaces between polar and apolar media are investigated with MD simulations. Such interfaces occur with biological membranes or proteins in solution. Results: In this work, it is shown that the TR splitting of the nonbonded forces leads to artificial density increases at interfaces. The presence of the observed artefacts was found to be independent of the interface shape and the thermostatting method used. It is further shown that integration with an impulse-wise reversible reference system propagation algorithm (RESPA) only shifts the occurrence of density artefacts towards larger outer time steps. Using a single-range (SR) treatment of the nonbonded interactions, on the other hand, resolves the density issue for pairlist-update periods of up to 40 fs. Conclusion: A SR scheme avoids numerical artefacts and offers an interesting alternative to TR RESPA with respect to performance optimization. Open Peer Review


Introduction
To describe the dynamic processes of biomolecules, such as proteins, DNA, carbohydrates and membranes, molecular dynamics (MD) simulations have been proven to be a powerful technique to provide insights at the atomic level. In MD simulations, physical processes that involve a wide range of time scales have to be considered appropriately. However, the accurate and efficient treatment of various time scales presents a notoriously difficult problem due to resonance artefacts arising from separation into distinct numerical subproblems 1,2 . Over the past decades, various methods have been proposed to mediate the issue and to speed up the simulation substantially. For example, fast vibrational modes (e.g. covalent bonds) can be removed completely by constraining the motion, e.g. using SHAKE 3 , SETTLE 4 , M-SHAKE 5 , LINCS 6 , or FLEXSHAKE 7 . Alternatively, multiple time-step (MTS) integration is an efficient approach to accommodate motions on different time scales. In the twin-range (TR) scheme 8-10 , the pairwise nonbonded forces nb i f acting on particle i are split into a short-range contribution from particles j within the cutoff R s , and a mid-range contribution from particles j between R s and the long-range cutoff R l (see Figure 1 are updated every n m -th time step, n m ∆t with n m ≥ 1 (outer time step). Longrange electrostatic interactions beyond the cutoff radius R l can be included using the (an)isotropic reaction-field methods (RF or ARF) 11,12 , or lattice-sum methods 13,14 . Although theoretically possible, the TR scheme is generally not used together with lattice-sum methods. Simulations with (A)RF typically use larger cutoffs R l than simulations with PME (e.g. 1.4 nm for the GRO-MOS force field 15 compared to 0.9 nm for the AMBER force field 16 ), which in the past encouraged the use of a TR scheme to reduce the computational cost.
In practice, for each particle i two pairlists are generated, which track the neighbouring short-range and mid-range particles j. To be consistent, the period of updating both pairlists n p ∆t should be equal to the period of updating the mid-range forces n m ∆t. In the following, the TR scheme is defined by R s < R l and n m = n p > 1, and the single-range (SR) scheme by R s = R l , n m = 1 and n p ≥ 1, i.e. there is only one pairlist for SR.
Splitting the forces into different contributions leaves some freedom of how to consider them in the integration. There are two main strategies for the inclusion of the outer contributions: (i) constant mid-range forces application (CFA) m i f at every inner time step ∆t, or (ii) using a reversible reference system propagator algorithm (RESPA) 8-10 , which is based on the Trotter factorisation of the Liouville propagator 17 . In the case of RESPA, scaled mid-range forces n m m i f are typically applied impulse-wise, i.e. only at every outer time step n m ∆t. Note that in this work the leap-frog scheme 18 is used for the integration of the equations of motion, which is similar 19 to velocity-Verlet 20 as typically employed with RESPA.
Although computationally efficient, MTS algorithms have the disadvantage of introducing numerical artefacts. Due to nonlinearity, it is notoriously difficult to formulate general physical or chemical conditions, which favour or suppress the build-up of these undesired resonances. Instead, specialised thermostats have been proposed as a remedy, which suppress resonance artefacts from MTS integration, for example by imposing isokinetic constraints on every degree of freedom 21-23 , or by selectively targeting the high-frequency modes using a colored noise thermostat 24 . In practice, however, standard thermostats like weak-coupling 25 , Nosé-Hoover (chain) 26-28 , or stochastic thermostats 29-31 remain widely used in combination with a moderate integration time-step difference between fast and slow motions, as this should limit resonance artefacts to an acceptable value.
In this work, artefacts due to MTS integration are investigated with the main focus on a water-chloroform layer system using different thermostats ( Figure 1). This system represents a simplified version of a biological membrane, for which an accurate simulation is of high interest in biology. The impact of splitting the nonbonded interactions into a short-range and mid-range contribution on the density profile normal to the interface and the kinetic energy distribution is investigated. In addition, a planar system consisting of cyclohexane and water as well as corresponding droplet systems are investigated. These additional setups allow to assess the impact of different solvents as well as different interface geometries on the formation of MTS artefacts. Overall, the artefacts are larger than those observed for more well-behaved, homogeneous systems 32,33 .

Methods
For all simulations, the GROMOS software package 34 version 1.4.0 was used with the GROMOS 53A6 force field 15 . Periodic boundary conditions were applied. Newton's equations of motion were integrated using the leap-frog scheme 18 with an inner time step of 2 fs. Different outer time steps for the pairlist update or mid-range force evaluation were used (i.e. n m , n p ∈ [1, 20]). If not indicated otherwise, the SR scheme corresponds to a midrange force evaluation every 2 fs (n m = 1) and a pairlist update every 10 fs (n p = 5). The TR scheme typically corresponds to a mid-range force evaluation in combination with a pairlist update every 10 fs (n m = n p = 5). If not stated otherwise, the CFA method was used for the mid-range force contributions. The inner cutoff radius R s was set to 0.8 nm and the outer cutoff radius R l to 1.4 nm. For all simulations with RF, a charge-group based pairlist algorithm and cutoff were used (each solvent molecule is a single charge group), whereas an atomic cutoff was used for the PME simulations. The center of mass motion was stopped every 1 ps. The coordinates were saved every 0.2 ps and the energies every 0.1 ps. Bond lengths were constrained using the SHAKE algorithm with a geometric tolerance of 10 −4 . Three different thermostats were tested, i.e. weak coupling 25 (WC), Nosé-Hoover 26,27 (NH,) and Nosé-Hoover chain 28 (NHchain). Different temperature baths were used for different solvents. The coupling time τ was set to 0.1 ps for all three thermostatting methods. A chain length of three was employed for the NHchain thermostat. A standard homogeneous RF approach 11 was used to mimic long-range electrostatic interactions beyond a chargegroup based cutoff R l . The dielectric permittivity was set to 78.5, which corresponds to the experimentally measured value of water 35 .

Systems
The MTS investigation was performed mainly using a waterchloroform layer, in combination with three auxiliary systems consisting of a water-cyclohexane layer, a chloroform sphere in a water box, and a cyclohexane sphere in a water box. An illustration of the setups is shown in Figure 1. With these additional systems, different geometries of the interface as well as different chemical compositions were tested. An overview of the simulated systems can be found in Table 1. Corresponding snapshots are provided in Figure S1 (Supplementary File 1).
The main system consisted of 2002 chloroform (CHCl 3 ) 36 molecules and 8129 SPC 37 water molecules within an elongated rectangular box of 30.2 nm length in z-direction. Identical initial coordinates were used for all simulations, which were equilibrated for 1 ns using the SR scheme under NVT conditions. The simulation length of the production simulations was 1-4 ns, performed under NVT conditions. For the water-cyclohexane layer system, 6750 cyclohexane (C 6 H 12 ) and 39'366 water molecules were used in an elongated rectangular box of 33.85 nm length in z-direction. This system was simulated under NVT as well as NPT conditions (using a Berendsen barostat 25 with a coupling time τ b = 0.5 ps). The droplet systems consisted of a droplet of about 3 nm radius, solvated in a box of 12.2 nm length. This setup led to a droplet with 847 CHCl 3 molecules in 59'484 SPC water molecules, or a droplet with 619 C 6 H 12 molecules solvated in 59'018 SPC water molecules, respectively. As the convergence towards the numerical artefacts was found to be very fast, all auxiliary systems were simulated without initial equilibration for 1 ns.

Analysis
For the spatially resolved density analysis, a program was developed using the data structures provided by the GROMOS++ collection of programs 38 . The energy distributions were calculated by post-processing the output of the GROMOS++ program ene_ana accordingly. For the density calculations of the spherical interfaces, a slightly more sophisticated analysis approach was necessary. In order to obtain a radial density profile, the molecules were assigned to equidistant concentric spherical shells with respect to the center of geometry of the droplet. However, for the droplet it was difficult to define consistently a distance to the surface, because the interface may deviate substantially from its ideal spherical shape during simulation. In our analysis, the center of mass was chosen as an approximation of the center of geometry, which was then shifted (if necessary) in order to account for periodic boundary conditions, i.e. to ensure that the droplet remained at the center of the periodic box. Note that the volume of the spherical shells scales cubically with the radius, which increases the uncertainty of the estimator substantially close to the center of the droplet.

Results & discussion
The density profile of the water-chloroform system was determined along the z-axis normal to the layer. As can be seen in Figure 2, the splitting of the forces into a short-range and a less frequently updated mid-range contribution (given in Equation (1)) using the TR CFA scheme with n m = n p = 5 led to a significant density increase for chloroform close to the interface. The density increase was accompanied by a density decrease further away from the interface due to the constant volume conditions. The presence of an increase was found to be independent of the chosen thermostatting algorithm. An analysis of the density resonance pattern with respect to the outer time step n m ∆t is shown in Figure 3. Note that the density artefacts are not perfectly symmetric with respect to the layer norm due to finite simulation time.
It can be seen that the TR CFA scheme leads to large resonance artefacts beyond n m ∆t ≈ 20 fs independent of the thermostatting method. On the other hand, evaluating the mid-range forces every step while keeping the pairlist update every fifth step (i.e. SR scheme with n m = 1 and n p = 5) resolved the issue almost entirely for all three investigated thermostats ( Figure 2 and Figure 3, data not shown for NH and NHchain). The minor differences between SR schemes with different update frequencies can only be seen in density difference plots ( Figure 4) with respect to the SR reference run (n m = n p = 1).
These findings indicate that the observed density increase is mainly caused by resonance artefacts due to the CFA MTS integration. This argumentation is supported by the pairlist error analysis shown in Figure S2, Supplementary File 1. The change in the pairlist after 10 fs is only on the order of 1%, and, even more importantly, it scales sublinearly with n m . Thus, the error from the pairlist cannot explain the substantial density increases seen in Figure 3. Instead, resonance effects lead to the build-up of the observed density artefacts over time, until a local equilibrium configuration is reached at the interface. This was found to be accompanied by a local change in the diffusion of the molecules at the interface. The mean residence time with respect to the layer normal z shows that regions of high density imply a locally reduced diffusivity of the molecules and vice versa ( Figure S3, Supplementary File 1).
The numerical artefacts stem likely from an increasing mismatch between the forces and the position of the atoms the forces are applied to. In line with this interpretation, the density artefacts were suppressed for a typical value of the outer time step n m ∆t = 10 fs when the mid-range forces were applied impulse-wise (TR RESPA scheme, blue line in Figure 2), i.e. the direction of the forces and the atom positions matched at the time point when the forces were applied. However, the TR RESPA scheme does not eliminate the resonance artefacts but only shifts them to longer outer time steps in this context ( Figure 3). Thus, the partitioning of the system into different time scales together with the choice of the time steps in the MTS integration remain delicate aspects of current MD implementations 39 , also for impulse-wise MTS algorithms 1,2,40 .
On the contrary, only small effects on the density profile could be observed for the SR scheme with pairlist update periods up to n p ∆t = 40 fs (Figure 3 and Figure 4). Due to the large cutoff R l used here (i.e. 1.4 nm), the changes in the pairlist are small between updates and scale sub-linearly with n m (Figure S2, Supplementary File 1). This observation is in line with the study of Krieger et al. 41 , where they found a negligible energy drift when using a similarly low pair-list update frequency in a homogeneous system. A rough performance analysis of the run time showed that for a realistic setup approximately half of the computational performance loss due to evaluating the mid-range forces at every time step could be compensated by a less frequent update of the pairlist (Table 2).  For the single-range (SR) scheme, the mid-range forces were evaluated every time stepc ∆t (i.e. n m = 1). For the three setups with the twin-range (TR) scheme, the mid-range forces were updated with the same period as the pairlist (i.e. n p = n). The TR scheme was applied in a constant (CFA) or impulse-wise (RESPA) manner. The weak-coupling (WC) or Nosé-Hoover (NH) thermostat was used. Note that the density range is chosen to visualize the major artefacts occurring for n m ∆t > 15 fs. A visualisation of the minor artefacts around n m ∆t ≈ 10 fs can be seen in Figure 4.

Chemical composition and constant pressure
In order to exclude that the observed artefacts are specific to the water-chloroform system, the densities at a water-cyclohexane interface in a layer system were investigated. The corresponding density difference plots with respect to a SR reference are given in Figure 4. They show a similar behaviour of the TR scheme compared to the one observed for the water-chloroform systems, with slightly less pronounced artefacts. In addition, imposing constant pressure (NPT) conditions in the simulation setup does not reduce the observed density artefacts ( Figure 5).

Geometry of the interface
In addition to planar interfaces, systems with a droplet of chloroform or cyclohexane in a water box were investigated. As can be seen in the right panels of Figure 4, density artefacts occur

) under NVT conditions for layer systems (left) and droplet systems (right) with water-chloroform composition (top) or water-cyclohexane composition (bottom).
The Nosé-Hoover (NH) thermostat was used in all setups. The single-range (SR) scheme (red and blue lines) and the twin-range scheme with constant-force application (TR CFA, orange and green lines) and two different update frequencies (n p = 5, 10) are compared. Running averages with a window of seven data points are shown.
also at curved interfaces. Note that the corresponding plots contain more noise at small radii compared to the planar setups due to surface fluctuations, which influence the position of the centre of mass used as a reference. In addition, the surface fluctuations also give rise to a broadening of interface in terms of densities compared to the planar setup as can be seen in Figure S4 (Supplementary File 1).

Thermostatting method
The impact of the chosen thermostatting algorithm as well as the MTS integrator, and the energy distributions was investigated for the water-chloroform layer system. The WC thermostat does not give a canonical distribution of the kinetic energy by construction 42 , whereas the NH and NHchain thermostats do. In Figure 6, the kinetic energy distributions within water and chloroform are shown for the different setups. For chloroform, the difference in the width of the distribution between WC and NH(chain) thermostats is clearly visible, whereas the average kinetic energy remains the same, despite the significant density gradient in this solvent. In water, on the other hand, a clear shift in the kinetic energy distribution towards a higher average value was observed for the TR CFA scheme compared to the SR scheme with the WC thermostat. This shift was less pronounced with the NHchain thermostat, and absent with the NH thermostat. These observations indicate that a temperature shift may occur due to MTS resonances. However, as the

Figure 5. Density profile of the water-cyclohexane layer system under NVT conditions (left) or NPT conditions (right).
A semi-aniostropic pressure coupling was applied in x/y-direction using a Berendsen barostat, while the box length in z-direction remained fixed. A Nosé-Hoover (NH) thermostat was used in all setups. The single-range (SR) scheme (red, blue and orange lines) and the twin-range scheme with constantforce application (TR CFA, green and purple lines) and three different update frequencies (n p = 1, 5, 10) are compared. Running averages with a window of seven data points are shown.
density increase occurred with all three thermostatting methods, but the temperature shift only with two of them, the latter cannot be the cause for the former. Therefore, one can conclude that the resonance artefacts caused by the TR scheme cannot be removed with thermostats that control the velocities globally. For this, one would have to control the velocities selectively, e.g. by imposing isokinetic constraints or restraints on each degree of freedom 21-23 .

Conclusions
The effect of using the TR scheme with a constant force application (CFA) at solvent-solvent interfaces was investigated with layer and droplet systems of different composition (water-chloroform and water-cyclohexane). These systems represent simplified versions of a biological membrane and a protein in solution. The force splitting was found to lead to substantial MTS resonance artefacts at the interfaces. It could be shown that the presence of the artificial density increase at the interfaces is independent of the thermostatting method, the interface geometry as well as the chemical composition of the system although the magnitude could vary. In addition, the diffusivity of the solvent molecules at the interface changed due to the density artefacts.
The resonance effects likely stem from a mismatch between the forces and the position of the atoms the forces are applied to. This hypothesis is supported by the fact that the pairlist changes only in the order of 1 % between updates and that the TR scheme with RESPA (where the forces are applied impulsewise) does not eliminate the numerical artefacts but shifts them to longer time steps. Based on these findings, the use of TR CFA is not recommended for heterogeneous systems. Instead, the SR scheme should be used, which did not show any significant density errors in the entire range of pairlist updates (analysed up to n p ∆t = 40 fs). Thus, the increase in computational cost for SR can be partially compensated by updating the pairlist less frequently (i.e. n p ∆t > 10 fs). In addition, using only a single pairlist reduces the complexity with respect to implementation, as the additional difficulties arising from efficient memory management of two (or more) pairlists can be avoided.

Data availability
We are unable to provide the output files from the simulations directly due to file size. We instead provide the input files that when used as input with the GROMOS software package will generate the same results -

Supplementary material
Supplementary File 1: File containing the following supplementary figures: Click here to access data • Figure S1: Snapshots of different simulation setups.
• Figure S2: Change in mid-range pairlist with respect to update frequency.
• Figure S4: Droplet density profiles. In the article "Density artefacts at interfaces caused by multiple time-step effects in molecular dynamics simulations" by Sidler et al., the authors investigate the possible artefacts introduced by multiple time-step (MTS) integration methods for molecular dynamics (MD) simulations with respect to the local density and diffusivity at simulated interfaces between polar and apolar media. The simulated systems include chloroform-water and cyclohexane-water mixtures, both arranged in either planar-layer or droplet conformations. For all simulated systems, the authors report artificial density increases at the interface of the two liquids, whereby the degree of the observed effect depends on the MTS algorithm used. The density artefacts are studied mainly in the NVT ensemble, but are shown to also appear in the NPT ensemble. Moreover, some of the investigated thermostats introduce a shift in the distribution of kinetic energies in the water component. Based on these findings, the authors recommend the usage of the single-range treatment of the nonbonded interactions with lower pairlist update frequencies, which are less sensitive with respect to the discussed artefacts as compared to the widely used twin-range schemes. The study makes a valuable contribution towards the improvement of the existing MD methods when it comes to both accuracy and computational performance. The observed artefacts are certainly pronounced and cannot be ignored. On the other hand, certain aspects of the study lack the necessary explanations or depth of exploration and thus have to be improved accordingly.

Major comments
The length of individual simulations is relatively short by state-of-the-art standards. This, of course, is not a major issue if the phenomena at hand converge comparatively quickly, as indeed implied by the authors. However, for completeness, the convergence should be quantitatively demonstrated.

1.
For all NVT simulations, the authors should perform preliminary runs of several 100 ps in the NPT ensemble for density equilibration, as well as several 100 ps of equilibration in the studied ensemble before the production runs. The overall density in the present NVT simulations is determined by the authors in the course of the setup of the simulation boxes. It is conceivable that the ideal simulated density would vary with respect to the integration method, time-step or thermostating method. As a consequence, some simulated NVT systems could exhibit too-low or too-high overall density, which on its own could introduce or at least influence some of the observed artefacts.

2.
The microscopic origin(s) of the density artefacts should be investigated in greater detail. In particular, an in-depth investigation of the molecular structure at the interfaces would be instructive. For example, are the relative orientations of the chloroform/cyclohexane molecules in the areas of higher density different from those in the bulk? How about water? If so, how can this be related to the algorithmic differences? This analysis should, inter alia, involve a decomposition of density profiles into chloroform (or cyclohexane) and water components, but also more elaborate structural analyses (for an example of such analysis, please refer to 1 ).

3.
The density profiles in Figure 2 exhibit curious short-range fluctuation patterns, which even appear somewhat periodic. The authors should analyze the origin of these patterns and potentially link them with the main analysis at hand.

4.
The authors should analyze and comment more extensively on the asymmetric appearance of the TR-CFA-WC and TR-CFA-NH density profiles in Figure 3 with respect to the planar layers at high values of the pairlist update period. They comment that the asymmetry may be due to insufficient sampling, but given how extensive and relevant for the central argument of the paper it may be, it should be analyzed in more detail. In an ideal case (i.e. if largely symmetric) the density profiles could be averaged over the two sides for greater statistical power.

Minor comments
The CFA and RESPA approaches need to be explained in greater detail in the introduction. This seems especially important since RESPA seems to be much less prone to density artefacts than CFA. 1.
The colors are referenced wrong in the caption of The caption of Figure 3 contains an "n" without an index. 3.
The authors should explicitly describe how the density was calculated even for planar systems (bin size, averaging volume etc.).

4.
While the advantages of updating the Pairlist less frequently are clearly illustrated, in the conclusions section the authors should also discuss in more detail the potential downsides of such a procedure.

5.
These "fluctuations" stem from the binning of the density profiles. We have changed Figure 2 to have a consistent bin size for all curves.

4.
These fluctuations arise mainly due to the finite box size. We have adapted the text accordingly.