- equilibrium by molecular dynamics: Alternative equilibrium estimation

Michal Ilčin, Martin Michalík, Klára Kováčiková, Lenka Káziková, Vladimír Lukeš

Department of Chemical , Slovak University of Technology, SK-812 37 Bratislava, Slovakia [email protected]

Abstract: The molecular dynamics simulations of the liquid-vapor equilibrium of water including both water phases — liquid and vapor — in one simulation are presented. Such approach is preferred if equilibrium curve data are to be collected instead of the two distinct simulations for each separately. Then the liquid phase is not restricted, e.g. by insufficient volume resulting in too high , and can spread into its natural volume ruled by chosen and by the contact with vapor phase as vaporized molecules are colliding with phase interface. Averaged strongly fluctuating virial pressure values gave untrustworthy or even unreal results, so need for an alternative method arisen. The idea was inspired with the presence of vapor phase and by previous experiences in gaseous phase simulations with small fluctuations of pressure, almost matching the ideal value. In presented simulations, the first idea how to calculate pressure only from the vapor phase part of simulation box were applied. This resulted into very simple method based only on averaging molecules count in the vapor phase subspace of known volume. Such simple approach provided more reliable pressure estimation than statistical output of the simulation program. Contrary, also drawbacks are present in longer initial thermostatization time or more laborious estimation of the vaporization heat. What more, such heat of vaporization suffers with border effect inaccuracy slowly decreasing with the thickness of liquid phase. For more efficient and more accurate vaporization heat estimation the two distinct simulations for each phase separately should be preferred.

Keywords: water, liquid-vapor equilibrium, molecular dynamics simulation, equilibrium pressure estimation, vaporization heat

Introduction atoms. Together with kinetic energy of all individual atoms corresponds with internal energy and is use- Many macroscopic properties including the exist- ful for the evaluation of thermodynamic properties. ence of condensed (liquid or ) are deter- Except some specific properties, e.g. magnetic pro­ mined by molecular interactions. These interactions perties or NMR shifts related with nuclear magnetic are responsible for the state of substance at given moments, many others including thermodynamic ambient conditions (for example, if the molecules and transport properties can be calculated from the ruled by the mentioned interactions “stay together” knowledge of the potential function only. Analytical under given conditions the substance is in liquid expressions involving potential function into evalu­ or solid state). Molecular interactions can be consi­ ation have been developed theoretically for some dered as the forces between atoms the molecules are properties, but their application is often limited to composed of. These forces may be well-described by very simple molecules or atoms only (like expres- overall potential function consisting of many specific sions for transport properties in Hirschfelder et al. contributions for smaller groups of several atoms. (1954) and Maitland et al. (1981)). Due to the lack Considering only atoms from the same molecule the of analytical expressions or due to their limited ap- interactions are denoted as intra-molecular. These plicability, the molecular dynamics simulation must typically include bond, angular and torsion contri- be performed with suitable starting composition and butions to intra-molecular potential. Interactions appropriate initial conditions in order to obtain de- between atoms of distinct molecules are covered manded quantity. The equations of motion for each under inter-molecular (van der Waals) potential. atom are solved during simulation. So besides the Summing up all inter- and intra-molecular potential potential energy, the forces on each atom are also ne­ contributions for all particles involved in simulation cessary to calculate (as a negative gradient of potential the overall potential function is obtained. This func- function in the coordinates of the atom of interest) in tion presents total potential energy of the system un- every time step of simulation. Afterwards, adequate der study depending on the positions of individual evaluation method must be applied to necessary data

