Difference between revisions of "Tutorial:Polarizable Continuum Model (PCM)"

From OctopusWiki
Jump to navigation Jump to search
Line 67: Line 67:
[[Category:Polarizable Continuum Model]]
[[Category:Polarizable Continuum Model]]
[[Category:Ground State]]
[[Category:Total Energy]]

Revision as of 02:05, 26 November 2019

In this tutorial we will show how to set up ground state and time-dependent calculations for a molecule in solution, using the PCM/TD-PCM Octopus features. For this we will use two examples Hydrogen Fluoride and Methane, the Hydrogen Fluoride for the ground-state calculations and Methane for time-dependent and absorption spectrum calculations.

By now, PCM is only implemented for TheoryLevel = DFT, and it has been tested properly for CalculationMode = gs and td.

HF diatomic molecule in water: ground state

The important input keywords to activate a gs PCM run are PCMCalculation and PCMStaticEpsilon.

PCMCalculation just activates the PCM mode of calculation. PCMStaticEpsilon should be put to the value of the static dielectric constant of the solvent medium (in this particular example, we are trying to mimic water).

By adding the latter keywords to an input for a gs calculation of a molecule in vacuo, one sets the calculation for the molecule in solution. Now, we will check a PCM calculation in practice. To that aim, we use the following input:

CalculationMode = gs
UnitsOutput = eV_Angstrom

Radius = 3.5*angstrom
Spacing = 0.18*angstrom
PseudopotentialSet = hgh_lda

FH = 0.917*angstrom
 "H" |   0 | 0 | 0
 "F" |  FH | 0 | 0
PCMCalculation = yes
PCMStaticEpsilon = 78.39

The latter input example is intended to make you familiar with the running of Octopus for PCM calculations, it does not provide any benchmark for HF molecule. Actually, the geometry might not be optimal and the gs energy might not be converged with respect to the Radius and Spacing variables. N.B. A new convergence analysis w.r.t. Radius and Spacing (different from the one in vacuo) is in principle due when PCM is activated. N.B. Geometry optimization for solvated molecules within Octopus is still under development; it might work properly only when there are minor adjustments in the geometry when passing from vacuuum to the solvent. On the other hand, the selection of the PseudopotentialSet and the implicit choice of LDA xc functional is arbitrary.

When we perform the calculation of HF in water using the previous input, a new folder called pcm will be created inside the work directory where input file lies. This pcm folder contains the following files:

  • cavity_mol.xyz - useful way to visualize the molecule inside the cavity tessellation. The cavity is plot as a collection of fictitious Hydrogen atoms. Checking up this file is good to be sure that the molecule fits well inside the cavity and that the tessellation doesn't contain artifacts.

The cavity can be improved/refined in several direction if needed by the specific calculation. You can increase the number of points in the cavity by changing the default value of the variable PCMTessSubdivider from 1 to 4. In practice, the tessellation of each sphere centered at each atomic position (but Hydrogen's) from 60 to 240 points. You can also relax the constrain on the minimum distance PCMTessMinDistance (=0.1 A by default) between tesserae so as to obtain a more smooth cavity. You can construct the molecular cavity by putting spheres also in Hydrogen, i.e., by setting PCMSpheresOnH = yes. You can change the radius of the spheres used to build up the cavity by manipulating PCMRadiusScaling. Moreover, there is as well the possibility to read the cavity from file (instead of being generated inside Octopus, default) using PCMCavity keyword, whose value should be the complete path to the cavity file. But keep in mind that usually the default values for these quantities are well supported by extensive numerical checks and published results in the literature.

  • pcm_info.out - a summary of gs pcm calculation containing information on the tessellation and a table of PCM energetic contributions and total polarization charges due electrons and nuclei for all iterations of the SCF cycle. The PCM energetic contributions are splitted in the interaction energy of: 1) electrons and polarization charges due to electrons E_ee, 2) electrons and polarization charges due to nuclei E_en, 3) nuclei and polarization charges due to nuclei E_nn, and finally, 4) nuclei and polarization charges due to electrons.

In this regard, one important check is to ascertain wether Gauss theorem obtains or not for the total polarization charges, i.e., if is valid or not, where is the nominal charge of the molecule. If the latter fails, by setting PCMRenormCharges = yes and manipulating PCMQtotTol Gauss theorem is recover at each SCF iteration (or time-step).

  • pcm_matrix.out - the PCM response matrix. It is printed for advanced debug and specially to check against GAMESS PCM matrix in the same conditions (same solvent dielectric constant, same geometry of the cavity).
  • ASC_e.dat - polarization charges due electrons.
  • ASC_n.dat - polarization charges due nuclei.
  • ASC_sol.dat - polarization charges due to the full molecule.

The format of the polarization charge file is:

cavity position x | cavity position y | cavity position z | polarization charge | label

where | indicates column separation (actually, replace by spaces in the ASC_*.dat files).

Now, we look at the convergence of the total energy in solution in Figure 1. What it is most important to notice in the case of Figure 1 is the fact that there is a stabilization of the system in solvent with respect to the in vacuo case. A clear sign of this is the finite value and sign of the energy difference between the both cases obtained upon convergence (see inset plotted in logscale and different interval).

CH4 case: time-dependent and absorption spectrum

Now we move to a PCM td calculation. As in the case of gas-phase calculations, you should perform always the gs calculation before the td one.

There are several ways to set up a PCM td calculation in Octopus, corresponding to different kinds of approximation for the coupled evolution of the solute-solvent system. The first and most elementary approximation would be to consider an evolution where the solvent is able to equilibrate with the solute density fluctuations in real time. Formally within PCM, this means that the dielectric function is constant and equal to its static (zero-frequency) value for all frequencies. In practice, this approximation requires minimal changes to the gs input file: just replacing gs by td in the CalculationMode.

The first nonequilibrium approximation is to consider that there are fast and slow degrees of freedom of the solvent, of which only the former are able to equilibrate in real time with the solute. The slow degrees of freedom of the solvent that are frozen in time, in equilibrium with the initial (gs) state of the propagation. Formally, it means to consider two dielectric functions for the zero-frequency and high-frequency regime (namely, static and dynamic dielectric constants). In practice, this approximation is finally activated by setting extra input keywords, i.e., PCMTDLevel = neq and PCMDynamicEpsilon, the latter to the dynamic dielectric constant value.

Finally, in the last --and most accurate-- nonequilibrium approximation there is an equation of motion for the evolution of the solvent polarization charges, rendering it history-dependent. Formally, this requires to use a specific model for the frequency-dependence for the dielectric function.

Back to Tutorials