Abstract
Ionic liquids are an interesting class of soft matter with viscosities of one or two orders of magnitude higher than water. Unfortunately, classical, non-polarizable MD simulations of ionic liquids result in too slow dynamics and demonstrate the need for explicit inclusion of polarizability. The inclusion of polarizability, here via the Drude oscillator model, requires amendments to the employed thermostat, where we consider a dual Nosé-Hoover thermostat, as well as a dual Langevin thermostat. We investigate the effects of the choice of a thermostat, as well as the underlying parameters such as the masses and force constants of the Drude particles on static and dynamic properties of ionic liquids. Here, we show that Langevin thermostats are not suitable for the investigation of the dynamics of ionic liquids. Since polarizable MD simulations are associated with high computational costs, we employed a self-developed GPU enhanced code within the MD program CHARMM to keep the overall computational effort reasonable.
I. Introduction
Aqueous concentrated salt solutions and ionic liquids, i.e. salts which are liquid at ambient temperatures, have numerous applications in chemistry, physics and energy storage/conversion.1,2 Often molecular dynamics (MD) simulations are employed to gain fundamental insights into their structural and transport properties. The (molecular) ions generate strong electric fields polarizing solvent molecules as well as neighboring ions. Consequently, the prediction of physico-chemical properties of such systems employing MD simulations often requires explicit inclusion of polarizable forces to damp the Coulomb interactions between the ions.3 Although non-polarizable MD simulations are able to reproduce structural experimental data, they usually result in dynamics which are almost one order of magnitude too slow compared to experiment.4–6
In contrast, polarizable ionic liquid simulations were shown to produce dielectric spectra,7 conductivities,4,7 diffusion coefficients,4 viscosities4 and solvation dynamics8,9 in close agreement to experiment. However, despite their high accuracy, the increased computational effort of polarizable simulations often limits their use. Due to the very small self-diffusion constants of ionic liquids, realistic diffusive behavior can only be observed by simulating several dozens to hundreds of nanoseconds.10 The need for long simulation times, together with the slow implementation of polarizability in common MD packages, renders polarizable simulations of ionic liquids difficult and time-consuming.
In general, different approaches to account for explicit inclusion of polarization exist, with the most popular ones being the classical Drude oscillator model,11,12 the induced dipole model13,14 and the fluctuating charge model.15 In this study, we focus on the Drude model, where a charged particle is attached via a harmonic spring to each nucleus, mimicking the electron cloud. As explained in detail in section 2, the determination of the positions of the Drude particles is timeconsuming, since the displacement vector of each Drude particle depends on all other Drude particles, and an exact solution can thus only be achieved in a self-consistent field (SCF) approach.
A convenient alternative to the SCF procedure is the so-called extended Lagrangian method,12,16,17 where the induced electronic polarization at each timestep is obtained via Newton’s equations of motion, i.e. by assigning the Drude particles a small mass and treating them as any other physical particle, instead of optimizing the positions of the Drude particles via an SCF procedure. However, the Drude particles need special treatment concerning the thermostat (and thus for NVT and NPT ensembles), since the temperature of the Drude degrees of freedom needs to be low (few degrees above absolute zero), whereas other atoms are kept at the desired temperature, e.g. room temperature. Thus, the extended Lagrangian formalism requires the use of a dual thermostat, which narrows down the possible choices of a thermostat considerably. To the best of our knowledge there are only two implementations of dual thermostats currently available, which are summarized in the following. A dual Nosé-Hoover thermostat18,19 was implemented in the program package CHARMM,12,20 to enable polarizable simulations based on the Drude oscillator model. The Nosé-Hoover thermostat is known to yield accurate structural and dynamic properties of liquids.12 Furthermore, a dual-Langevin thermostat21 was implemented in NAMD and is also available in CHARMM. A drawback of the Langevin thermostat is the dependency of the dynamic properties of a system on the chosen friction coefficients of the dual heat baths,22,23 so that often the Langevin thermostat is only used to generate structural properties. Very low friction coefficients were used by Jiang et al. to calculate dynamic properties of a salt solution;21 however, it is unknown whether this method translates well to ionic liquids.
Both implementations of dual thermostats suffer from high computational costs. Fast GPUbased variants such as DOMDEC CHARMM24 are available for nonpolarizable simulations. Also, several other program codes25,26 offer GPU enhancement for polarizable simulations with various thermostats and barostats. However, there are currently no options to speed up polarizable simulations in CHARMM. Therefore, we developed a GPU enhanced polarizable CHARMM code. All thermostats implemented in CHARMM are available in the newly developed code, and we test both a dual Nosé-Hoover, as well as a dual Langevin thermostat.
The accuracy of properties obtained from MD simulations can depend on the employed temperature control parameters, such as the magnitude of the mass assigned to the Drude particles, the force constants of the harmonic Drude oscillators, or the friction coefficients of the Drude degrees of freedom in the case of the Langevin thermostat. In this study, we examine the effects of those parameters on the structural and dynamic properties of two ionic liquid systems, as well as compare the performance and obtained properties between the Langevin and the Nosé-Hoover dual thermostats.
The remainder of this article is organized as follows. In section 2 details of the Drude oscillator model and its implementations via self-consistent field, dual Langevin and dual Nosé-Hoover thermostat are given. In section 3, details of the GPU enhanced CHARMM code are presented, and the computational setup of this study is described. A detailed analysis of the timescales and properties of various simulations of the ionic liquids 1-ethyl-3-methylimidazolium dicyanamide and 1-ethyl-3-methylimidazolium trifluoromethanesulfonate with and without GPU enhancement, different thermostats, and different simulation parameters is given in section 3. Concluding remarks are presented in section 4.
II. Theory
In the Drude oscillator model a pair of Drude particles representing the induced dipole is attached to a polarizable atom β of molecule i with partial charge qiβ and an atomic polarizability αiβ. The mobile Drude particle has a partial charge of , which is usually negative, and moves around the polarizable atom. It is attached to the nucleus via a harmonic spring. The harmonic potential
(1) |
is centered around a dislocation of zero, where is the force constant and d iβ (t) the vector from the nucleus to the mobile Drude particle. We note that within the program package CHARMM20 the respective parameter for specifying the force constant is KDRUDE, where KDRUDE = . The distance d iβ (t) to the central atom depends on the local electric field, i.e. a strong electric field leads to a large dislocation and thus a large induced dipole via
(2) |
The second Drude particle is always located at the position of the polarizable atom and has a partial charge of .
The harmonic force constant and the Drude charge are correlated via
(3) |
where ε0 is the vacuum permittivity. As a consequence, usually only the force constant k D is given in polarizable force fields with a standard value of 1000 or 2000kcal/mol/Å2 for all atoms iβ. 3,12,27 The Drude charges then arise from kD and the atomic polarizability αiβ, where a larger force constant leads to larger Drude charges at smaller displacements, and thus the same induced dipole moment. In other words, the induced dipoles should in principle not depend on the chosen qD or kD but only on αiβ. In a previous study28 of 1-ethyl-3-methylimidazolium trifluorosulfonate we analyzed the effect of a fixed Drude charge qD on the induced dipoles and the static dielectric constant. Instead of the force constant kD, we kept the Drude charge constant to values of −0.5 e, −1.0 e, −2.0 e and −4.0 e for all polarizable atoms. We noticed that the average strength of the induced dipoles is slightly higher for qD =−0.5 e than for the other Drude charges.3,28 Also its distribution is significantly broader in this case. In addition, the static dielectric constant was higher compared to the polarizable simulations using value of |qD| > 1 e.28 Consequently, the Drude force constant of 2000kcal/mol/Å2 is superior to 1000kcal/mol/Å2 as it results in higher Drude charges which are closer to the polarizable atoms.
A. Self-consistent field minimization
The induced dipole depends on the local electric field E iβ (t) and the atomic polarizability as
(4) |
where the local electric field is
(5) |
with the distance r iβjγ(t) between the atoms β of molecule i and atoms γ of molecule j at time t. Since all the surrounding induced dipoles of atoms γ of molecule j enter the local field E iβ acting on atom β, the induced dipoles have to be determined in a self-consistent field manner3,12 to find the optimal displacement d iβ which originates from the balance of the electrostatic forces of the local electric field E iβ and the forces of the harmonic spring constant between the nucleus and the mobile Drude particle:
(6) |
The traditional self-consistent field procedure is limited and computationally very expensive,12 since many iterations may be necessary depending on the convergence criterion δ ≃ 0, i.e. ∂U/∂diβ < δ. If the energy minimization is not completely converged, it will introduce systematic drag forces affecting the stability of the simulations as well as the physico-chemical properties of the investigated particles.3
B. Extended Lagrangian thermostat
An alternative to the self-consistent field procedure is extending the Lagrangian of the system to treat as additional dynamical degrees of freedom.12,16,17 The mobile Drude particles are attributed a small mass mD which is subtracted from the mass m iβ of the polarizable atom. Thus the Drude particles can be treated according to Newtonian mechanics similar to the nuclei. However, this treatment requires the use of a dual thermostat, i.e. different thermostatting of the non-Drude degrees of freedom and the Drude degrees of freedom at different temperatures. In the following, the dual Nosé-Hoover thermostat and the dual Langevin thermostat are explained in detail.
1. Nosé-Hoover thermostat
Lamoureux and Roux12 implemented a dual Nosé-Hoover thermostat18,19 method in the molecular dynamics package CHARMM.20 The first thermostat acts on each center-of-mass R iβ of the Drude-atom systems
(7) |
(8) |
which is close to the positions of the respective nucleus since the Drude mass mD and the displacement diβ(t) of the mobile Drude particle are small. Increasing the Drude mass mD corresponds to a shift of the center-of-mass R iβ (t) of the Drude-atom system in direction of the mobile Drude particle.
The thermostat keeps the non-Drude atoms at the system temperature, usually around T =300 K via
(9) |
The second thermostat is coupled to the thermal fluctuations of the mobile Drude particle around the nucleus, i.e. ∂diβ (t)/∂t.
(10) |
with the reduced mass and act on the center-of-mass and the reduced mass, respectively. The parameter η and ηD are friction coefficients of the thermostats
(11) |
(12) |
and are correlated with the number of atoms n and number of Drudes nD, the relaxation time of the thermostats, τ and τD, as well as the respective thermostat temperatures T and TD. The integration of Eq. 9 and 10 is usually split into multiple steps, namely, into a one-step “Velocity-Verlet” propagation where the atomic forces are evaluated once and a multistep “Nosé-Hoover” propagation, as explained in Ref. 12. A high number of intermediate steps (in CHARMM termed ‘NSTEP’) reduces systematic integration errors on η and ηD, and thus increases the accuracy of the algorithm.12
In order to be close to the self-consistent field procedure, the second thermostat should act on the vibration of the mobile Drude particle with the nucleus rather than the motion of the Drude particle directly.12,21 The temperature, usually around 1 K, should be small enough to leave almost no kinetic energy to these vibrations but large enough to respond to the room-temperature motions of the nuclei. Consequently, the mass mD and the force constant are important parameters for the thermostatting of the Drude pairs. Also, a low mD requires a small timestep, and might thus affect the stability of a simulation.12,29–31
2. Langevin thermostat
In the MD package NAMD32 Jiang et al.21 implemented a dual stochastic Langevin thermostat to improve the performance of polarizable MD simulations on parallel infrastructures. The dual Langevin thermostat is also available in CHARMM. The equations of motions read
(13) |
(14) |
and are decoupled in contrast to eq. (11 and (12 of the Nosé-Hoover thermostat, where in the differential equation for each atom the masses and coordinates of all other atoms (summation in the evaluation of the friction coefficients) need to be known. Within the Langevin formalism each equation can be treated separately and independently (no summation over all masses or coordinates), so that the Langevin thermostat is particularly fit for highly-parallel computing platforms.21 are fluctuating random forces obeying the fluctuation-dissipation theorem
(15) |
(16) |
where s(t) and sD(t) are univariate Gaussian random processes. The parameters γ and γD are the frictions strengths on the center of mass of a Drude pair and the relative motion of the Drude pair, respectively.21 Similar to the dual Nosé-Hoover thermostat, the dual Langevin thermostat keeps the Drude degrees of freedom at a different temperature TD, usually around 1 K, than the non-Drude atoms, which are kept at T, usually room temperature.
III. Methods
A. GPU enhanced CHARMM
The most time consuming step in MD simulations of liquids and biomolecules is the calculation of the non-bonded interactions.33 To keep the programming effort low, as well as to keep changes to the existing CHARMM code minimal, we decided to accelerate only the (real-space) non-bonded interactions on the GPU following the approach taken by Elber and coworkers.33 Using NVIDIA’s CUDA platform, CPU and GPU operate independently. This leads to the following, trivial strategy: while the GPU computes nonbonded interactions, the CPU takes care of the bonded interactions and particle mesh Ewald summation.34,35 Integration of the equation of motion, application of constraints (e.g., SHAKE/RATTLE36) are kept on the CPU. The normal parallel code of CHARMM is used for the CPU part; only a single GPU is supported. As a result, given a processor with n CPU cores plus GPU, the code will exploit all n CPU cores, as well as the GPU.
Given this strategy, only the calculation of Lennard-Jones and real-space Coulomb interactions needs to be ported to the GPU. Also, since for explicit solvent simulations only atom-based cutoffs are used, the group based cutoff methods existing in regular CHARMM were not supported.
The implementation is based on the work described in “Particle Simulation using CUDA”37 and the corresponding example code from the CUDA toolkit. The primary changes to this reference code were threefold: (1) the simple repulsive potential of the example was replaced by the functional forms for Lennard-Jones and electrostatic interactions used in CHARMM, and provisions for different particle types (Lennard-Jones parameters, partial charges) were added. (2) The example code uses a spatial decomposition approach, in which one considers only interactions between particles within the same cell or in neighboring cells. Our implementation classifies interactions in three categories, i.e., the interaction of a particle with particles within the same cell, particles in the nearest neighbor cells, and particles in next to nearest neighbor cells. The spatial decomposition is carried out for each energy / force calculation, the cell-width is half the cut-off distance. While this scheme involves a bit more book-keeping, one does not have to worry about nonbonded exclusions during the calculation of particles with partners in next to nearest neighbor cells, the largest number of interactions, simplifying the code and the performance of these kernels. (3) The code takes into account non-bonded exclusions (cf. above) and special treatment of 1-4 interactions.
The performance of double precision floating point arithmetics in consumer grade graphics cards from NVIDIA is crippled. While the regular CHARMM code is all double precision, for performance reasons most calculations on the GPU have to be carried out in single precision. To avoid round-off errors, resulting in failure to conserve energy, care is needed during the accumulation of forces and energies. We used ideas from a paper by Levesque and Verlet,38 in particular scaling of coordinates and forces by the box size. The accumulation of energies and forces is done in 32-bit fixed-point arithmetic,39 a technique which was also adopted by AMBER.40 Potential energy contributions are accumulated by particle; hence, even in this case, 32bit integers are enough. The total Lennard-Jones and (real-space) Coulomb interactions are obtained by a reduce operation at the very end; this is done in double precision and the performance cost is negligible. A similar strategy is used to obtain the components of the virial tensor. The CPU/GPU mixed-precision code described here conserves energy under NVE conditions almost as good as the regular, all double precision CHARMM code (loss in total energy is less than 0.5 kcal/mol over 100 ns, no noticeable temperature drift). We furthermore tested the differences in energies and forces between the conventional CPU code and the CPU/GPU mixed-precision code for the largest system in this study (1000 ion pairs, 37000 atoms). The difference in energy amounted to 2.0 × 10−4 kcal/mol in absolute terms, and —2.2 × 10−9 relative to the CPU energy. The largest deviation in forces on the atoms was found to be 8.3 × 10−3 kcal/mol/Å (which corresponds to 5.8 × 10−13 N). The mean absolute error averaged over all atoms amounted to 1.3 × 10 3 kcal/mol/Å (which corresponds to 9.0 × 10−14 N).
B. Computational setup
Polarizable MD simulations of 500, 750 or 1000 ion pairs of the ionic liquid 1-ethyl-3-methylimidazolium dicyanamide [C2mim]DCA, as well as 1000 ion pairs of the ionic liquid 1-ethyl-3-methylimidazolium trifluoromethanesulfonate [C2mim]OTf were conducted using the accelerated GPU version of the program package CHARMM20 described above. The force field was taken from Ref. 7 (parametrization via GAAMP,41 scaling of the Lennard-Jones well depths according to Ref. 42 with λ = 0.4). Periodic boundary conditions were applied, where electrostatic interactions were calculated via the particle Mesh Ewald method34,35 (grid size ~ 1Å, 6th order cubic splines, κ =0.41 Å−1). A cutoff of 14Å was used for van der Waals interactions, o with a smooth switching function between 11 and 14 Å. Bonds involving hydrogens were kept at fixed length using the SHAKE/RATTLE algorithm.36 We employed a timestep of 0.5 fs with different methods of temperature control, as specified in the following. Furthermore, the use of the TP control utility necessary for a dual Langevin or dual Nosé-Hoover thermostat in CHARMM requires the use of a Velocity-Verlet integrator.
Benchmark simulations with and without GPU enhancement were conducted for 500, 750 or 1000 ion pairs of [C2mim]DCA, where the ions were packed into cubic boxes using the program PACKMOL.43 A Drude mass of mD =0.2 amu and a force constant of kD =1000 kcal/mol/Å2 (corresponding to KDRUDE=500 in CHARMM) was employed. After an NPT equilibration period of 0.25 ns and an NVT equilibration period of 0.1ns, a 1ns NVT production run was calculated on a node equipped with an 8-core Xeon processor (Xeon W-2145) and an NVIDIA GTX1080 graphics processing unit using the following setup. For the systems containing 500, 750 and 1000 ion pairs, a CPU and GPU production run was calculated with a dual Nosé-Hoover thermostat.18,19 The non-Drude particles were kept at 300 K, and the Drude particles at 1 K with response times of 0.1 ps and 0.005 ps respectively. In the following, we denote simulations with the Nosé-Hoover thermostat as ‘NH’. For 1000 ion pairs, a CPU and GPU production run was produced additionally without Drude particles/polarizability. Furthermore, for 1000 ion pairs a GPU production run was calculated with a dual Langevin thermostat21 with different friction coefficients. First, the friction strength on the center of mass of a Drude pair was set to 5.0 ps−1, and the friction strength on the relative motion of the Drude pair to 10.0 ps−1 (default parameters in CHARMM documentation, similar to Ref. 44–47). In the following, this setup is referred to as ‘L1’. Second, the friction strengths were set to 1.0 ps−1 and 2.0 ps−1 respectively, denoted as ‘L2’, to estimate the influence of the chosen parameters. In biomolecular simulations, friction coefficients of 1-10 ps−1 are frequently used.23 Within both setups, the temperature was kept at 300 K for the non-Drude particles and at 1 K for the Drude degrees of freedom. During the production run, no coordinates were saved. We note that equilibration periods would need to be much longer if any properties were to be evaluated from the produced trajectory. Since we were only interested in computation times, the equilibration periods were kept as short as possible.
To evaluate structural and dynamic properties as a function of the thermostat, of the Drude mass, of the Drude force constant and of the GPU enhancement, NVT trajectories of 15 ns each were calculated for 1000 ion pairs of both [C2mim]DCA and [C2mim]OTf on the GPU utilizing an equilibrated starting configuration from Ref. 7. The configurations were saved each 25 fs. Various combinations of Drude masses (0.2 amu or 0.4 amu), Drude force constants (1000kcal/mol/Å2 or 2000kcal/mol/Å2, which corresponds to KDRUDE=500 or KDRUDE=1000 in CHARMM) and thermostats (NH, L1 or L2) were investigated, summing up to twelve systems per ionic liquid. Furthermore, for one system ([C2mim]DCA, mD =0.2amu, kD = 1000kcal/mol/Å2, NH) a trajectory was calculated on the CPU to check whether GPU enhancement affects any of the obtained properties.
IV. Results
A. Benchmarks
Table I lists the computation times for a 1 ns MD simulation employing a different number of ion pairs, as well as different thermostats. Fig. 1 shows a graphical representation of the computation times. Regardless of the system size, the GPU enhanced code speeds up polarizable simulations by a factor of nearly five, and nonpolarizable simulations by a factor of nearly four. On both CPU and GPU a polarizable simulation takes about double the computation time than an equivalent nonpolarizable simulation. This is equivalent to polarizable simulations in NAMD, where the addition of polarizability also approximately doubles the simulation cost.21 We note, however, that the GPU based CHARMM DOMDEC24 speeds up nonpolarizable simulations even more, so that our comparison is only valid for conventional CHARMM. Furthermore, on both CPU and GPU the computation time increases by a factor of two if the system size is doubled. The dual Langevin and dual Nosé-Hoover thermostats perform equally well.
Table I. Computational costs for a 1 ns MD simulation at eight nodes carried out on the GPU or CPU with different thermostats (NH, L1, L2). ‘Pol’ refers to polarizable simulations, ‘nonpol’ to nonpolarizable simulations, where are Drude particles were deleted at the beginning of the simulation.
system | tCPU [h] | tGPU[h] | tCPU/tGPU |
---|---|---|---|
500 ion pairs, NH, pol | 20.2 | 4.4 | 4.6 |
750 ion pairs, NH, pol | 29.8 | 6.4 | 4.7 |
1000 ion pairs, NH, pol | 40.1 | 8.5 | 4.7 |
1000 ion pairs, L1, pol | 41.3 | 8.6 | 4.8 |
1000 ion pairs, L2, pol | 40.3 | 8.6 | 4.7 |
1000 ion pairs, NH, nonpol | 18.8 | 5.5 | 3.8 |
Fig. 1. Computational costs for a 1 ns MD simulation on eight CPU cores with and without GPU enhancement for different thermostats (NH, L1, L2). ‘Pol’ refers to polarizable simulations, ‘nonpol’ to nonpolarizable simulations.
B. Radial and dipolar distribution
Fig. 2 depicts radial distribution functions g(r) obtained from simulations using different Drude masses mD, Drude force constants kD and different thermostats (NH, L1 and L2) for [C2mim]DCA. A similar figure for [C2mim]OTf can be found in the Supporting Information. For the radial distribution functions between cations and cations, as well as anions and anions, no difference can be seen between the different simulation setups. The mixed g(r), i.e. cation-anion and anion-cation show marginal deviations at the first peak of the distribution functions, which are too small to be significant. Thus, the inter-ionic structure does not depend on the simulation parameters. A similar behavior was observed for [C2mim]OTf, i.e. the twelve simulations employing the different thermostats with different Drude masses and force constant led to the same radial distribution functions.
Fig. 2.
Radial distribution functions obtained from simulations with mD of 0.2 amu or 0.4 amu (first number in legend), k D of 1000kcal/mol/Å or 2000kcal/mol/Å (second number in legend) and different thermostats (NH, L1, L2). Inset: Enlarged view on the first peak of selected radial distribution functions.
Fig. 3 depicts the distribution of the molecular dipole moments of the cations and anions of [C2mim]DCA obtained from simulations with different thermostat and simulation parameters. Again, no differences arise for different mD, kD or different thermostats. Also, the different thermostats, Drude masses and force constants in the [C2mim]OTf systems led to the same molecular dipole distribution (see Supporting Information). To analyze possible differences in the induced atomic dipole moments, we calculated the induced dipoles as
(17) |
where the first term corresponds to the positively charged Drude particle at the nucleus, and the second term to the negatively charged Drude particle which can move around the nucleus. Fig. 4 shows the absolute induced atomic dipole moments averaged over all ions and the whole trajectory for [C2mim]DCA (see Supporting Information for [C2mim]OTf). The bars correspond to the respective standard deviations. The differences between the simulations are small, and all combinations of mD, kD and thermostats recover approximately the same induced polarization. However, the ring carbon and nitrogen atoms of the cation (‘N’, ‘N1’, ‘C1’, ‘C2’ and ‘C3’) show slightly larger induced dipoles for kD =1000kcal/mol/Å2 with the NH thermostat compared to all other systems. Although the effect is small and well within the standard deviations (bars in Fig. 4), it is systematic, and occurs in both ionic liquids. We also calculated the distributions for each atomic induced dipole moment (data shown in the Supporting Information), where we find that for kD = 1000kcal/mol/Å2 larger atomic induced dipoles are more abundant than for kD = 2000 kcal/mol/Å2. Constraining the maximum distance of the Drude particle respective to the atom it is attached to (via the ‘hardwall’ command, maximum distance 0.2 Å) did not affect our finding at all, in fact, during the whole simulation ‘hardwall’ was not invoked a single time. We thus find very small but systematic differences in the atomic dipole moment distribution depending on the choice of kD, but not on the overall molecular dipole moment.
Fig. 3. Distribution of molecular dipole moments obtained from simulations with mD of 0.2 amu or 0.4 amu 22 (first number in legend), k D of 1000kcal/mol/Å or 2000kcal/mol/Å (second number in legend) and different thermostats (NH, L1, L2).
Fig. 4.
Average induced atomic dipole moment obtained from simulations with mD of 0.2 amu or 0.4 amu (first number in legend), k D of 1000kcal/mol/Å or 2000kcal/mol/Å (second number in legend) and different thermostats (NH, L1, L2) of anions (top) and cations (middle). Bars correspond to the standard deviation, and thus the width of the distribution. Bottom: Naming scheme of atoms (hydrogens omitted), as taken from the force fields in Ref. 7.
C. Diffusion coefficients and static conductivities
So far, all structural properties were largely independent of the choice of mD, kD and the thermostat. However, dynamic properties are more sensitive towards the simulation setup, and are analyzed in the following. First, the diffusion coefficients of the cations, D ⊕, and the anions, D ⊖, were calculated from the derivative of the mean squared displacement 〈Δr2(t)〉 of the respective center of masses as
(18) |
where ΔD is a finite size correction. Due to the limited size of the simulation box of length L, long-range hydrodynamic interactions restrict diffusion.48 According to Ref. 4,49 the diffusion coefficients can be corrected via
(19) |
where T is the temperature of the system, kB the Boltzmann constant and η the experimental viscosity of 14.54 mPas.50
Furthermore, the static conductivity σ(0) was calculated from the mean-squared displacement of the translational part Mj(t) of the collective dipole moment
(20) |
where the charge of the molecule qi is +1 for cations or -1 for anions, and ri is the center of mass of molecule i. The conductivity then arises from the slope of the mean-squared displacement of M j(t) as
(21) |
where V is the volume of the simulation box.
Table II lists the diffusion coefficients and conductivities for different mD, kD and thermostats. It should be noted that longer trajectories (e.g. 100 ns instead of 15 ns) would be necessary to get a better description of the electric conductivity, so that the displayed σ (0) values can only be seen as qualitative, not quantitative. A comparison of the obtained values to experiment was already given in Ref. 7 where longer trajectories with mD = 0.2 amu and kD = 1000kcal/mol/Å2 yielded conductivities of 1.48 S/m and 0.48 S/m for [C2mim]DCA and [C2mim]OTf respectively. In contrast, the diffusion coefficients can be determined with better statistics, and are thus more reliable. Despite the poor statistics for the conductivities, clear trends for both the Nosé-Hoover and Langevin thermostat can be seen in D and σ(0), as discussed in the following.
Table II. Diffusion coefficients of cations (D®) and anions (Dθ), as well as static conductivities (σ(0)) with 95% confidence intervals0 using various Drude masses mD and harmonic force constants k D > as a function of a dual thermostat and a Langevin thermostat.
mD | k D | D ⊕[10−8cm2s−1 | D ⊖[10−8cm2s−1 | σ(0)[S m−1] | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
NH | L1 | L2 | NH | L1 | L2 | NH | L1 | ||||
[C2mim]DCA | 0.2 | 1000 | 46.5±1.2 | 26.7±3.6 | 49.3±3.2 | 57.5±1.3 | 31.1±3.5 | 59.2±3.7 | 1.36±0.31 | 0.81±0.10 | 1.62±0.06 |
0.2 | 1000 (cpu)b | 46.6±0.9 | 56.5±1.6 | 1.68±0.18 | |||||||
[C2mim]OTf | 0.2 | 1000 | 27.4±0.7 | 15.5±1.4 | 24.1±2.2 | 16.4±0.8 | 11.3±1.6 | 16.7±2.0 | 0.61±0.14 | 0.30±0.06 | 0.39±0.11 |
95% confidence intervals were estimated as mean(x) ± stdev(x). t with t being the Student-t factor. The slope of (Δr2(t)) was fit at intervals [0:2ns], [2:4ns], [4:6ns] and [6:8 ns] (n=4) and the slope of (í)) at intervals [50:100ps], [100:150ps], [150:200ps] and [200:250ps] (n=4).
Conventional CHARMM CPU code instead of the developed GPU-enhanced code.
Increased number of steps for temperature control of the Drude degrees of freedom, 50 instead of 20.
For [C2mim]DCA, the dual Nosé-Hoover thermostat yields equivalent results for all combinations of mD and kD apart from mD =0.4amu with kD =1000kcal/mol/Å2, where the diffusion coefficients and conductivities are slightly overestimated. For [C2mim]OTf, the diffusion coefficients obtained from simulations with mD = 0.4amu and kD =1000kcal/mol/Å2 are again slightly overestimated, although to less extent than in [C2mim]DCA. All other combinations of mD and kD yield reasonable diffusion coefficients. This observation is interesting, since the combination of mD = 0.4 amu with kD =1000 kcal/mol/Å2 is recommended in the CHARMM documentation.51 In the literature, the combinations 0.4 amu with 1000 kcal/mol/Å2 is frequently used,11,52 or sometimes 0.2 amu with 1000 kcal/mol/Å2.7,9 It was furthermore reported that 2000 kcal/mol/Å2 is preferable over 1000 kcal/mol/Å2 if the simulation contains atoms with very low polarizability.3,28 The fluorine and oxygen atoms in the OTf anion have a very low polarizability (0.028 Å3 and 0.271 Å3 respectively), as well as the nitrogen atoms in the DCA 3 D anion (0.405 Å), however, in [C2mim]OTf both tested values of kD perform equally well for the diffusion coefficients and the conductivities. For [C2mim]DCA, the deviations of the simulations with 0.4 amu and 1000 kcal/mol/Å2 to all other combinations of mD and kD are large enough to be considered significant. We thus conducted two additional trajectories, where we introduced o a restraint on the Drude bond distance (maximum of 0.2 Å, keyword ‘hardwall’), as well as increased the number of intermediate steps (keyword “NSTEP”) the thermostat takes to confine the Drude degrees of freedom (see also Ref. 12). The hardwall command did not affect the results at all, since it was never invoked during the whole simulation. A larger number of steps allows the thermostat to better converge the Drude positions, but also increases the computation time. An increased number of steps slightly lowers the diffusion coefficients and conductivity of the mD =0.4 amu with kD =1000 kcal/mol/Å2 system, thus decreasing the discrepancy to the simulations employing other combinations of mD and kD. However, no perfect agreement could be obtained. We thus do not recommend the combination mD =0.4 amu, kD =1000 kcal/mol/Å2 for the simulation of diffusive properties of ionic liquids.
The dual Langevin thermostat yields, by nature, different diffusion coefficients and conductivities dependent on the friction coefficients.22 The first set of friction parameters, 5.0 ps−1 and 10.0 ps−1, leads to too small conductivities, whereas the second set, 1.0 ps−1 and 2.0 ps−1, produces conductivities which are larger or equal to the results obtained by the Nosé-Hoover thermostat, depending on the choice of mD and kD. Further decreasing the friction coefficients (as done in Ref. 21 to calculate the conductivity of an ionic solution) would further increase the conductivity and thus decrease the quality of some of the results, especially for the system mD = 0.2 amu and kD=1000 kcal/mol/Å2. Also, decreasing the friction would further increase the diffusion coefficients, which are already too large compared to the NH thermostat in most systems. Also, too low friction coefficients may cause a poor temperature control.22 The optimal friction coefficients thus differ for the analyzed diffusive properties. We furthermore note that the choice of mD and kD largely affects the observed results, especially in the case of the L2 thermostat. Whereas different parameters for the NH thermostat produce consistent diffusion coefficients and conductivities, which differ only due to statistical uncertainties, the Langevin thermostat yields largely different diffusion constants and conductivities dependent on mD and kD. While it might be possible to find a combination of mD, kD and friction coefficients which resembles diffusive properties within reasonably small deviations from the true values, this combination will likely not carry over to a different system. We, therefore, do not recommend a dual Langevin thermostat to determine diffusive properties of ionic liquids.
D. Thermostatting of the Drude degrees of freedom
To test whether the choice of parameters affects the temperature of the Drude degrees of freedom, and thus the thermostatting of the Drude particles, we calculated the temperature of each Drude particle as
(22) |
where is the relative motion of the Drude particle to the motion of the attached atom, i.e. where the motion of the main atom, which corresponds to a temperature of 300 K, was subtracted from the motion of the Drude particle to yield the relative Drude motion which should correspond to a temperature of 1 K. The temperature was then averaged over all atoms β of all molecules i in the system. For all choices of thermostats (NH, L1 and L2), mD (0.2 amu, 0.4 amu) and kD (1000 kcal/mol/Å2, 2000 kcal/mol/Å2) the resulting averaged temperature was below 1 K in both [C2mim]DCA and [C2mim]OTf, so that sufficient thermostatting can be assumed. However, inspecting the cations and anions separately, the combination 0.4 amu with 1000 kcal/mol/Å2 leads to slightly too large cation Drude temperatures (data shown in the Supporting Information). We thus assume that the deviations in the diffusive properties caused by this combination of mD and kD are the result of poor thermostatting of the imidazolium cation, leading to slightly overestimated induced atomic dipoles.
E. Structural and diffusive properties: CPU versus GPU
For the system [C2mim]DCA, mD =0.2amu with k D =1000kcal/mol/Å2 and the dual Nosé-Hoover thermostat, a 15 ns trajectory was also calculated on CPU. The radial distribution functions, dipolar distributions, diffusion constants, and static conductivities were found to be, within statistical uncertainties, identical to the data obtained from simulations calculated on GPU. Diffusive properties are given in Table II, structural properties in the Supporting Information. We note, that due to the poor statistics of the static conductivity calculation, the deviation is quite large; however, the diffusion coefficients, which can be evaluated with much better statistics, agree well between the two different codes.
F. Optimality of Drude positions
To check whether the choice of parameters and thermostats affects the ability to recover the true (self-consistent field) Drude positions, we randomly selected 20 configurations from each [C2mim]DCA trajectory, omitted movement of all non-Drude particles and minimized the energy by a steepest descent approach followed by a Newton-Raphson method. In a previous study, we found that changes in the total energy of up to 1% still produced trajectories in close agreement with the self-consistent field limit.28 Table III shows the percentage of decrease in the Drude bond energy, which is largely counteracted by an increase in electrostatics, so that the change in total energy is very small. In general, the dual Langevin thermostat produces Drude positions slightly closer to the self-consistent field limit than the Nosé-Hoover thermostat. Also, a kD of 2000 kcal/mol/Å2 performs slightly better than a kD of 1000 kcal/mol/Å2. However, all combinations of mD, kD and thermostats are sufficiently close to self-consistency.
Table III. Percentage decrease of energy in the Drude bonds, as well as total energy upon minimization of the Drude particles.
mD | kD | % Drude bonds | % Total | ||||
---|---|---|---|---|---|---|---|
NH | L1 | L2 | NH | L1 | L2 | ||
0.2 | 1000 | 4.8 | 2.1 | 1.5 | 0.05 | 0.05 | 0.03 |
2000 | 2.2 | 1.8 | 1.1 | 0.06 | 0.05 | 0.03 | |
0.4 | 1000 | 6.1 | 4.3 | 4.3 | 0.06 | 0.07 | 0.05 |
2000 | 3.2 | 2.3 | 1.7 | 0.05 | 0.05 | 0.03 |
V. Conclusion
We have shown that structural and diffusive properties of ionic liquids can be simulated accurately with different combinations of the Drude mass mD and the Drude force constant kD when employing a dual Nosé-Hoover thermostat. However, we do not recommend the combination of high Drude masses with low force constants, as recommended in the CHARMM documentation, for the simulation of ionic liquids since it led to slight deviations in diffusive properties of [C2mim]DCA, and, too less extent, of [C2mim]OTf. Also, slightly too large induced atomic dipoles, and slightly too large temperatures of the cationic Drude particles were found, especially for the atoms in the aromatic ring of the [C2mim] cation. The dual Langevin thermostat correctly recovered structural properties for both ionic liquids regardless of the choice of mD, kD or the Langevin friction coefficients, but failed for diffusive properties such as ion self-diffusion coefficients or conductivities. The dual Nosé-Hoover thermostat should thus be preferred for the simulation of ionic liquids dynamics.
The high computational effort for polarizable MD simulations of ionic liquids was overcome by using a GPU enhanced CHARMM code, which accelerated the simulations by a factor of five regardless of system size. The CPU/GPU mixed-precision code produced the same results for static and dynamic observables within statistical uncertainties and thus provides a quick and convenient opportunity to use polarizable MD simulation also for large and viscous systems, for example, the simulation of ionic liquids.
Supplementary Material
Acknowledgement
EH is a recipient of a DOC Fellowship of the Austrian Academy of Sciences at the Institute of Computational Biological Chemistry. This work was also funded by the Austrian Science Fund FWF in context of projects FWF-P28556-N34 and FWF-P31024.
References
- 1.Azov VA, Egorova KS, Seitkalieva MM, Kashin AS, Ananikov VP. Chem Soc Rev. 2018;47:1250. doi: 10.1039/c7cs00547d. [DOI] [PubMed] [Google Scholar]
- 2.Armand M, Endres F, MacFarlane DR, Ohno H, Scrosati B. Nat Mater. 2009;8:621. doi: 10.1038/nmat2448. [DOI] [PubMed] [Google Scholar]
- 3.Bedrov D, Piquemal J-P, Borodin O, MacKerell A, Roux B, Schröder C. Chem Rev. 2019;119:7940. doi: 10.1021/acs.chemrev.8b00763. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Borodin O. J Phys Chem B. 2009;113:11463. doi: 10.1021/jp905220k. [DOI] [PubMed] [Google Scholar]
- 5.Salanne M. Phys Chem Chem Phys. 2015;17:14270. doi: 10.1039/c4cp05550k. [DOI] [PubMed] [Google Scholar]
- 6.Schröder C. Phys Chem Chem Phys. 2011;14:3089. doi: 10.1039/c2cp23329k. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Heid E, Docampo-Alvarez B, Varela LM, Prosenz K, Steinhauser O, Schröder C. Phys Chem Chem Phys. 2018;20:15106. doi: 10.1039/c8cp02111b. [DOI] [PubMed] [Google Scholar]
- 8.Heid E, Schröder C. Phys Chem Chem Phys. 2018;20:5246. doi: 10.1039/c7cp07052g. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Heid E, Schmode S, Chatterjee P, MacKerell AD, Jr, Schröder C. Phys Chem Chem Phys. 2019;21:17703. doi: 10.1039/c9cp03000j. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Maginn EJ. Acc Chem Res. 2007;40:1200. doi: 10.1021/ar700163c. [DOI] [PubMed] [Google Scholar]
- 11.Lemkul JA, Huang J, Roux B, MacKerell AD., Jr Chem Rev. 2016;116:4983. doi: 10.1021/acs.chemrev.5b00505. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Lamoureux G, Roux B. J Chem Phys. 2003;119:3025. [Google Scholar]
- 13.Wang ZX, Zhang W, Wu C, Lei HX, Cieplak P, Duan Y. J Comput Chem. 2006;27:781. doi: 10.1002/jcc.20386. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Wang J, Cieplak P, Li J, Wang J, Cai Q, Hsieh M-J, Lei H, Luo R, Duan Y. J Phys Chem B. 2011;115:3100. doi: 10.1021/jp1121382. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Bauer BA, Patel S. Theor Chem Acc. 2012;131:1153. [Google Scholar]
- 16.Sprik M, Klein ML. J Chem Phys. 1988;89:7556. [Google Scholar]
- 17.van Belle D, Wodak SJ. Comput Phys Commun. 1995;91:253. [Google Scholar]
- 18.Nosé S. J Chem Phys. 1984;81:511. [Google Scholar]
- 19.Hoover WG. Phys Rev A. 1985;31:1695. doi: 10.1103/physreva.31.1695. [DOI] [PubMed] [Google Scholar]
- 20.Brooks BR, Brooks CL, III, MacKerell AD, Jr, Nilsson L, Petrella RJ, Roux B, Won Y, Archontis G, Bartels C, Boresch S, Caflisch A, et al. J Comput Chem. 2009;30:1545. doi: 10.1002/jcc.21287. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Jiang W, Hardy DJ, Phillips JC, MacKerell AD, Jr, Schulten K, Roux B. J Phys Chem Lett. 2011;2:87. doi: 10.1021/jz101461d. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Hünenberger PH. Adv Polym Sci. 2005;173:105. [Google Scholar]
- 23.Gaalswyk K, Awoonor-Williams E, Rowley CN. J Chem Theory Comput. 2016;12:5609. doi: 10.1021/acs.jctc.6b00747. [DOI] [PubMed] [Google Scholar]
- 24.Hynninen A-P, Crowley MF. J Comput Chem. 2014;35:406. doi: 10.1002/jcc.23501. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Eastman P, Swails J, Chodera JD, McGibbon RT, Zhao Y, Beauchamp KA, Wang L-P, Simmonett AC, Harrigan MP, Stern CD, et al. PLoS Comput Biol. 2017;13:e1005659. doi: 10.1371/journal.pcbi.1005659. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Harger M, Ren P. Res Chem. 2019;1:100004. doi: 10.1016/j.rechem.2019.100004. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27.Lemkul JA, Huang J, Roux B, MacKerell AD., Jr Chem Rev. 2016;116:4983. doi: 10.1021/acs.chemrev.5b00505. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28.Schröder C, Steinhauser O. J Chem Phys. 2010;133:154511. doi: 10.1063/1.3493689. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 29.Mitchell PJ, Fincham D. J Phys: Condens Matter. 1993;5:1031. [Google Scholar]
- 30.De Leeuw NH, Parker SC. Phys Rev B. 1998;58:13901 [Google Scholar]
- 31.Pastor RW, Brooks BR, Szabo A. Mol Phys. 1988;65:1409. [Google Scholar]
- 32.Philipps JC, Braun R, Wang W, Gumbart J, Tajkhorshid E, Villa E, Chipot C, Skeel RD, Kalé L, Schulten K. J Comput Chem. 2005;26:1781. doi: 10.1002/jcc.20289. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33.Ruymgaart AP, Cardenas AE, Elber R. J Chem Theory Comput. 2011;7:3072. doi: 10.1021/ct200360f. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Darden T, York D, Pedersen L. J Chem Phys. 1993;98:10089 [Google Scholar]
- 35.Essmann U, Perera L, Berkowitz ML, Darden T, Lee H, Pedersen LG. J Chem Phys. 1995;103:8577. [Google Scholar]
- 36.Ryckaert J-P, Ciccotti G, Berendsen HJC. J Comput Phys. 1977;23:327. [Google Scholar]
- 37.Green S. Particule simulation using CUDA. 2010 http://developer.download.nvidia.com/assets/cuda/files/particles.
- 38.Levesque D, Verlet L. J Stat Phys. 1993;72 [Google Scholar]
- 39.Lauha J. The neglected art of fixed point arithmetic. 2006 http://jet.ro/files/The_neglected_art_of_Fixed_Point_arithmetic_20060913.pdf.
- 40.Le Grand S, Götz AW, Walker RC. Comput Phys Commun. 2013;184:374. [Google Scholar]
- 41.Huang L, Roux B. J Chem Theory Comput. 2013;9:3543. doi: 10.1021/ct4003477. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 42.Becker TM, Dubbeldam D, Lin L-C, Vlugt TJH. J Comput Sci. 2016;15:86. [Google Scholar]
- 43.Martínez L, Andrade R, Birgin G, Martínez JM. J Comput Chem. 2009;30:2157. doi: 10.1002/jcc.21224. [DOI] [PubMed] [Google Scholar]
- 44.Riahi S, Rowley CN. J Phys Chem B. 2014;118:1373. doi: 10.1021/jp4096198. [DOI] [PubMed] [Google Scholar]
- 45.Lemkul JA, MacKerell AD., Jr J Comp Chem. 2018;39:2624. doi: 10.1002/jcc.25709. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 46.Riahi S, Rowley CN. J Comp Chem. 2014;35:2076. doi: 10.1002/jcc.23716. [DOI] [PubMed] [Google Scholar]
- 47.Rowley CN, Roux B. J Chem Theory Comput. 2012;8:3526. doi: 10.1021/ct300091w. [DOI] [PubMed] [Google Scholar]
- 48.Dünweg B, Kremer K. J Chem Phys. 1993;99:6983. [Google Scholar]
- 49.Gabl S, Schröder C, Steinhauser O. J Chem Phys. 2012;137:094501. doi: 10.1063/1.4748352. [DOI] [PubMed] [Google Scholar]
- 50.Vatascin E, Dohnal V. J Chem Thermodyn. 2017;106:262. [Google Scholar]
- 51.Charmm documentation: Drude. https://www.charmm.org/charmm/documentation/by-version/c42b1/params/doc/drude/
- 52.Lamoureux G, MacKerell AD, Roux B. J Chem Phys. 2003;119:5185. doi: 10.1063/5.0019987. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.