36 Acta Chimica Slovaca, Vol. 9, No. 1, 2016, pp. 36—43, DOI: 10.1515/acs-2016-0007 collected during the simulation (some quantities may sure and use to be adjusted according be evaluated with different methods using different the real substance equilibrium parameters in such data from simulation, see e.g. diffusion coefficient simulations. The only establishing quantity is the evaluation in the work of Sládek et al. (2014)). The volume of the simulation box influencing the den- simulations use to involve as small molecules count sity. Also such established state cannot be in general as possible and also use to be as short as possible to considered as the “natural equilibrium state” of reach for the shortest calculation times. However, used force field. sufficiently large size and length of simulation is Our goal was to obtain true information about the important for averaging in order to achieve reason- temperature dependence of liquid-vapor equilib- able low statistical error. Therefore some authors are rium pressure only from simulation. Therefore presenting their results from at least two different we left the liquid phase to relax with vapor phase size simulations, like van der Spoel et al. in their in one simulation. This simulation is mimicking study of water models (van der Spoel et al., 1998) the liquid-vapor phase interface with both phases with 216 and 820 water molecules. Sufficient length present. Typically, the simulation is performed in play important role mainly for pressure averaging in rectangular periodic box with one side much longer liquid phase simulation as pressure value oscillations than the others (Matsumoto, 1998; Xie, 2012). Inside used to be very large (in the mentioned work of van the box the “central stripe” is assembled from the der Spoel the rms pressure fluctuations were several molecules of studied substance (see Fig. 1). Density hundreds of atmospheres what was in accordance of the central stripe approximately correspond to with our experiences). liquid phase. Empty space is reserved for the vapor Although large number of molecular dynamics phase. Used dimension of rectangular periodic simulations is available in the literature (e.g. study box was from 90 to 130 Å × 40 Å × 40 Å (longest of polarizable AMOEBA water model of Ren et al. dimension was increased to let more molecules (2004) or vapor-liquid coexistence study of Sakamaki to evaporate mainly in order to test the reliability et al. (2011)), many technical details connected mainly of results). Dimension of initial central stripe was with setting of initial conditions depending on the 20 Å × 40 Å × 40 Å and 1080 water molecules were purpose of simulation are still open. In this work, the placed inside. liquid-vapor equilibrium curve of water was obtained For the initial distribution of molecules into central from the phase interface simulation including both stripe the Packmol (Martinez et al., 2003; Martinez phases in one simulation. Also heat of vaporization et al., 2009) program has been used. Minimal in- has been estimated from such simulations. Force teratomic distances for atoms in different molecules field of the first choice was the AMOEBA force field were set to 2.0 Å (default in Packmol). This distance (Ren et al., 2002; Ren et al., J. Phys. Chem. B 2003; obviously corresponds to repulsive region of used Ren et al., J. Am. Chem. Soc. 2003) because of good potential function what can be seen from the tem- accuracy of the heat of vaporization reported (Ren perature evolution during the initial thermostatiza- et al., 2004). Results are compared with one simpler tion (see Fig. 2). and less computationally-intensive water potential model with quality of vaporization heat comparable to used AMOEBA force field.

Simulation and calculation details

Typical way of obtaining the heat of vaporization by molecular dynamics (MD) simulation (Ren et al., 2004) is to simulate liquid phase in one simulation and vapor phase as a separate one. Simulation is usually performed in quite small simulation box involving several hundreds of molecules with the size of the simulation box corresponding to density Fig. 1. Typical initial setup of molecules in the of the real substance at the simulation temperature. form of “central stripe” suitable for liquid-vapor But such state is very likely not the “natural equilib- equilibrium molecular dynamics study. rium state” for potential function used in simula- Dimensions used in our simulation: smallest side tion due to its deviations from interactions in real of periodic box was 40 Å × 40 Å, longest edge matter. Another approach use also barostat besides was varying between 90 to 130 Å. Central stripe the thermostat to settle also the pressure average contained 1080 molecules with initial thickness on desired value (van der Spoel et al., 1998). Pres- of 20 Å.

Ilčin M et al., Water liquid-vapor equilibrium by molecular dynamics… 37 Fig. 2. Typical exponential response of Berendsen thermostat. Set temperature: 100 °C — cases (a) and (b), 250 °C — case (c). Case (a) — the simulation started as new one from initial distribution of molecules provided by Packmol. Case (b) and (c) — the simulation followed previous one thermostatized to 0 °C.

