Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of...

14
Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego, 1,2, a) M. Salvalaglio, 2, 3 and M. Parrinello 1, 2 1) Department of Chemistry and Applied Biosciences, ETH Zurich, Zurich (Switzerland) 2) Institute of Computational Science, Universit` a della Svizzera Italiana, Lugano (Switzerland) 3) Institute of Process Engineering, ETH Zurich, Zurich (Switzerland) (Dated: 20 April 2015) Molecular Dynamics studies of chemical processes in solution are of great value in a wide spectrum of ap- plications, which range from nano-technology to pharmaceutical chemistry. However, these calculations are affected by severe finite-size effects, such as the solution being depleted as the chemical process proceeds, which influence the outcome of the simulations. To overcome these limitations, one must allow the system to exchange molecules with a macroscopic reservoir, thus sampling a Grand-Canonical ensemble. Despite the fact that different remedies have been proposed, this still represents a key challenge in molecular simulations. In the present work we propose the Constant Chemical Potential Molecular Dynamics (CμMD) method, which introduces an external force that controls the environment of the chemical process of interest. This external force, drawing molecules from a finite reservoir, maintains the chemical potential constant in the region where the process takes place. We have applied the CμMD method to the paradigmatic case of urea crystallization in aqueous solution. As a result, we have been able to study crystal growth dynamics under constant supersaturation conditions, and to extract growth rates and free-energy barriers. J. Chem. Phys. 142, 144113 (2015); http://dx.doi.org/10.1063/1.4917200 I. INTRODUCTION Physical-chemical processes taking place in liquid solu- tion are ubiquitous, and are at the heart of a wide variety of applications. Electro-chemical reactions, surfactants adsorption, self-assembly, crystal nucleation and growth, are just a handful of such applications. However, in many cases, a detailed description of the molecular mechanisms at play during these processes is still lacking. Molecular Dynamics (MD) represents a powerful method for investigating such processes with atomistic detail. However MD suffers from many limitations such as the relatively small time and size scales that can be simulated. With the presently available computational resources, classical MD calculations, based on empiri- cal potentials, can typically study systems of size up to 10 4 ÷ 10 6 atoms. Such size limitations are particularly dramatic in the simulation of phase transformations, as in the paradigmatic case of crystal growth from solution. In such a case, while the crystallization proceeds, the so- lution is depleted, thus changing its chemical potential and affecting the growth process itself. For this reason MD results require seizable finite-size corrections before being compared with the experimental results, which in- volve much larger system sizes 1–3 . In general, the numerical approach to prevent such fi- nite size problems is that of sampling configurations in the Gran-Canonical (GC) ensemble, namely simulating a system in contact with an external reservoir, which maintains the chemical potential constant. However, the classical methods for GC sampling 4–8 require on-the-fly a) [email protected] insertion and removal of particles. This constitutes a cru- cial obstacle for chemical processes in solution, since the probability of a successful particle insertion in a dense fluid is extremely low 9 , preventing efficient numerical studies. Recently, the development of adaptive resolution sim- ulation methods AdResS (see e.g. Ref. 10 and refer- ences therein) and H-AdResS 11,12 has lead to an alter- native path to MD simulation in the GC ensemble. In these methods the region of primary interest is described with atomistic detail, while its surroundings are treated through a lower resolution model. It has been shown that the low resolution region can act as an external molecule reservoir, enforcing the sampling of the GC en- semble in the atomistically resolved region. Moreover, in this low resolution region, particle-insertion or swapping techniques can be applied more efficiently 13 . Here, inspired by this approach, we use an analogous volume subdivision and implement a method that ad- dresses the problem of solution depletion in MD simula- tions. To be more definite, we focus our attention on the simulation of crystal growth from solution, which lately has received much attention 14–18 and for which the pitfalls of limited size numerical modeling have been underlined 19 . Nonetheless we stress that the present method can be applied to many other systems. In our scheme the region containing the growing crys- tal and its immediate surroundings is maintained at con- stant solution concentration, while the remainder of the simulation box acts as a molecular reservoir. In this way we are able to study the crystal as it grows or dissolves in contact with a solution at constant chemical potential. The paper is organized as follows: first, in Sec. II, our method is introduced and described in detail. After that we apply it to the crystallization of urea in aqueous so- arXiv:1501.07825v3 [physics.chem-ph] 17 Apr 2015

Transcript of Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of...

Page 1: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

Molecular Dynamics Simulations of Solutions at Constant Chemical PotentialC. Perego,1, 2, a) M. Salvalaglio,2, 3 and M. Parrinello1, 21)Department of Chemistry and Applied Biosciences, ETH Zurich, Zurich (Switzerland)2)Institute of Computational Science, Universita della Svizzera Italiana, Lugano (Switzerland)3)Institute of Process Engineering, ETH Zurich, Zurich (Switzerland)

(Dated: 20 April 2015)

Molecular Dynamics studies of chemical processes in solution are of great value in a wide spectrum of ap-plications, which range from nano-technology to pharmaceutical chemistry. However, these calculations areaffected by severe finite-size effects, such as the solution being depleted as the chemical process proceeds,which influence the outcome of the simulations. To overcome these limitations, one must allow the systemto exchange molecules with a macroscopic reservoir, thus sampling a Grand-Canonical ensemble. Despite thefact that different remedies have been proposed, this still represents a key challenge in molecular simulations.

In the present work we propose the Constant Chemical Potential Molecular Dynamics (CµMD) method,which introduces an external force that controls the environment of the chemical process of interest. Thisexternal force, drawing molecules from a finite reservoir, maintains the chemical potential constant in theregion where the process takes place. We have applied the CµMD method to the paradigmatic case of ureacrystallization in aqueous solution. As a result, we have been able to study crystal growth dynamics underconstant supersaturation conditions, and to extract growth rates and free-energy barriers.

J. Chem. Phys. 142, 144113 (2015); http://dx.doi.org/10.1063/1.4917200

I. INTRODUCTION

Physical-chemical processes taking place in liquid solu-tion are ubiquitous, and are at the heart of a wide varietyof applications. Electro-chemical reactions, surfactantsadsorption, self-assembly, crystal nucleation and growth,are just a handful of such applications. However, in manycases, a detailed description of the molecular mechanismsat play during these processes is still lacking.

Molecular Dynamics (MD) represents a powerfulmethod for investigating such processes with atomisticdetail. However MD suffers from many limitations suchas the relatively small time and size scales that can besimulated. With the presently available computationalresources, classical MD calculations, based on empiri-cal potentials, can typically study systems of size up to104 ÷ 106 atoms. Such size limitations are particularlydramatic in the simulation of phase transformations, asin the paradigmatic case of crystal growth from solution.In such a case, while the crystallization proceeds, the so-lution is depleted, thus changing its chemical potentialand affecting the growth process itself. For this reasonMD results require seizable finite-size corrections beforebeing compared with the experimental results, which in-volve much larger system sizes1–3.

In general, the numerical approach to prevent such fi-nite size problems is that of sampling configurations inthe Gran-Canonical (GC) ensemble, namely simulatinga system in contact with an external reservoir, whichmaintains the chemical potential constant. However, theclassical methods for GC sampling4–8 require on-the-fly

a)[email protected]

insertion and removal of particles. This constitutes a cru-cial obstacle for chemical processes in solution, since theprobability of a successful particle insertion in a densefluid is extremely low9, preventing efficient numericalstudies.

Recently, the development of adaptive resolution sim-ulation methods AdResS (see e.g. Ref. 10 and refer-ences therein) and H-AdResS11,12 has lead to an alter-native path to MD simulation in the GC ensemble. Inthese methods the region of primary interest is describedwith atomistic detail, while its surroundings are treatedthrough a lower resolution model. It has been shownthat the low resolution region can act as an externalmolecule reservoir, enforcing the sampling of the GC en-semble in the atomistically resolved region. Moreover, inthis low resolution region, particle-insertion or swappingtechniques can be applied more efficiently13.

Here, inspired by this approach, we use an analogousvolume subdivision and implement a method that ad-dresses the problem of solution depletion in MD simula-tions. To be more definite, we focus our attention onthe simulation of crystal growth from solution, whichlately has received much attention14–18 and for whichthe pitfalls of limited size numerical modeling have beenunderlined19. Nonetheless we stress that the presentmethod can be applied to many other systems.

In our scheme the region containing the growing crys-tal and its immediate surroundings is maintained at con-stant solution concentration, while the remainder of thesimulation box acts as a molecular reservoir. In this waywe are able to study the crystal as it grows or dissolvesin contact with a solution at constant chemical potential.

The paper is organized as follows: first, in Sec. II, ourmethod is introduced and described in detail. After thatwe apply it to the crystallization of urea in aqueous so-

arX

iv:1

501.

0782

5v3

[ph

ysic

s.ch

em-p

h] 1

7 A

pr 2

015

Page 2: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

2

nB

nC

Crystal Transition

Region

Bulk Solution

zI zI+Ξ

nu

FIG. 1. Qualitative behavior of the solute local density inthe vicinity of a planar crystal surface. The blue, vertical lineindicates the solid-liquid interface position at z = zI. Thelight blue shaded area corresponds to the TR, defined in thetext. Within this region, the dashed line is explanatory andnon-representative of the realistic nu behavior.

lution. The technical details of the calculations are pre-sented in Sec. III. Then, in Sec. IV, the simulation resultsare illustrated and discussed. Finally, Sec. V is devotedto the conclusions and possible perspectives of our work.

II. CONSTANT CHEMICAL POTENTIAL MD

In the present section we describe in detail ournew method, named Constant Chemical Potential MD(CµMD), which allows to perform MD of chemical pro-cesses in a solution at constant chemical potential. Inorder to illustrate the method we focus on the problemof crystal growth in a binary solution, while in princi-ple any first order phase transition can be considered.Moreover, for the sake of simplicity, we consider a planarcrystal-solution interface. Extension to other geometriesis possible, although rather more complicated.

In Fig. 1 we show a qualitative description of the lo-cal solute density nu in the neighborhood of the crystal-solution interface, located at zI. To the left of the inter-face there is the crystal region, characterized by the soliddensity nC. On the other side of zI we find a TransitionRegion (TR), of length ξ, in which the growth processtakes place. The extension of the TR is such that forz > zI + ξ the density reaches its bulk value nB. The nuprofile within the TR depends on the kinetics of crystal-lization and on the diffusivity of the liquid, and cannot beeasily guessed a priori. Here we are implicitly assumingthe considered transition does not involve macroscopiccorrelation lengths, so that ξ is finite.

During crystal growth or dissolution, the solid-liquidinterface moves together with the TR. In a macroscopicsystem nB remains unchanged and the density at theboundaries of the TR is constant, leading to a stationarygrowth process. This is in contrast with the behavior ofa finite-size system, in which nB varies due to the limitednumber of molecules.

Our method aims at restoring this stationarity condi-tion, enforcing a constant solution composition in a Con-trol Region (CR) in contact with the TR, while the restof the solution volume is used as a molecule reservoir,

nB

Crystal

nC

nR

Transition

Region

Control

Region

ReservoirFΜ

ΣF

zI zI+Ξ zI+DF

nu

FIG. 2. Same profile displayed in Fig. 1, with the addictionof an external force Fµ applied at z = zI +DF (green verticalline). The green shaded area corresponds to the transitionregion connecting the CR and the reservoir. Also in this casethe dashed profiles are purely explanatory.

as shown in Fig. 2. To control the solution density, anexternal force Fµ is applied at a fixed distance DF fromthe moving crystal interface. Fµ acts as a membrane,regulating the flux of molecules between the CR and thereservoir, in order to maintain the former at a constantconcentration. If we assume that the effect of the exter-nal force is felt in a region of size σF , the CR is locatedbetween zI + ξ and zI + DF − σF /2. In order not toaffect the growth process the CR should be larger thanthe typical correlation lengths of the solution. We stressthe fact that the force is applied at a fixed distance fromthe solid-liquid interface, to maintain a stationary solu-tion environment in the proximity of the growing crystalinterface.

As the crystallization proceeds the reservoir is de-pleted, so that the chemical potential can only be main-tained for a limited amount of time τF . In general, whenapplying the CµMD technique to some molecular pro-cess, this time limit must be taken into account, and thesimulation box has to be properly engineered so that Fµ

is able to act efficiently during the timescale of interest.We write the external force Fµ as:

Fµi (z) = ki(nCRi − n0i)G (z, ZF ) , (1)

where i labels the solute or solvent species, ki is a forceconstant, n0i is a target density and G is a bell-shapedfunction which is nonzero in the vicinity of the force cen-ter ZF = zI +DF . Eq. (1) defines a harmonic-like force,localized at a fixed distance DF from the solid, which actson the solution molecules to compensate the deviationsof the instantaneous CR density nCR

i from n0i.If Ni is the total number of i-species molecules andVCR the CR volume, we evaluate nCR

i as:

nCRi =

1

VCR

Ni∑j=1

θ(zj), (2)

where:

θ(zj) =

{1 if zj ∈ CR

0 otherwise, (3)

Page 3: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

3

is a function that selects the molecules inside the CR. Inthe practice, we let θ(z) switch continuously to 0 at theCR boundaries, in order to avoid sudden jumps in nCR

i .We then define the function G(z, ZF ), localizing the

action of Fµ close to the force center ZF , as:

Gw(z − ZF ) =1

4w

[1 + cosh

(z − ZFw

)]−1. (4)

Gw is nonzero only for z ∼ ZF , with an intensity peakproportional to w−1 and a width proportional to w. Weobserve that Fµ is non-conservative, since it is not pos-sible to define a potential function that leads to Eq. (1).

As a further remark we note that Eq. (1) defines twoseparate forces acting on the solute and solvent species.In principle the concentration of both species affectsthe chemical potential of the solution20 and should becontrolled. However, we are mainly interested in con-stant pressure simulations, where only a single popula-tion needs to be subject to Fµ, because the action ofthe barostat algorithm21,22 guarantees a prompt equili-bration of the other species concentration. If instead anNVT dynamics is considered, Fµ should act on both so-lute and solvent species.

To conclude this section let us summarize the CµMDscheme in explicit algorithm steps:

1. the solid-liquid interface position zI is located on-the-fly analyzing the solvent molecules distributionwithin the box,

2. the force center ZF , is updated maintaining a fixeddistance DF from zI, and the CR position is shiftedaccordingly,

3. the densities nCRi are evaluated via Eq. (2).

4. The MD equations of motions, including the exter-nal forces of Eq. (1), are integrated.

We recall once again that this method is effective for afinite validity time τF , depending on the availability ofmolecules in the reservoir.

III. TEST CASE AND SIMULATION SETUP

In the present section we introduce the typical setup ofour calculations. We considered here the case of a ureacrystal growing in aqueous solution in slab geometry, asshown in Fig. 3. The system is generated starting froman approximately 2.5 nm thick crystal slab, periodicallyrepeated in the x and y directions. Along z, the slabexposes either the {001} or the {110} face, the two sta-ble faces in urea crystal growth from aqueous solution23.Such a crystal is immersed in a supersaturated solution,generated by means of the Packmol24 and genbox (GRO-MACS package) utilities. The typical size of the simu-lation box is of 2.7 × 2.7 × 14 nm3, Periodic BoundaryConditions (PBC) are applied in the x,y and z directions.

FIG. 3. Typical simulation box for the study of urea crystalgrowth in aqueous solution. The vertical lines indicate theforce center ZF , where Fµ is applied (see Eq. (1)), locatedat both sides of the slab, at distance DF from the crystalinterfaces. The gray-shaded areas indicate the CR.

The number of urea and of water molecules for each sim-ulated system is reported in Tab. I. The initial soluteconcentration has to be larger than the target concentra-tion, to allow a stationary growth regime for a timescaleof 10− 100 ns.

Following our previous work18,19, we use the Gener-alized Amber Force Field (GAFF)25,26 to model urea,and the TIP3P model27 for water. The molecular bondsare constrained through the LINCS algorithm28 and longrange electrostatics is handled by means of Particle MeshEwald (PME) method29.

The system is kept at a constant temperature of 300K and pressure of 1 bar by using the stochastic veloc-ity rescaling thermostat30 and the Parrinello-Rahmanbarostat21. Because of the planar symmetry, the barostatis applied in its semi-isotropic version, so that the z-sideof the box, parallel to the growth direction, is rescaledseparately from the x and y sides. Since the system isrescaled during the dynamics, also the CµMD length pa-rameters, as e.g. DF , have to be rescaled accordingly.Our implementation redefines the lengths on-the-fly, fol-lowing the fluctuations of the z-edge of the box. In theconsidered simulations Fµ does not affect the pressure ofthe system by a significant amount, since it determinesa surface effect, small compared to the potential and ki-netic bulk contributions. For this reason in the presentedresults we did not couple the external force with the baro-stat equations.

After the initial equilibration phase, a 2 fs integrationstep has been chosen for all the production runs. Allthe calculations have been performed using the GRO-MACS package31 equipped with a private version of thePLUMED plug-in32,33, in which the external force Fµ

has been implemented.The position zI of the two interfaces is located on-the-

fly by an algorithm which collects the instantaneous wa-

Page 4: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

4

Run Face Nu Nw DF [nm] ξ [nm] σ [nm] u/w n0i [nm−3] ki[nm3 kJmol

]Au1

{001} 679 1757 2.5 1.0 0.5 u1.5

21.0Au2 2.4

Au3 3.3

Aw1

{001} 679 1757 2.5 1.0 0.5 w30.25 2.5

Aw2 28.25 2.5

Aw3 26.25 3.5

NPT {001} 679 1757 Ordinary NPT

Buj {110} 625 1533 3.2 1.0 0.2u 1.7 7.8

Bwj w 29.0 1.95

NPT {110} 625 1533 Ordinary NPT

TABLE I. Simulation settings used for the different MD calculations presented in Sec. IV.

ter density distribution nw(z) in an histogram of bin-sizeδz. Since nw(z) = 0 inside the crystal volume, we canchoose a threshold value nI that indicates the transitionfrom the liquid phase to the solid. The crystal interfacesare then located at nw(z) = nI. Typical values used forthese parameters are nI = 10nm−3 and δz = 0.75 A.

As shown in Fig. 3, to comply with the PBC, Fµ isapplied at both sides of the slab, and the CR consistsof two layers of liquid at fixed distance from the crys-tal interfaces. All the CµMD parameters chosen for thepresented simulations are based on a preliminary tuningperformed on a typical system. During this process theeffective decoupling between the reservoir region and thegrowing crystal is assessed by testing different parame-ter configurations, and observing the resulting solutionbehavior. All the details of this tuning procedure arereported in the Supplementary Material (SM). The rele-vant calculation settings are listed in Tab. I

IV. CRYSTAL GROWTH AT CONSTANTSUPERSATURATION

We now present the results of the application of theCµMD method to the simulation of urea crystal growthin aqueous solution. In our study we have consideredthe growth of the {001} and {110} faces. It is knownthat these two faces are characterized by different growthmechanisms: the {001} face undergoes a rough growthprocess, while the {110} face grows through a birth-and-spread mechanism14,18.

First, we investigate the {001} face growth process. Wehave performed 2 sets of three simulations, referred to asAuj and Awj . In the Auj type simulations Fµ restrainsurea density, while in the Awj is water to be controlled.As reported in Tab. I, the index j = 1, 2, 3 runs overdifferent target densities. For comparison we have alsoperformed an ordinary NPT run of the same system. Ineach simulation we have evaluated the number of solidmolecules N c using the Degree Of Crystallinity (DOC)variable defined in Ref. 34.

In Fig. 4 we report the evolution of N c and of the mole

fraction x measured in the CR for the Auj and NPT sim-ulations (an analogous plot for the Awj runs is includedin the SM). Let us focus on the behavior of the Au1 simu-lation (upper-left panel). After an initial transient τt theaction of Fµ stabilizes the mole fraction around x = 0.05.As the crystal grows, the reservoir region is gradually de-pleted and, as a consequence, at τF = 53 ns the CR molefraction starts drifting to lower values, meaning that theCµMD method is no longer valid. Within the validityrange (τt < t < τF) N c increases linearly, as expectedfor a rough growth process at constant supersaturation.The N c behavior during the validity range can be fittedwith a linear model, the slope of which is the growthrate g{001} at this particular solution composition. Fort > τF the crystal rate decreases, reflecting the changein solution chemical potential. An analogous behavior isobtained in the Au2 and Au3 simulations, where largersupersaturations are enforced, determining a faster crys-tal growth. This results in a more rapid depletion ofthe reservoir and, as a consequence, in a shorter τF . Incontrast with the CµMD runs, in the NPT simulationthe solution concentration varies throughout the wholedynamics, interfering with crystal growth. In Fig. 5 wereport the growth rates obtained in the Auj and Awj sim-ulations, corresponding to different values of x. Remark-ably, g{001} exhibits a linear dependence on x that is char-acteristic of a rough growth mechanism (see e.g. Ref. 35).It is rewarding that the results are consistent, irrespectivefrom the controlled species.

In two further sets of simulations we have appliedCµMD method to the {110} face growth, either restrain-ing urea (Bu run in Tab. I) or water density (Bw). Forcomparison we have also performed an ordinary NPTsimulation of the same system. As mentioned before,the {110} face growth process exhibits a birth-and-spreadnature. Because of this mechanism N c evolves in a step-wise behavior, each step corresponding to the formationof a new crystalline layer. The dynamics of N c for theBu and NPT cases is represented in Fig. 6. In the fig-ure we have also reported the mole fraction evolution,showing that our method is able to maintain a stable so-lution composition for a significant time. In both Bu and

Page 5: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

5

Τt=2.2 ΤF=53.0

Au1

0 20 40 60 80

0.04

0.08

0.12

0

100

200

300

t @nsD

xDN

c

Τt=1.3 ΤF=34.5

Au2

0 20 40 60 80

0.04

0.08

0.12

0

100

200

300

t @nsD

xDN

c

Τt=0.8 ΤF=23.4

Au3

0 20 40 60 80

0.04

0.08

0.12

0

100

200

300

t @nsD

xDN

c

NPT

0 20 40 60 80

0.04

0.08

0.12

0

100

200

300

t @nsD

xDN

c

FIG. 4. Auj simulations results compared to the ordinary NPT behavior. The green curves represent the increase of thecrystal-like molecule number ∆Nc as a function of time. The blue curves represent the solution mole fraction x measured inthe CR as a function of time. The instantaneous value of x is represented in faded color, while the full-color curves are obtainedvia Exponentially Weighted Moving Average, with characteristic smoothing time of 0.5 ns. The red marks indicate the validitytime-window of the CµMD method, namely τt < t < τF. The black dashed lines represent the linear fit of the ∆Nc behavior,calculated within the corresponding validity time range as explained in the text.

0.04 0.06 0.08 0.10 0.12

2

4

6

8

10

12

14

x

g800

1<@n

s-1D

Auj runs

Awj runs

Linear Fit

FIG. 5. Growth rates measured in Auj and Awj simulations,versus the average CR mole fraction (see Fig. 4). The reddashed line is a linear fit of the growth rates.

Bw runs the CR mole fraction is maintained at approxi-mately x = 0.062 (all the Bu and Bw results are reportedin the SM) .

We now estimate the {110} face growth rate at con-stant supersaturation g{110}. Since the environment so-lution is not changing, we can assume that after a layergrowth event the system carries no memory of its past.

Thus the probability that a new layer is created is in-dependent from the growth history, and the time inter-val between two successive events follows an exponentialdistribution36. However, in a single run, only few layersare created before the solution starts depleting. Thus, inorder to collect sufficient statistics for the constructionof the time distribution, we have repeated each Bu andBw simulations five times. Of course we have consideredonly the events occurring at τt < t < τF.

We have constructed the cumulative time distributionof the observed events, and fitted it with an exponentialmodel, as shown in Fig. 7. The statistical significance ofthis fit has been assessed using the Kolmogorov-Smirnovtest37, obtaining a p-value of 0.37. From the regres-sion we have extracted the characteristic occurrence timeτ{110} = 18.3±2.7 ns, which corresponds to a growth rate

g{110} = 1.73 ± 0.25 ns−1. This result can be comparedto our estimate of the {001} rate at x = 0.062, that isg{001} = 6.59± 0.97 ns−1, obtained from the linear inter-polation in Fig. 5.

In Ref. 19 we have proposed a model for the growthrate of the {hjk} face of urea crystal, in which:

g{hjk} = g0 exp(−β∆G{hjk}

), (5)

Page 6: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

6

Τt=5 ΤF=75.0

Bu1

0.05

0.10

0.15

0

100

200x

DN

c

NPT

0 20 40 60 80 100

0.05

0.10

0.15

0

100

200

t @nsD

xDN

c

FIG. 6. Bu1 simulations results compared to the ordinaryNPT behavior. The green curves represent the increase of thecrystal-like molecule number ∆Nc as a function of time. Theblue curves represent the solution mole fraction x measuredin the CR as a function of time. The instantaneous valueof x is represented in faded color, while the full-color curvesare obtained via Exponentially Weighted Moving Average,with characteristic smoothing time of 0.5 ns. The red marksindicate the validity time-window of the CµMD method.

1 2 5 10 20 50 1000.0

0.2

0.4

0.6

0.8

1.0

t @nsD

CDF

Events

Fit, Τ= 18.29 ns

FIG. 7. Cumulative time distribution of the layer growthevents at x = 0.062 (Bu and Bw simulations). The red curveis the fitted Cumulative Distribution Function, equal to y(t) =1−exp(−t/τ{110}) for exponentially distributed time intervals.

where g0 is a characteristic diffusion limited growth rate,∆G{hjk} is the free-energy barrier associated to the cre-

ation of an extra {hjk} layer and β−1 = kBT . The modelhas been used in Ref. 19 to predict the urea crystal habits,by evaluating the velocity ratio between different crystalfaces:

g{hjk}/g{lmn} = exp(−β∆G{hjk} + β∆G{lmn}). (6)

We underline that this ratio depends only on the free-

energy barriers, which are static properties of the sys-tem. Using the ∆G{001} and ∆G{110} evaluated via Well-

Tempered (WT) metadynamics38 in Ref. 19, Eq. (6) givesg{001}/g{110} = 3.61 at x = 0.062. This result is consis-tent with the ratio obtained from our dynamical esti-mates, that is g{001}/g{110} = 3.8± 0.8.

The birth-and-spread nature of the {110} face growthmechanism is determined by non-negligible free-energybarriers ∆Gi associated to the incorporation of new so-lute molecules in the growing crystal. In the followingwe shall derive such free-energy barriers from the CµMDtrajectories obtained from the Bu and Bw simulations.

The growth dynamics, see e.g. Fig. 6, shows that thesystem evolves through a sequence of metastable statesi = 1 . . . n, each characterised by an average number ofmolecules in the crystal state 〈N c〉i. Therefore, the prob-ability distribution P (N c), computed averaging over theensemble of Bu and Bw trajectories, will exhibit an alter-nation of minima and maxima, the former representingthe metastable states at N c

min,i = 〈N c〉i, and the latterrepresenting the faster layer growth transitions. This isin agreement with Fig. 8, which represents the behaviorof:

G(N c) ≡ − 1

βlnP (N c). (7)

From the function G(N c) we can evaluate the free-energybarriers associated to the layer growth transitions. Sincethe lifetime of each metastable state is such that thesampling in the vicinity of a minimum can be consid-ered ergodic, the relative free energy associated to theN c fluctuations within the i-th basin can be written as:

∆GNcmin,i→Nc = − 1

βln

P (N c)

P (N cmin,i)

= G(N c)−G(N cmin,i)

(8)According to Eq. (8), the free-energy barrier associated tothe creation of a layer from a metastable state is ∆Gi =G(N c

max,i)−G(N cmin,i), as indicated in Fig. 8.

The barriers resulting from our CµMD simulations ex-hibit very similar heights, showing that successive growthevents obtained in the molecular model are equivalent.This provides further confirmation that the action ofCµMD maintains the growing crystal environment ata constant chemical potential. As shown in Fig. 8 thedata can be fitted using a sinusoid, obtaining a remark-able agreement. The free-energy barrier associated tothe sampled growth events can be extracted from thefitted curve, obtaining ∆G = 2.63 kBT , which is in sub-stantial agreement with the corresponding barrier ∆G =2.0±1.0 kBT , computed in the model proposed in Ref. 19.

V. CONCLUSIONS AND PERSPECTIVES

In this work we have presented the CµMD method,which addresses the concentration depletion problems in

Page 7: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

7

Nmax,ic

Nmin,ic

DGi

300 320 340 360 380 400 420 440

0

1

2

3

Nc

G@k

BTD

DataFit

FIG. 8. Behavior of G(Nc) (see Eq. (7)) evaluated using theprobability distribution P (Nc), extracted from the Bu andBw simulations sampling. The red dashed line represents asinusoidal fit of the numerical result.

the MD study of finite systems. CµMD applies an exter-nal force that controls the solution composition withina region of interest of the system, while the remainingvolume is used as a molecular reservoir.

CµMD has been implemented and tested for the rele-vant case of urea crystal growth in aqueous solution. Forthe considered systems the method is capable of main-taining the solution environment of the growing crystal atconstant composition, up to times of the order of 10÷100ns. This has allowed us to estimate the {001} and {110}faces growth rates in a constant supersaturation envi-ronment. Such kind of results are not accessible withordinary NPT dynamics, due to the intrinsic couplingbetween the crystal size and the solution composition.The retrieved results are also in remarkable agreementwith the predictions of Ref. 19, which are based on thecombination of a theoretical free energy model and WTmetadynamics calculations. The evaluation of the free-energy barriers associated to the growth of consecutive{110} layers has shown that the events are thermody-namically equivalent, providing further support to thehypothesis that CµMD can establish a stationary growthregime.

The proposed scheme can be applied to a variety of MDproblems, such as crystal nucleation, electro-chemistry,surfactants adsorption. However the external force hasto be properly re-defined to comply with the character-istic features of these systems. The timescale of validityof CµMD is related to the fixed number of molecules in-volved in the simulation. A possible future developmentcan be the combination of CµMD method with adaptiveresolution10,11 or particle insertion techniques39, whichwould result in a considerable extension of the validityrange of the method.

BIBLIOGRAPHY

1M. Salvalaglio, C. Perego, F. Giberti, M. Mazzotti, and M. Par-rinello, “Molecular-dynamics simulations of urea nucleation fromaqueous solution,” Proceedings of the National Academy of Sci-ences, vol. 112, no. 1, pp. E6–E14, 2015.

2J. W. Schmelzer and A. S. Abyzov, “Comments on the thermody-namic analysis of nucleation in confined space,” Journal of Non-Crystalline Solids, vol. 384, no. 0, pp. 2 – 7, 2014. Crystallization2012 Proceedings of the 10th International Symposium on Crys-tallization in Glasses and Liquids Goslar, Germany September 2326, 2012.

3R. Grossier and S. Veesler, “Reaching one single and stable criticalcluster through finite-sized systems,” Crystal Growth and Design,vol. 9, no. 4, pp. 1917–1922, 2009.

4D. H. L. Yau, S. Y. Liem, and K.-Y. Chan, “A contact cavity-biased method for grand canonical monte carlo simulations,” TheJournal of Chemical Physics, vol. 101, no. 9, 1994.

5A. Papadopoulou, E. D. Becker, M. Lupkowski, and F. van Swol,“Molecular dynamics and monte carlo simulations in the grandcanonical ensemble: Local versus global control,” The Journal ofChemical Physics, vol. 98, no. 6, 1993.

6C. Lo and B. Palmer, “Alternative hamiltonian for molecular dy-namics simulations in the grand canonical ensemble,” The Journalof Chemical Physics, vol. 102, no. 2, 1995.

7T. Cagin and B. M. Pettitt, “Molecular dynamics with a variablenumber of molecules,” Molecular Physics, vol. 72, no. 1, pp. 169–175, 1991.

8G. C. Lynch and B. M. Pettitt, “Grand canonical ensemble molec-ular dynamics simulations: Reformulation of extended system dy-namics approaches,” The Journal of Chemical Physics, vol. 107,no. 20, 1997.

9R. Delgado-Buscalioni and P. V. Coveney, “Usher: An algorithmfor particle insertion in dense fluids,” The Journal of ChemicalPhysics, vol. 119, no. 2, 2003.

10H. Wang, C. Hartmann, C. Schutte, and L. Delle Site,“Grand-canonical-like molecular-dynamics simulations by usingan adaptive-resolution technique,” Phys. Rev. X, vol. 3, p. 011018,Mar 2013.

11R. Potestio, S. Fritsch, P. Espanol, R. Delgado-Buscalioni,K. Kremer, R. Everaers, and D. Donadio, “Hamiltonian adap-tive resolution simulation for molecular liquids,” Phys. Rev. Lett.,vol. 110, p. 108301, Mar 2013.

12R. Potestio, P. Espanol, R. Delgado-Buscalioni, R. Everaers,K. Kremer, and D. Donadio, “Monte carlo adaptive resolutionsimulation of multicomponent molecular liquids,” Phys. Rev.Lett., vol. 111, p. 060601, Aug 2013.

13D. Mukherji, and K. Kremer, “CoilGlobuleCoil Transition ofPNIPAm in Aqueous Methanol: Coupling All-Atom Simulationsto Semi-Grand Canonical Coarse-Grained Reservoir,” Macro-molecules, vol. 46, p. 9158, Nov 2013.

14S. Piana, M. Reyhani, and J. D. Gale, “Simulating micrometre-scale crystal growth from solution,” Nature, vol. 438, pp. 70–73,2005.

15S. Piana, F. Jones, and J. Gale, “Assisted desolvation as a key ki-netic step for crystal growth,” Journal of the American ChemicalSociety, vol. 128, no. 41, pp. 13568–13574, 2006.

16D. Cheong and Y. Boon, “Comparative study of force fields formolecular dynamics simulations of α-glycine crystal growth fromsolution,” Crystal Growth and Design, vol. 10, no. 12, pp. 5146–5158, 2010.

17J. Anwar and D. Zahn, “Uncovering molecular processes in crys-tal nucleation and growth by using molecular simulation,” Ange-wandte Chemie - International Edition, vol. 50, no. 9, pp. 1996–2013, 2011.

18M. Salvalaglio, T. Vetter, F. Giberti, M. Mazzotti, and M. Par-rinello, “Uncovering molecular details of urea crystal growth inthe presence of additives,” Journal of the American Chemical So-ciety, vol. 134, no. 41, pp. 17221–17233, 2012.

19M. Salvalaglio, T. Vetter, M. Mazzotti, and M. Parrinello, “Con-

Page 8: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

8

trolling and predicting crystal shapes: The case of urea,” Ange-wandte Chemie International Edition, vol. 52, no. 50, pp. 13369–13372, 2013.

20J. G. Kirkwood and F. P. Buff, “The statistical mechanical theoryof solutions. i,” The Journal of Chemical Physics, vol. 19, no. 6,pp. 774–777, 1951.

21M. Parrinello and A. Rahman, “Crystal structure and pair po-tentials: A molecular-dynamics study,” Phys. Rev. Lett., vol. 45,pp. 1196–1199, Oct 1980.

22M. Parrinello and A. Rahman, “Polymorphic transitions in singlecrystals: A new molecular dynamics method,” Journal of AppliedPhysics, vol. 52, no. 12, 1981.

23R. Docherty, K. Roberts, V. Saunders, S. Black, and R. Davey,“Theoretical analysis of the polar morphology and absolute po-larity of crystalline urea,” Faraday Discuss., vol. 95, pp. 11–25,1993.

24L. Martnez, R. Andrade, E. G. Birgin, and J. M. Martnez, “Pack-mol: A package for building initial configurations for molecu-lar dynamics simulations,” Journal of Computational Chemistry,vol. 30, no. 13, pp. 2157–2164, 2009.

25W. D. Cornell, P. Cieplak, C. I. Bayly, I. R. Gould, K. M. Merz,D. M. Ferguson, D. C. Spellmeyer, T. Fox, J. W. Caldwell, andP. A. Kollman, “A second generation force field for the simulationof proteins, nucleic acids, and organic molecules,” Journal of theAmerican Chemical Society, vol. 117, no. 19, pp. 5179–5197, 1995.

26J. Wang, R. M. Wolf, J. W. Caldwell, P. A. Kollman, and D. A.Case, “Development and testing of a general amber force field,”Journal of Computational Chemistry, vol. 25, no. 9, pp. 1157–1174, 2004.

27W. L. Jorgensen, J. Chandrasekhar, J. D. Madura, R. W. Im-pey, and M. L. Klein, “Comparison of simple potential functionsfor simulating liquid water,” The Journal of Chemical Physics,vol. 79, no. 2, 1983.

28B. Hess, “P-lincs: a parallel linear constraint solver for molecu-lar simulation,” Journal of Chemical Theory and Computation,vol. 4, no. 1, pp. 116–122, 2008.

29T. Darden, D. York, and L. Pedersen, “Particle mesh ewald: Annlog(n) method for ewald sums in large systems,” The Journal ofChemical Physics, vol. 98, no. 12, 1993.

30G. Bussi, D. Donadio, and M. Parrinello, “Canonical samplingthrough velocity rescaling,” The Journal of Chemical Physics,vol. 126, no. 1, pp. –, 2007.

31B. Hess, C. Kutzner, D. van der Spoel, and E. Lindahl, “Gro-macs 4: algorithms for highly efficient, load-balanced, and scalablemolecular simulation,” Journal of Chemical Theory and Compu-tation, vol. 4, no. 3, pp. 435–447, 2008.

32M. Bonomi, D. Branduardi, G. Bussi, C. Camilloni, D. Provasi,P. Raiteri, D. Donadio, F. Marinelli, F. Pietrucci, R. A. Broglia,and M. Parrinello, “Plumed: A portable plugin for free-energycalculations with molecular dynamics,” Computer Physics Com-munications, vol. 180, no. 10, pp. 1961 – 1972, 2009.

33G. A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni, andG. Bussi, “{PLUMED} 2: New feathers for an old bird,” Com-puter Physics Communications, vol. 185, no. 2, pp. 604 – 613,2014.

34F. Giberti, M. Salvalaglio, M. Mazzotti, and M. Parrinello, “In-sight into the nucleation of urea crystals from the melt,” Chemi-cal Engineering Science, vol. 121, no. 0, pp. 51 – 59, 2015. 2013Danckwerts Special Issue on Molecular Modelling in Chemical En-gineering.

35M. A. Lovette, A. R. Browning, D. W. Griffin, J. P. Sizemore,R. C. Snyder, and M. F. Doherty, “Crystal shape engineering,”Industrial & Engineering Chemistry Research, vol. 47, no. 24,pp. 9812–9833, 2008.

36G. Chkonia, J. Wlk, R. Strey, J. Wedekind, and D. Reguera,“Evaluating nucleation rates in direct simulations,” The Journalof Chemical Physics, vol. 130, no. 6, pp. –, 2009.

37J. Massey, Frank J., “The kolmogorov-smirnov test for goodnessof fit,” Journal of the American Statistical Association, vol. 46,no. 253, pp. pp. 68–78, 1951.

38A. Barducci, G. Bussi, and M. Parrinello, “Well-temperedmetadynamics: A smoothly converging and tunable free-energymethod,” Phys. Rev. Lett., vol. 100, p. 020603, Jan 2008.

39Q.-J. Hong and A. van de Walle, “Direct first-principles chem-ical potential calculations of liquids,” The Journal of ChemicalPhysics, vol. 137, no. 9, pp. –, 2012.

Page 9: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

1

Molecular Dynamics Simulations of Solutions at Constant Chemical PotentialSupplementary Material

In the following we report further details about the results presented in the Main Submission (MS) text. Thissupplementary material is organized in two sections: Sec. SI presents a preliminary study that has been performed totune the CµMD method for the typical system considered in our calculations. In Sec. SII we gather supplementaryinformation concerning the simulation results presented in the MS.

SI. PRELIMINARY STUDY

In this section we report the results of a preliminarystudy on the application of CµMD method to crystalgrowth. This study aims at finding convenient parametersettings for the typical urea-water systems simulated inour work.

It has to be noted that CµMD reliability is related tosystem properties such as size, initial solution concen-tration and liquid diffusivity. For this reason, a tuningprocess becomes necessary each time the method is ap-plied to a new system.

Let us first summarize the CµMD parameters:

• DF , the distance of the force center ZF from thesolid-liquid interface zI.

• the CR position and size, defined by ξ and σ. Theformer is the distance between the inner CR bound-ary and zI, while the latter is the distance betweenthe outer CR boundary and ZF (see Fig. 2 in theMS).

• the force constant ki (see MS Eq. (1)),

• the characteristic length w of MS Eq. (4),

• the target concentration n0i, either for urea or wa-ter species.

The system used for this study is the {001} growth con-figuration, all the relevant parameters are summarized inTab. SI. In particular, the following analysis is focusedon tuning of DF , σ and ku, while constant values havebeen assigned to nu0, ξ and w. In order to keep a limitedgrowth rate, and thus a long CµMD validity time, nu0has been set to 1.5 nm−3. The choice for the ξ and wvalues will be discussed later on.

In a first set of 4 MD runs, which we will refer to as Xj ,we have tested the effect of varying DF and σ together,so that the force is applied at different distances fromthe crystal interface while the CR maintains the samesize and position (referred to the crystal).

In Fig. S1 we report the evolution of the CR urea den-sity nCR

u . It can be noted that, in each simulation, theCµMD maintains a stable nCR

u , close to the target valuenu0, for at least 52 ns (X3 and X4). In the X1 and X2

cases, for which Fµ is applied closer to the CR, the va-lidity time is longer. This is because a larger volume is

assigned to the reservoir region, and the control of thesolution concentration is more effective.

To look at the quantitative differences between Fig. S1curves, in Tab. SII we report the average CR densityand standard deviation for each run, evaluated over 52ns. During this lapse of time all the simulations enforcean average density close to the target value nu0, and acorrelation between the density fluctuations and σ (or,alternatively, DF ) emerges. That is because a larger dis-tance between the force center and the CR results in aslower response of Fµ to the density variations, and thusin a weaker control of nCR

u .

In the Xj runs we have also monitored the mole frac-tion at different distances from the crystal. In Fig. S2 wereport the resulting mole fraction profile for each simula-tion, averaged in time. The qualitative behavior of thisprofile is consistent with the trend described in Sec. 2 ofthe MS and, in particular, we underline that the choiceof ξ = 1.0 nm is appropriate to identify the TR of oursystem.

Fig. S2 shows that, for the X2, X3 and X4 cases, theapplication of CµMD method determines a flat profilewithin the CR, and no correlation with DF is present.Conversely, in the X1 case the vicinity of the force cen-ter to the CR has a direct contribution on its concen-tration. This should be avoided, since it prevents thedecoupling of the reservoir region from the environmentof the crystal. To support this statement we compare thetime evolution of the x profile for the X1 and X2 cases.To this purpose we have evaluated the time average ofthe x profiles over 4 consecutive windows of time, so thatthe slow composition dynamics is visible. Let us focus onthe behavior of x within the CR region: while in the X1

case (represented in Fig. S3a) the profile varies through-out the whole simulation, in the X2 case (Fig. S3b) themole fraction remains flat for the first three windows oftime, up to the limit of validity of CµMD.

These results suggest that a layer of thickness σ be-tween the force center and the CR is necessary to decou-ple the reservoir from the crystal environment. However,the choice of σ also affects the promptness of Fµ in bal-ancing the CR composition variations. Given this, theconfiguration used in X2 case seems to be the best com-promise. We underline that the choice of σ is also relatedto the characteristic length w, which indicates the local-ization of Fµ around the force center. In our calculations

Page 10: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

2

Run Nu Nw DF [nm] ξ [nm] σ [nm] w [nm] n0u [nm−3] ku[nm3 kJmol

]X1

679 1757

2.0

1.0

0.0

0.2 1.5 21.0X2 2.5 0.5

X3 3.0 1.0

X4 3.5 1.5

NPT2V 698 5125 Ordinary NPT, double size

Y1

679 1757 2.5 1.0 0.5 0.2 1.5

35.0

Y2 21.0

Y3 7.0

Y4 3.5

TABLE SI. Simulation settings used for the MD simulations reported in this section.

1 @nm-3D

0 20 40 60 80

nu0

nu0

nu0

nu0

t @nsD

nuCR@nm-3D

X1 HDF=2.0L

X2 HDF=2.5L

X3 HDF=3.0L

X4 HDF=3.5L

FIG. S1. Trajectories of the CR urea density for the Xj simulations. The instantaneous value is represented in faded color,while the full-color curves are obtained via Exponentially Weighted Moving Average, with characteristic smoothing time of 0.5ns. Each curve is referred to the target density n0u = 1.5 nm−3 (dot-dashed axes). The dashed vertical line indicates t = 52ns, the time at which solution depletion becomes significant for X3 and X4.

Run 〈nCRu 〉 − nu0 sn

X1 −2.0× 10−3 0.24

X2 3.1× 10−2 0.26

X3 3.8× 10−2 0.30

X4 4.9× 10−2 0.33

TABLE SII. Average CR urea density (referred to nu0 = 1.5)

and standard deviation sn =√〈(nCR

u )2〉 − 〈nCRu 〉2 of the Xj

simulations. The density, in units of nm−3, is averaged over 52ns of dynamics, in order to consider only the validity regimeof the method.

we have chosen w = 0.2÷0.3 which, according to our ex-perience, determines an efficient, but still local, action onthe molecules.

In a further set of 4 simulations, indicated in Tab. SIas Yj , we have performed CµMD with different values ofthe force constant ku, starting from the X2 settings. As a

term of comparison we have also performed an ordinaryNPT simulation, named NPT2V , in which the crystalslab is immersed in a larger volume of liquid, almost twicethe original size, with a solution composition close to thatenforced by Fµ in the Yj runs.

In Fig. S4 we report the evolution of the CR urea con-centration nCR

u in the Yj and NPT2V simulations. Firstwe note that the NPT2V system does not experience asignificant solution depletion up to 20 ns. Thus, withinthis time range, we can consider the NPT2V run as agood approximation to a macroscopic system.

If we look to the Yj trajectories we see that the nCRu

dynamics is affected by the choice of k. In the Y1 case(ku = 35.0 nm3 kJ/mol) nCR

u fluctuates steadily aroundnu0, while for smaller ku the density is less stable. This isquantitatively confirmed by Tab. SIII, where we reportthe corresponding nCR

u mean and standard deviations,up to 20 ns. As k is reduced, the standard deviationincreases, while the average density distances the target

Page 11: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

3

DFHX1L DFHX2L DFHX3L

DFHX4L

CR

0.5 1.0 1.5 2.0 2.5 3.00.0

0.1

0.2

0.3

0.4

D @nmD

Xx\

X1 HDF=2.0L

X2 HDF=2.5L

X3 HDF=3.0L

X4 HDF=3.5L

FIG. S2. Local mole fraction profile as a function of thedistance from the solid-liquid interface. The results of theXj simulations, averaged over τ = 41 ns, are displayed. Eachlocal value is evaluated in 0.25 nm thick layers, symmetricallylocated at both sides of the crystal. The vertical colored lineshighlight the force center position except for the X4 case, inwhich DF falls outside the plot range. The error bars areevaluated with the re-blocking techniqueS1. Because of thelong correlation times the error estimate is not completelyreliable for D & 2 nm.

CR

aL

0.5 1.0 1.5 2.0 2.5 3.00.0

0.1

0.2

0.3

0.4

Xx\ Τ

i

Τ1=0-20.5 ns

Τ2=20.5-41 ns

Τ3=41-61.5 ns

Τ4=61.5-82 ns

bL

0.5 1.0 1.5 2.0 2.5 3.00.0

0.1

0.2

0.3

0.4

D @nmD

Xx\ Τ

i

FIG. S3. Temporal evolution of the average mole fractionprofile for the X1 (a) and X2 (b) cases. Each curve representsthe average of x(D) over a different time window, as indicatedin the legend. The black arrows highlight the temporal evo-lution of the composition in the reservoir. The error bars areevaluated with the re-blocking techniqueS1. Because of thelong correlation times the error estimate is not completelyreliable for D & 2 nm.

value nu0. That is because a larger ku determines a moreintense Fµ response to the density fluctuations, and thusa more effective control on the flux of urea molecules fromthe reservoir to the CR.

From Tab. SIII we also note that, while a larger kallows a better control of the CR composition, the den-

Run 〈nCRu 〉 − nu0 sn

Y1 1.5× 10−2 0.24

Y2 5.5× 10−2 0.26

Y3 7.5× 10−2 0.29

Y4 1.8× 10−1 0.34

NPT2V 1.6× 10−2 0.34

TABLE SIII. Average CR urea density (referred to nu0 = 1.5)and standard deviation of the Yj and NPT2V simulations.The density, in units of nm−3, is averaged over 20 ns of dy-namics.

sity fluctuations in the realistic NPT dynamics are moresimilar to the results of Y4 simulation, the one with thesmallest k. This raises the question whether this differ-ence in composition sampling affects the crystal growth.

To answer this question in Fig. S5 we report the lo-cal standard deviation sn(D) of nCR

u . While at distancesD ≥ 1.5 nm from the interface the Yj runs exhibit adifferent sn behavior compared to the NPT2V case, thisdifference is much mitigated as we get closer to the solid-liquid interface. This analysis suggests that, for this sys-tem, the choice of ku does not affect significantly thecomposition fluctuations of the solution in contact withthe crystal. As a result it is preferable to choose a largeku, which entails a more effective control on the CR.

As a last remark we underline that in this study Fµ

was applied exclusively to the urea specie. However theresults are still useful when the restraining force acts onthe water population, provided that k is rescaled accord-ing to the typical nw fluctuations.

SII. CRYSTAL GROWTH CALCULATIONS

In this section we report the additional material con-cerning the MD calculations presented in Sec. 4 of theMS. We organize the information in two sub-sections,concerning the growth processes of the {001} and {110}faces of urea.

A. {001} face growth.

For the study of {001} face growth we have performedtwo sets of simulations, named Auj and Awj (see Tab. Iof MS). In the first one the urea population is controlled,while in the second water is controlled. The results of theAuj set are reported in the MS, here we show the resultsof the Awj runs, in Fig. S6, compared to the ordinaryNPT dynamics. Also in this set of simulations the CµMDmethod succeeds in establishing a linear growth regime,even though the control of x is less rigid and allows largerfluctuations.

The dependence of the growth rates extracted fromboth the Auj and Awj simulations on the correspondingsolution mole fraction has been assessed with a linear fit,

Page 12: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

4

1 @nm-3D

0 10 20 30 40 50 60

nu0

nu0

nu0

nu0

nu0

t @nsD

nuCR@nm-3D

Y1 Hku=35L

Y2 Hku=21L

Y3 Hku=7L

Y4 Hku=3.5L

NPT2V

FIG. S4. Trajectories of the CR urea density for the Yj and NPT2V simulations. The instantaneous value is represented infaded color, while the full-color curves are obtained via Exponentially Weighted Moving Average, with characteristic smoothingtime of 0.5 ns. Each curve is referred to n0u = 1.5 nm−3 (dot-dashed axes). The dashed vertical line indicates t = 20 ns, whensolution depletion becomes significant in the NPT2V run.

CR

0.5 1.0 1.5 2.0 2.5 3.0

1.0

2.0

3.0

1.5

D @nmD

sn@nm-3D

Y1 Hku=35L

Y2 Hku=21L

Y3 Hku=7L

Y4 Hku=3.5L

NPT2V

FIG. S5. Logarithmic plot of the nCRu standard deviation, for

the Yj and NPT2V runs. Each value is measured by detectingnu within a 0.25 nm thick layer placed at a distance D fromthe solid-liquid interface. The dashed vertical lines indicatethe CR boundaries.

represented in Fig. 5 of the MS. The parameters resultingfrom the interpolation are the following:

q = −0.83± 0.75 ns−1,

m = 119.8± 9.6 ns−1,

where the linear model is y = mx+ q.

B. {110} face growth.

For the study of {110} face growth the Buj and Bwj

simulation sets have been performed, the relative param-eters are shown in Tab. I of MS. Each set is constituted by

5 repetitions of the same simulations, in order to collecta relevant statistics for the presented analysis. Moreover,the CµMD settings have been designed so that both Buj

and Bwj simulations reach analogous growth conditions.For this reason, in our analysis, we have considered theresults of the Buj and Bwj runs as equivalent. In themultiple plot of Fig. S7 we report the resulting dynamicsof each simulation.

In the MS we have reported the estimate of the {110}face growth rate, obtained from the trajectories displayedin Fig. S7. As explained in the text, under constant su-persaturation conditions we can assume that the prob-ability of growth events occurrence follows a Poissondistribution. Therefore the waiting time between twoconsecutive events is exponentially distributed, and thegrowth rate can be extracted from this distribution. Tothis purpose the time intervals between two consecutivegrowth events have been collected. We have consideredonly those events occurring within the validity time ofCµMD, during which the growth could be considered atconstant supersaturation. We have also discarded thewaiting time preceding the first event, since it is affectedby the initial transient time, during which the solution isbrought at the desired composition.

From the resulting statistics we have then constructedthe cumulative time distribution, and fitted it withthe cumulative distribution associated to an exponentialprobability density:

y(t) = 1− exp(−t/τ{110}). (S1)

From the fit we have extracted τ{110} = 18.3 ± 2.7 ns(as shown in Fig. 7 of the MS). The corresponding er-ror has been obtained with the bootstrap techniqueS2.

Page 13: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

5

Τt=6.3 ΤF=85.0

Aw1

0 20 40 60 80

0.04

0.08

0.12

0

100

200

300

t @nsD

xDN

c

Τt=3.0 ΤF=41.0

Aw2

0 20 40 60 80

0.04

0.08

0.12

0

100

200

300

t @nsD

xDN

c

Τt=1.9 ΤF=22.5

Aw3

0 20 40 60 80

0.04

0.08

0.12

0

100

200

300

t @nsD

xDN

c

NPT

0 20 40 60 80

0.04

0.08

0.12

0

100

200

300

t @nsD

xDN

c

FIG. S6. Awj simulations results compared to the ordinary NPT behavior. The green curves represent the increase of thecrystal-like molecule number ∆Nc as a function of time. The blue curves represent the solution mole fraction x measured inthe CR as a function of time. The instantaneous value of x is represented in faded color, while the full-color curves are obtainedvia Exponentially Weighted Moving Average, with characteristic smoothing time of 0.5 ns. The red marks indicate the validitytime-window of the CµMD method, namely τt < t < τF. The black dashed lines represent the linear fit of the ∆Nc behavior,calculated within the corresponding validity time range.

The growth rate has been estimated by calculating theaverage N c increase associated to the growth events(31.6±0.3), and dividing it by τ{110}, to obtain the resultreported in the MS.

BIBLIOGRAPHY

[S1]H. Flyvbjerg and H. G. Petersen, “Error estimates on averagesof correlated data,” The Journal of Chemical Physics, vol. 91,

no. 1, 1989.[S2]B. Efron, “Bootstrap methods: Another look at the jackknife,”

The Annals of Statistics, vol. 7, no. 1, pp. pp. 1–26, 1979.

Page 14: Molecular Dynamics Simulations of Solutions at Constant ... · Molecular Dynamics Simulations of Solutions at Constant Chemical Potential C. Perego,1,2, a) M. Salvalaglio,2,3 and

6

Bu1

0.05

0.10

0.15

0

100

200x

DN

c

Bw1

Bu2

0.05

0.10

0.15

0

100

200

xDN

c

Bw2

Bu3

0.05

0.10

0.15

0

100

200

xDN

c

Bw3

Bu4

0.05

0.10

0.15

0

100

200

xDN

c

Bw4

Bu5

0 20 40 60 80 100 120

0.05

0.10

0.15

0

100

200

t @nsD

xDN

c

Bw5

0 20 40 60 80 100 120

t @nsD

FIG. S7. Buj and Bwj simulations results. The green curves represent the increase of the crystal-like molecule number ∆Nc

as a function of time. The blue curves represent the solution mole fraction x measured in the CR as a function of time. Theinstantaneous value of x is represented in faded color, while the full-color curves are obtained via Exponentially WeightedMoving Average, with characteristic smoothing time of 0.5 ns. The horizontal dashed line shows the average of x, evaluatedover the validity time-window of the CµMD method, indicated by red marks.