Tutorial

Applications of Constrained Density Functional Theory (CDFT) by cp2k


We here explain how to apply constrained density functional theory (CDFT) to charge-transfer reactions using cp2k program package. We here focus on the proton transfer (PT) and electron/hole (polaron) formation. The tutorial on the cp2k website (https://www.cp2k.org/howto:cdft) offers the basic theory and information.

Proton Transfer (PT)

PT plays an important role in various fields and molecular simulation is very useful to unveil the molecular-level mechanism. However, choosing the appropriate reaction coordinate of PT in protic solvents such as liquid water is sometimes difficult. This can be illustrated by deprotonation of silicic acid in liquid water. (Left figure [1])

In protic solvents the transferring H atom moves between water molecules and defining one H atom is impossible. Thus, an OH distance is a poor reaction coordinate. On the other hand, in aprotic solvents, an OH distance should be a good reaction coordinate because the transferring proton stays between the reactant and product. Proton transfer in HF acid in water[2,3] is an exceptional example in that the product state is the contact-ion pair and the HF distance is a good reaction coordinate.

A good candidate which has been employed for a long time is the vertical energy gap coordinate between the reactant and product states. This has been first employed for electron transfer, and later extended to proton transfer.[4-6] To this end, CDFT implemented in cp2k provides a straightforward computation of energetics and dynamics. We here explain how to perform such calculation efficiently.

Gas-Phase Benchmark Calculation

Before moving on to full-scale computations in condensed phases, it is advisable to check the computational details using a small cluster because you have to choose the target value in CDFT. In the case of charge/magnetization constraint, the target is constrained number of valence electrons/spin density on a specified atom. We here employ the charge constraint in the following.

The following is the xyz coordinate file of a silicic-water cluster.

12 i = 1, E = -87.7096380122 Si 11.3350446580 -7.3494661614 5.5985692790 O 10.8369737803 -8.3350464043 4.4243211467 O 10.0064574533 -6.7480945785 6.4103314147 O 12.1606510920 -6.0068204392 5.0081922286 O 12.4118880666 -8.0769514416 6.6559476273 H 10.2297485267 -5.9447585571 6.9244343009 H 12.3119463109 -9.0486409256 6.7243659545 H 13.1304531711 -6.1378203677 5.0629961719 H 10.2905113454 -8.0482073425 3.1947553360 O 10.0847642572 -7.7483639601 2.0850182708 H 10.3968417597 -6.8117740935 2.0479899885 H 10.7473182348 -8.2702541066 1.5726174305

Starting from such a structure, we optimize the geometry for each mixing parameter LAMBDA to obtain the potential energy surface.

&FORCE_EVAL METHOD MIXED &MIXED MIXING_TYPE MIXED_CDFT &MIXED_CDFT LAMBDA 0.0 ... &END MIXED_CDFT &END MIXED ...&END FORCE_EVAL

In the case of aqueous silicic acid, the target values of 5.9 (reactant) and 6.6 (product) by the following input

&CDFT TYPE_OF_CONSTRAINT BECKE ATOMIC_CHARGES TRUE STRENGTH 0.0 TARGET 5.9 or 6.6 &ATOM_GROUP ATOMS 2 COEFF 1 CONSTRAINT_TYPE &END ATOM_GROUP ... &END CDFT

efficiently sample the proton transfer as shown in Figure 2 of ref [1].

Liquid-Phase Calculation

After determining the computational setup in the gas phase, we can move on to the liquid-phase calculation. The input file for MD simulation can be made by changing the "runtype" from "geo_opt" to "md" and adding the computational conditions of MD simulation. CDFT MD simulation produces the trajectory of diabatic energies in {Project name}-mix-1.ener. Putting the results into the free-energy perturbation formula such as in ref [1], the free-energy profile can be computed.

Charge Localization for Hole/Electron Polaron Formation

In photocatalysis, an irradiated light excites electrons in the valence band to the conduction band, leaving holes in the valence band. The CDFT method can also localize the photoexcited holes and/or electrons (polaron). The example is the hole formation of anatase TiO2 in ref [7].

The CDFT method provides a workaround for charge delocalization due to the effects of self-interaction errors in exchange-correlation functionals with the generalized gradient approximation (GGA). Thus, computationally-demanding hybrid functionals may not be necessary and the GGA functionals which are computationally less demanding will suffice.

Another advantage is straightforwardness. The CDFT method can specify atoms on which the charges and/or magnetizations are constrained. Therefore, any specification of arbitrary geometric coordinates such as bond lengths[8] and atomic replacement (https://wiki.wpi.edu/deskinsgroup/Localizing_Charge_-_VASP) are unnecessary.

In practice, the computational procedure for geometry optimization is as follows:

  1. DFT calculation for the positively (+1)/negatively (-1) charged system.
    This step relaxes the surface structure and the positive charge is delocalized over the entire slab.

  2. CDFT calculation for charge localization.
    CDFT optimization restarting from the structure and wavefunction optimized in the first step.

  3. DFT calculation without constraint
    Confirm the charge is localized even without constraints.

Here we demonstrate the trapping of a photogenerated hole on hydroxyl groups in the hydroxylated anatase TiO2(112) surface which was found to have high photocatalytic activity.[7] Panel (a) of the upper figure shows the slab model of hydroxylated anatase TiO2(112) surface. The following is the xyz file of hydroxylated anatase TiO2(112). One dissociated water molecule was added to the surface of anatase TiO2(112).

33 i = 1, E = -921.5166842616 Ti 1.2313469602 1.3581933293 10.4315713091 Ti 0.1423821842 3.9887728857 10.2719469019 Ti 2.7857124344 2.7924617945 8.0283170378 Ti 3.9552057516 0.0195947088 8.0659961181 Ti -0.0683366573 1.3289768969 5.5935300308 Ti 1.2747587505 4.2501351965 5.6119783389 Ti 2.7002406015 0.0405691942 3.2702627775 Ti 3.9888452318 2.8605350921 3.2619696746 Ti 1.2373125369 1.6580323938 0.9524964222 Ti 5.4771933440 4.4316728643 0.9553074030 O -0.0111724433 2.5198810335 11.3700100524 O 1.1323735304 5.2824553148 11.3777920751 O 5.3542859009 0.3644216390 9.4145977133 O 1.2570084161 3.1852857514 9.1845683514 O 2.5821943955 1.0595867946 8.9459178831 O 3.9467841261 3.9143959151 9.0945570965 O 4.0269697131 1.7653679089 7.0573057482 O 2.6605291910 4.4957975213 7.0567748449 O 1.2742940831 2.4516831172 6.6374796281 O 5.3390470557 5.2355154340 6.6542461797 O 1.3484348614 0.4512229804 4.6846198044 O 5.3297954702 3.1393875543 4.7383006841 O 3.9565890951 1.1440250998 4.2400373833 O 2.6592703919 3.8989130913 4.2689348631 O 2.7564154962 1.7805367217 2.2149929595 O 3.9714390799 4.5779075303 2.2346850978 O 5.3781021268 2.6845159202 1.9725273477 O 1.3334145178 5.4660757431 1.9637438837 O 5.3983962460 0.5586022410 0.0399602475 O 1.3199406279 3.3470442606 0.0435468825* O 2.7135628676 2.1736718657 11.3705952948 H 3.6997224121 2.2420554868 11.4440547207 H 1.2414252166 5.2230015021 12.3829294180

The following is the excerpted CDFT section of the cp2k input file.

&CDFT TYPE_OF_CONSTRAINT BECKE ATOMIC_CHARGES TRUE STRENGTH 0.0 TARGET 5.4 &ATOM_GROUP ATOMS 31 COEFF 1 CONSTRAINT_TYPE CHARGE &END ATOM_GROUP &DUMMY_ATOMS ATOMS 11 12 19 &END DUMMY_ATOMS ... &END CDFT

In the CDFT section, the keyword TYPE_OF_CONSTRAINT specifies the type of constraint to be used. In the example above, the Becke constraint is selected. The keyword TARGET defines the constraint target value. The constraint target value is the number of valence electrons on the constraint atom. For example, the number of valence electrons on an oxygen ion is 6, but in the above example, it is set to 5.4 so that the O atom is positively charged and a hole is localized. The keyword ATOMS in the ATOM_GROUP section specifies a constraint atom. In the example above, the 31th atom (the oxygen atom of the hydroxyl group, the line with a * in the xyz file) is the constraint atom. If you have atoms that you want to calculate their charges without applying any constraints, specify them in the keyword ATOMS in the DUMMY_ATOMS section. The keyword CONSTRAINT_TYPE specifies the type of constraint to be applied. In the example above, the total charge density is constrained (CHARGE).

Spin Density and Density of States

If you want to output the spin density of each atom, add the following sections to the input file. In the following example, Hirshfeld and Löwdin spin population analysis are specified.

&FORCE_EVAL ... &DFT ... &PRINT &LOWDIN &END LOWDIN &HIRSHFELD &END HIRSHFELD &END PRINT ... &END DFT ... &END FORCE_EVAL

If you want to visualize the spin density, you can generate a cube file by adding the following section to the input file.

&FORCE_EVAL ... &DFT ... &PRINT &E_DENSITY_CUBE FILENAME eDensity STRIDE 1 1 1 &END E_DENSITY_CUBE &END PRINT ... &END DFT ... &END FORCE_EVAL

By reading the cube file with a visualization program such as VESTA, the spin density can be visualized. Panel (b) shows a visualization of the spin density (hole) of OH groups on the anatase TiO2 surface.

If you want to calculate the projected density of states (PDOS), you can generate a pdos file by adding the following section to the input file.

&FORCE_EVAL ... &DFT ... &PRINT &PDOS NLUMO -1 COMPONENTS &END PDOS &END PRINT ... &END DFT ... &END FORCE_EVAL

The pdos file is output for each atom and has a name like md-k1-1.pdos. The pdos file outputs the results for each atomic orbital. For the convoluted DOS, it is better to use the Python script for convolution provided on the website. [https://wiki.wpi.edu/deskinsgroup/Density_of_States_-_CP2K] Download the two files pdos.py and get-smearing-pdos.py and, on the folder with the .py files, execute the Python script as follows

python get-smearing-pdos.py md-k1-1.pdos

Panel (c) shows the PDOS of holes trapped at the surface OH of the hydroxylated (112) surface. The defect levels are generated in the band gap and a hole is trapped within the deep levels.

References

[1] "Constrained Density Functional Theory Molecular Dynamics Simulation of Deprotonation in Aqueous Silicic Acid", Tatsuya Joutsuka and Koji Ando, J. Phys. Chem. B, 124, 38, 8323–8330 (2020).

[2] Hydration Structure in Dilute Hydrofluoric Acid”, Tatsuya Joutsuka and Koji Ando, J. Phys. Chem. A, 115 (5), 671–677 (2011).

[3] Dynamics of Proton Transfer and Vibrational Relaxation in Dilute Hydrofluoric Acid”, Tatsuya Joutsuka and Koji Ando, J. Phys. Chem. A, 115 (5), 678–684 (2011).

[4] "Molecular Mechanism of HCl Acid Ionization in Water: ab initio Potential Energy Surfaces and Monte Carlo Simulations", Koji Ando and James T. Hynes, J. Phys. Chem. B, 101, 49, 10464–10478 (1997).

[5] Molecular Mechanism of HF Acid Ionization in Water: An Electronic Structure-Monte Carlo Study”, Koji Ando and James T. Hynes, J. Phys. Chem. A, 103 (49), 10398–10408 (1999).

[6] "Using the Constrained DFT Approach in Generating Diabatic Surfaces and Off Diagonal Empirical Valence Bond Terms for Modeling Reactions in Condensed Phases", Gongyi Hong, Edina Rosta, and Arieh Warshel, J. Phys. Chem. B, 110 (39), 19570–19574, (2006).

[7] "Facet Dependence of Photocatalytic Activity in Anatase TiO2: Combined Experimental and DFT Study", Tatsuya Joutsuka, Hiroto Yoshinari, and Satoshi Yamauchi, Bull. Chem. Soc. Jpn., in press.

[8] "Does Polaronic Self-Trapping Occur at Anatase TiO2 Surfaces?", John J. Carey and Keith P. McKenna. J. Phys. Chem. C, 122 (48), 27540–27553, (2018).