Simulations have been performed using TINKER et al., 1984) should be sufficient. The Berendsen program package (Ren et al., 2002; Ren et al., J. thermostat in spite of Nose-Hoover thermostat is not Phys. Chem. B 2003; Pappu et al., 1998; Hodsdon et producing Maxwell velocity distribution in ge­neral. al., 1996; Kundrot et al., 1991; Ponder et al., 1987). Therefore the thermostat was then switched to Nose- Simulation time step was 1 fs and default potential Hoover one (Hoover, 1985; Nose, 2001). Time of cut-offs were used. The AMOEBA (Ren et al., 2002; 10 ps with new thermostat should assure Maxwell Ren et al., J. Phys. Chem. B 2003; Ren et al., J. Am. velocity distribution establishment. Histogram of Chem. Soc. 2003) polarizable atomic multipole molecular velocities compared with Maxwell dis- force field was used for modeling water molecules tribution curve is presented on Fig. 3 for one such interactions. The vaporization heats are quite close simulation and confirms this establishment. to the experimental one using AMOEBA force field The simulation time with Nose-Hoover thermostat (less than 4 % below experimental values in the was 50 ps. During this period the temperature was temperature range of interest). On the other side, held in few degrees interval around the set point calculations involving this force field are more time (standard deviation of temperature was less than consuming in comparison with other simpler mo­ 5 degrees from 100 time steps). Dedicating first 10 ps dels. For the sake of comparison also three-particle to the stabilization of new thermostat conditions the TIP3F model from OPLSAA force field (Jorgensen time of remaining 40 ps is suitable for demanded et al., 1996; Maxwell et al., 1995; Jorgensen et al., 1998; McDonald et al., 1998; Jorgensen et al., 1999; Price et al., 2001) was used. This model was selected due to the similar quality of heat of vaporization, around 5 % above the experimental values. Introductory thermostatization has been done using Berendsen thermostat (Berendsen et al., 1984) with time constant of 0.1 ps. From the Fig. 2 it seems the time of 1 ps is sufficient for thermostatization. It may be true for one phase simulation but was not for phase interface simulation with only liquid phase on the start of simulation. In such simulation the liquid phase needs to “correct” its volume and also the sufficient amount of molecules must evaporate to establish the - equilib- Fig. 3. Comparison of water molecules velocity rium. This settlement of conditions took at most few distribution from simulation (histogram) and picoseconds,­ thus the initial thermostatization time theoretical Maxwell velocity distribution (solid of 10 ps with Berendsen thermostat (Berendsen line) for temperature of 100 °C.

38 Ilčin M et al., Water liquid-vapor equilibrium by molecular dynamics… quantity estimation. Furthermore, simulation was mately the same kinetic and intramolecular poten- left to continue without thermostat for the next tial energy in vapor phase as in liquid phase, the 50—100 ps. This part of the simulation was quite only difference is molar inter-molecular potential numerically stable with only small variations of energy Vm,inter-mol.. Taking also very long distances be- total energy and almost the same temperature vari- tween molecules in gas phase into account, virtually ations as during previous period with Nose-Hoover zero intermolecular potential energy is expected in thermostat. Simulation period without thermostat the gas phase. Then the heat of vaporization can be was used for estimation of demanded quantities as approximated as well and with practically the same results. (liquid phase only) DHV »- +RT (4) Pressure in the simulation box is obtained from vap mm,inter-mol. virial expression (Hansen et al., 1986) meaning only the simulation of liquid phase is necessary. But this approach cannot be easily done 1   pV= NkT+å rij× F ij (1) if Ewald summation of electrostatic interactions is 3 ij< applied (there is no intermolecular part of potential and similarly as the temperature it needs to be aver- energy in simulation program output) what was aged. But while in the simulation with few hundred also our case. What more, having both (liquid and molecules of water the temperature variations are vapor) phases in one simulation comes with some within few degrees, the variations of pressure in new complications. Part of the molecules are in liquid or both phases simulation are much larger vapor and the rest in liquid phase. This complicates than the average value (pure vapor phase pressure the evaluation of molar energies — prior to this the is quite reliable without extremely enormous vari- molecules counts in liquid and vapor phase need to ations). Therefore other approach has been used be estimated. For this reason, the molecule count to get more reliable pressure information. The averages in vapor phase have been evaluated. As the number of molecules has been averaged in the phase interface between liquid and vapor phase is space around central liquid stripe corresponding not so easy to determine and also need not to be to the vapor phase. Several different dimensions exact plane, the vapor molecule counts were evalu- of vapor space has been tried with similar results. ated for several planar borders closer and closer to The increase of the simulation box dimension was phase interface. Until reaching the interface the done also in order to involve more molecules into number of molecules raises linearly with distance averaging (mainly at lower temperature). From the when approaching the interface. After crossing the averaged molecules count the pressure has been phase interface the increase of molecules count calculated using the equation for ideal gas. started to be more rapid because the inclusion of The potential and kinetic energies evaluated at each molecules from liquid phase. This jump in mole­ time step of simulation become very useful in the cules count provides quite easy way of finding calculation of heat (enthalpy) of vaporization. The the vapor and also liquid phase molecules counts sum of these contribution forming the total energy estimated with quite small uncertainties. Using this represents the internal energy. From the simulation information together with related internal energy of pure liquid phase with N molecules the internal and vapor molar internal energy from smaller va- energy U(liquid) and similarly from the simulation por phase simulation the heat of vaporization has of pure vapor phase with N molecules the internal been estimated from phase interface simulation. energy U(vapor) can be obtained. Dividing these in- ternal energies by molecules count and multiplying Results and discussion by Avogadro constant NA the molar internal energy

Um,(phase) is calculated as The MD simulations have been performed in the temperature range between 373 K and 473 K (from U (phase) Um,(phase) = NA (2) 100 °C to 200 °C). In the Fig. 4 the screenshots of MD N simulations of liquid-vapor phase interface for dif- (the N need not to be same for liquid and vapor ferent are presented. First 3 pictures phase). Fig. 4a—c represent screenshots from simulations From molar internal energies of liquid and vapor using the AMOEBA force field for temperatures of phases the heat (enthalpy) of vaporization is 373 K, 423 K and 473 K. One can clearly observe the increase in the density of vapor phase. For the sake ∆H = U – U + RT (3) vap m m,(vapor) m,(liquid) of comparison, also the screenshot from simulation approximating the product of pressure and molar using TIP3F water model for 473 K is depicted in change of volume during vaporization as RT. Fig. 4d. Comparing with the AMOEBA picture for Furthermore, considering molecules have approxi- the same temperature, the vapor density is lower.

Ilčin M et al., Water liquid-vapor equilibrium by molecular dynamics… 39 a) b)

