ONETEP Solvent and Electrolyte Model
Total Page:16
File Type:pdf, Size:1020Kb
ONETEP solvent and electrolyte model Jacek Dziedzic, James C. Womack & Arihant Bhandari October 2020 This manual pertains to ONETEP versions v6.0.0 and later. For older versions, see separate documentation on the ONETEP website. Contents 1 Overview of capabilities 3 2 The model 3 2.1 Solute cavity . 4 2.1.1 Fixed cavity . 4 2.1.2 Self-consistently updated cavity . 4 2.2 Apolar terms: cavitation energy . 5 2.3 Apolar terms: dispersion-repulsion energy . 5 3 Practicalities 6 3.1 DL_MG solver . 6 3.2 Grid sizes . 7 3.2.1 Under OBC . 7 3.2.2 Under PBC . 7 3.3 Auto solvation . 8 3.4 Manual solvation and restarts . 10 3.5 Solvation in PBC . 11 3.5.1 Key points on using the BC keywords . 12 3.6 Smeared ions . 13 3.7 Forces . 14 3.8 Exclusion regions . 14 3.9 Solvent Polarization . 15 1 4 Keywords used in solvation calculations 15 4.1 Basic . 15 4.2 Advanced . 16 4.3 Fine control over DL_MG . 18 4.4 Expert . 19 5 Boltzmann solvation (solute with electrolyte) 21 5.1 Keywords controlling Boltzmann solvation . 22 6 Various hints for a successful start 26 7 Troubleshooting: Problems, causes and solutions 26 8 Frequently asked questions 29 8.1 What are the values for the model parameters? . 29 8.2 Can you do solvents other than water? . 29 8.3 Can you do mixed boundary conditions? . 29 8.4 Is implicit solvation compatible with conduction calculations? . 29 8.5 Is implicit solvation compatible with PAW? . 29 9 Known issues and untested functionality 29 10 Contact 30 2 1 Overview of capabilities ONETEP implements the Minimal Parameter Solvent Model (MPSM), first presented in Ref. 1. A more detailed description, including guidelines on the choice of parameters, is given in Ref. 2. MPSM offers a very accurate treatment of the polar (electrostatic) solvation contribution, and a rather simple, yet still accurate, treatment of the apolar terms: cavitation, dispersion and repulsion. MPSM is based on the Fattebert and Gygi model (later extended by Scherlis et al.) [3]. Implicit solvation calculations in ONETEP can be performed in open boundary conditions (OBC) and in periodic boundary conditions (PBC) alike, with OBC assumed by default. The solute can be immersed in pure solvent (necessitating the solution of the Poisson equation (PE)) or in solvent with electrolyte (leading to the Poisson-Boltzmann equation (PBE)). Solvation energies can be calculated by running a calculation in vacuum first, followed by a calculation in solvent. This can be done either automatically (“auto solvation”) or manually. Apart from energy terms due to solvation, ONETEP calculates solvation contributions to forces. It is thus possible to perform in-solvent geometry optimisation and molecular dynamics (with difficulty). Additional solvent exclusion regions can be specified to keep the solvent from predefined regions of the simulation cell. 2 The model ONETEP includes solvation effects by defining a smooth dielectric cavity around the solute (“solute cavity”). In contrast to PCM-based approaches, the transition from a dielectric permittivity of 1 (in the immediate vicinity of the solute) to the bulk value of the solvent is smooth, rather than discontinuous. Thus, there is no “cavity surface”, strictly speaking, but rather a thin region of space where the transition takes place. The cavity and the transition are defined by a simple function relating the dielectric permittivity at a point, (~r), to the electronic density there, n(~r), yielding an isodensity model. ONETEP offers two modes of operation – one, where n(~r) is the current electronic density (“the self-consistently updated cavity mode”), and another one, where n(~r) is fixed, usually to the converged in-vacuum density (“the fixed cavity mode”). The dielectric function (·), defined in Ref. 3, Eq. 7, and in Ref. 1, Eq. 1 depends on three parameters: 1, the bulk permittivity of the solvent; ρ0, the electronic density threshold, where the transition takes place; and β, which controls the steepness of the change in . The Poisson equation is then solved to obtain the potential due to the molecular density in the nonhomogeneous dielectric. A more general case, where electrolyte ions can be added to the solvent (specified via concentrations), requires solving the Poisson-Boltzmann equation. 3 2.1 Solute cavity In the MPSM model the dielectric cavity is determined wholly by the electronic density, freeing the model of any per-species parameters (such as van der Waals radii). Thus, the cavity will change shape every time the electronic density changes. From the physical point of view this is good, since it means the density can respond self-consistently to the polarisation of the dielectric and vice versa. From the computational point of view this is rather inconvenient, because it requires extra terms in the energy gradients (see e.g. Ref. 3, Eqs. 5 and 14). Because these terms tend to vary rapidly over very localised regions of space, their accurate calculation usually requires unreasonably fine grids and becomes prohibitively difficult for larger molecules. 2.1.1 Fixed cavity One workaround for the above problem, which is straightforward, but introduces an approximation, consists in fixing the cavity and not allowing it to change shape. This is realised by performing an in-vacuum calculation first, then restarting the solvated calculation from the converged in-vacuum density, and using this density to generate the cavity that then remains fixed for the duration of the solvated calculation. Both calculations are self-consistent (in the DFT sense), only the cavity is not self-consistently updated in the in-solvent calculation. How good is this approximation? From experience, it yields solvation energies within several per- cent of the accurate, self-consistent calculation, cf. Ref. 1. More specifically, the error in solvation energy is expected to be less than 3-4% percent for charged species and less than 1% for neutral species. If you can spare the computational resources, it would be good to test it on a representative molecule, by comparing the solvation energy against a calculation with a self-consistently updated cavity. As the cavity remains fixed, the difficult extra terms no longer need to be calculated, and the memory and CPU requirements are significantly reduced (because the grid does not need to be made finer). It is thus the recommended solution. The fixed cavity mode is activated by is_dielectric_model FIX_INITIAL, which is the default setting. 2.1.2 Self-consistently updated cavity If one insists on performing calculations with the solute cavity self-consistently responding to changes in density (as in Ref. 3), this can be achieved by is_dielectric_model SELF_CONSISTENT. As mentioned earlier, this is costly, because it almost always requires grids that are finer than the default. The relevant grid (“fine grid”) can be made finer by fine_grid_scale n , with n > 2 (which is the default). Typically one would use 3, you might be able to get away with 2.5, you might need 3.5 or even more. The memory and CPU cost increase with the cube of this value, 4 so, for instance, when using fine_grid_scale 3.5 one would expect the computational cost to 3 increase by a factor of (3:5=2) ≈ 5:36. Even when using much finer grids, the additional gradient term due to the self-consistently updated cavity poses numerical difficulties. This is especially true if the changes in the density are rapid. For this reason, even if it is technically possible to run a calculation in solvent without a preceding calculation in vacuum, it is not recommended to do so – the initial, dramatic changes in the density will likely prove problematic. It will be much easier to run an in-vacuum calculation to convergence, and to restart a calculation in solvent from there. The auto solvation functionality (see section 3.3) makes this easy. 2.2 Apolar terms: cavitation energy MPSM includes the apolar cavitation term in the solvent-accessible surface-area (SASA) approxi- mation, thus assuming the cavitation energy to be proportional to the surface area of the cavity, the constant of proportionality being the (actual physical) surface tension of the solvent, γ, and the constant term being zero. The cavitation energy term is calculated and added automatically, unless is_include_apolar F is explicitly stated. Surface tension of the solvent has to be spec- ified (otherwise the default for water near room temperature (about 0.074 N/m) will be used). This can be done using is_solvent_surf_tension. Keep in mind that the apolar term is scaled by default to account for dispersion and repulsion (see section 2.3). The scaling is controlled by is_apolar_scaling_factor, and the default is not unity. 2.3 Apolar terms: dispersion-repulsion energy ONETEP’s model allows for the solute-solvent dispersion-repulsion apolar energy term to be mod- eled approximately. This greatly improves the quality of obtained solvation energies for uncharged molecules, particularly so if they are large. This term is reasonably approximated with the same SASA approach that is used for cavitation, albeit with a smaller, and negative, prefactor. In prac- tice this is most easily achieved by simply scaling the cavitation term down by a constant multiplica- tive factor. A good scaling factor is 0.281705, which is what our model uses by default (see Ref. 1 for justification). The keyword controlling this parameter is is_apolar_scaling_factor (with the above default), and its argument is a unitless value. 5 In summary: • polar, cavitation, dispersion and repulstion terms: is_include_apolar T (default) is_apolar_scaling_factor 0.281705 (default) • polar and cavitation terms only: is_include_apolar T (default) is_apolar_scaling_factor 1.0 • polar term only: is_include_apolar F 3 Practicalities 3.1 DL_MG solver ONETEP uses a multigrid solver to solve the Poisson or Poisson-Boltzmann equation.