c) d) Fig. 4. Screenshots from simulations after thermostatization for AMOEBA force field at (a) 373 K, (b) 423 K, (a) 473 K and for TIP3F water model of OPLSAA force field at (d) 473 K.

Fig. 5. Vapor-liquid equilibrium pressure dependence on the temperature — comparison of simulation results with experimental data (Dean, 1999).

Thus for TIP3F (OPLSAA force field) water model equilibrium pressure dependence. TIP3F water one can await lower equilibrium pressure than for model equilibrium pressures for higher tempera- AMOEBA force field. tures are lower than for AMOEBA force field, what In the Fig. 5 the liquid-vapor equilibrium pressure is in agreement with brief view of pictures in Fig. dependence on the temperature is presented. The 4c and Fig. 4d. Among water models used in work pressure provided in TINKER output averaged of Sakamaki et al. (2011), the TIP3P model (similar for quite long period was overestimated in simula- to TIP3F model used in this work) provided also tions using AMOEBA force field. For TIP3F water slightly overestimated equilibrium pressure. model the pressure averages from TINKER output Also several further water models used in the work were underestimated and even below zero. The of Sakamaki et al. (2011) provided overestimated results obtained from vapor phase molecules count pressures but the rest of water models provided un- are more real and closer to the real vapor-liquid derestimated results for equilibrium pressures. Due

40 Ilčin M et al., Water liquid-vapor equilibrium by molecular dynamics… to large fluctuations the convergence of pressure from one side, their contribution to intermolecular values was slow and Sakamaki et al. needed to per- potential energy is lower than ones from the middle form long simulations. Depending on used model, of liquid. Therefore such values of the vaporization also obtained critical temperatures were different. heat are underestimated comparing to the properly Interesting conclusion of their work is the fact that calculated heat of vaporization. Improving these despite of underestimating or overestimating the underestimated vaporization heats is possible by in- experimental equilibrium pressures, the pressure creasing thickness of central stripe thereby lowering dependence on the reduced temperature (for dif­ fraction of surface molecules. But with the increase ferent model temperature divided by dif­ferent criti- of the thickness also much more molecules are cal value) is underestimated for every model above involved into simulation, considerably prolonging the pressure of 0.1 MPa. simulation time with still not very accurate results. The estimated heats of vaporization from phase Properly calculated vaporization heats are reliable interface simulations are presented in Fig. 6. and more accurate if evaluated also from much Values obtained from these simulations are under- smaller simulations of both phases separately. This estimated comparing with experimental data and makes the simulation of liquid-vapor phase inter- also comparing with “properly calculated” heats of face an ineffective approach for vaporization heat vaporization. Properly calculated heats of vaporiza- estimation. tion are meant as evaluated from two simulations of purely liquid and purely vapor water phases. Conclusion The dif­ference lies in existence of “surface water” molecules in the simulation with phase interface An attempt to obtain the temperature dependence comparing with pure liquid phase simulation of vapor-liquid equilibrium pressure from the MD containing no surface molecules. Comparing to simulation only has been made. Initial simulated the work of Ren et al. (2004), where they studied system arrangement, with absolutely no restric- vaporization heats at the pressure of 1 atmosphere tions (in one dimension) on condensed phase, for temperatures up to almost 370 K, our “properly provided enough freedom to molecules of liquid calculated” heats for higher temperatures were in water, allowing them to occupy the space with ap- good accordance with their results, satisfactorily propriate volume. Neither volume of liquid nor the matching at the ranges intersection. pressure was constrained. The volume occupied The underestimation of the vaporization heats, by liquid and pressure thus naturally results from observable in Fig. 6, has a clear reason in quite potential function of chosen force field and the set large fraction of molecules on the surface. While temperature. Due to the space left for vapor phase, these molecules have neighbor molecules only the temperature was the only quantity forced to

Fig. 6. The vaporization enthalpy obtained from the vapor-liquid phase interface simulation. Proper AMOEBA results agree with experimental curve (Dean, 1999) within 4 % deviation downwards and proper TIP3F results are over 5 % above this line (they are approximately on the edges of gray ±5 % error stripe). Underestimation of our two-phases simulation values is due to “border effect”, i.e. existence of less strongly bounded “surface” molecules.

Ilčin M et al., Water liquid-vapor equilibrium by molecular dynamics… 41 the system under study. Berendsen thermostat culation of vaporization heats from liquid-vapor was applied in the initial phase and Nose-Hoover equilibrium simulation is completely not recom- thermostat in the production phase of the simula- mended. Instead of this, standard method based tion. After initial thermostatization, followed by on two distinct simulations of liquid and vapor subsequent production run with suitable thermo- phase is highly recommended for vaporization stat permanently on, the simulation stepped into heats calculation. testing phase with thermostat switched off. Virtu- ally the same averages of evaluated quantities were Acknowledgement achieved during this test run without thermostat. This study was financially supported by Scientific But besides large standard deviations of the pres- Grant Agency of the Slovak Republic (VEGA Projects sure also obtained values of pressure were not 1/0594/16). We are grateful to the HPC centre at the very reliable. Therefore the alternative method of Slovak University of Technology in Bratislava which is pressure estimation were elaborated which works a part of the Slovak Infrastructure of High Performance with vapor phase molecules count and ideal gas Computing (SIVVP project, ITMS code 26230120002, equation. Provided pressure averages were more funded by the European region development funds, reliable and with noticeably smaller deviations ERDF) for the computational time and resources made despite the simplicity of used method. available. From equilibrated production and test runs, the heat of vaporization were also estimated. But not Abbreviations like at pressure estimation based on vapor phase molecules count, when it was sufficient to make MD — molecular dynamics, AMOEBA — Atomic the averages only in some subspace of overall vapor Multipole Optimized Energetics for Biomolecular phase volume, now the total molecules count in Applications, OPLSAA — Optimized Potentials For vapor phase is necessary. Not counting for every Liquid Simulations — All Atoms vapor phase molecules causes that the not counted molecules remain regarded as the liquid phase References ones. They artificially increase molecules count N of liquid phase in equation (2) leading in fictitiously Berendsen HJC, Postma JPM, van Gunsteren WF, DiNola decreasing absolute value of molar internal energy A, Haak JR (1984) J. Chem. Phys. 81: 3684. Dean JA (1999) Lange’s Handbook of Chemistry, 15th edition, Um,(liquid). Considering Um,(liquid) is negative, the de- crease in magnitude of U will also shift the McGraw-Hill, New York. m,(liquid) Hansen J-P, McDonald IR (1986) Theory of Simple , molar heat of vaporization ∆ H lower according vap m Academic Press, London. to the equation (3). More clearly it can be seen from Hirschfelder JO, Curtiss CF, Bird RB (1954) Molecular equation (4), in which the intermolecular potential Theory of and Liquids, Wiley: New York. is negative and thus positive value of Hodsdon ME, Ponder JW, Cistola DP (1996) J. Mol. Biol.

(liquid phase only) 264: 585. -Vm,inter-mol. , Hoover WG (1985) Phys. Rev. A 31: 1695. affected similarly by artificial increase of N like Jorgensen WL, Maxwell DS, Tirado-Rives J (1996) J. Am. Chem. Soc. 117: 11225. molar internal energy, will decrease the value of Jorgensen WL, McDonald NA (1998) J. Mol. ∆vapHm by fictitious decreasing of its own value. Struct. — THEOCHEM 424: 145. The need for correct total number of molecules in Jorgensen WL, Rizzo RC (1999) J. Am. Chem. Soc. 121: vapor phase makes the vaporization heat estima- 4827. tion more laborious comparing to the averaging Kundrot CE, Ponder JW, Richards FM (1991) J. Comput. of the energy values from the standard outputs of Chem. 12: 402. simulation program for separated liquid and vapor Maitland GC, Rigby M, Smith EB, Wakeham WA (1981) Intermolecular Forces, Clarendon Press: Oxford. simulations. But also when the total number of Martinez JM, Martinez L (2003) J. Comput. Chem. 24: molecules in vapor phase was correctly evaluated, 819. the value of ∆vapHm still remained underestimated. Martinez L, Andrade R, Birgin EG, Martinez JM (2009) Only with increasing the thickness of central li­ J. Comput. Chem. 30: 2157. quid stripe the vaporization heat will raise its value Matsumoto M (1998) Fluid Phase Equilibria 114: 307. closer to value from two distinct simulations of Nose S (2001) J. Phys. Soc. Japan 77: 70. vapor and liquid phase. Therefore, because of the Maxwell DS, Tirado-Rives J, Jorgensen WL (1995) J. Comput. Chem. 16: 984. ∆ necessity to calculate vapHm as a limit for infinitely McDonald NA, Jorgensen WL (1998) J. Phys. Chem. B increasing liquid stripe thickness and also due 102: 8049. to more laborious estimation of ∆vapHm in every Pappu RV, Hart RK, Ponder JW (1998) J. Phys. Chem. B simulation for concrete liquid stripe thickness, cal- 102: 9725.

42 Ilčin M et al., Water liquid-vapor equilibrium by molecular dynamics… Ponder JW, Richards FM (1987) J. Comput. Chem. 8: Sakamaki R, Sum AK, Narumi T, Yasuoka K (2011) J. 1016. Chem. Phys. 134: 124708. Price MLP, Ostrovsky D, Jorgensen WL (2001) J. Comput. Sládek V, Bučinský L, Matuška J, Ilčin M, Lukeš V, Chem. 22 1340. Laurinc V (2014) Phys. Chem. Chem. Phys. 16: 18519. Ren P, Ponder JW (2002) J. Comput. Chem. 23: 1497. van der Spoel D, van Maaren PJ, Berendsen HJC (1998) Ren P, Ponder JW (2003) J. Phys. Chem. B 107: 5933. J. Chem. Phys. 108: 10220. Ren P, Ponder JW (2003) J. Am. Chem. Soc. 125: 15671. Xie J-F, Sazhin SS, Cao B-Y (2012) J. Therm. Sc. Tech. Ren P, Ponder JW (2004) J. Phys. Chem. B 108: 13427. 7: 1.

Ilčin M et al., Water liquid-vapor equilibrium by molecular dynamics… 43