User-defined Electrostatic Potentials in DFT Supercell Calculations: Implementation and Application to Electrified Interfaces

User-defined Electrostatic Potentials in DFT Supercell Calculations: Implementation and Application to Electrified Interfaces
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

Introducing electric fields into density functional theory (DFT) calculations is essential for understanding electrochemical processes, interfacial phenomena, and the behavior of materials under applied bias. However, applying user-defined electrostatic potentials in DFT is nontrivial and often requires direct modification to the specific DFT code. In this work, we present an implementation for supercell DFT calculations under arbitrary electric fields and discuss the required corrections to the energies and forces. The implementation is realized through the recently released VASP-Python interface, enabling the application of user-defined fields directly within the standard VASP software and providing great flexibility and control. We demonstrate the application of this approach with diverse case studies, including molecular adsorption on electrified surfaces, field ion microscopy, electrochemical solid-water interfaces, and implicit solvent models.


💡 Research Summary

**
This paper presents a practical and versatile methodology for introducing arbitrary electrostatic potentials into supercell density‑functional theory (DFT) calculations, with a focus on the Vienna Ab‑Initio Simulation Package (VASP) version 6.5.0. The authors exploit the newly released VASP‑Python interface, which grants direct read‑and‑write access to the local electrostatic potential, charge density, nuclear charges, forces, and total energies during a calculation. By adding an external potential V_ext to the internal VASP potential at each electronic self‑consistency step, the electronic density n′(r, V_ext) relaxes self‑consistently under the bias. However, VASP does not automatically include the interaction of V_ext with the point‑like nuclear cores. To obtain physically correct total energies and forces, the authors derive explicit correction terms: an energy correction ΔE_i = −Z_i V_ext(R_i) for each nucleus i, and a corresponding force correction ΔF_i = −Z_i E_ext(R_i). These expressions are analogous to the well‑known dipole‑correction formalism but are generalized for any user‑defined external field.

The implementation is organized through three Python callback functions defined in a user‑provided file vasp_plugin.py:

  1. local_potential – adds the external three‑dimensional potential array ΔV_ext to VASP’s total potential and applies the energy correction ΔE_i.
  2. force_and_stress – adds the force correction ΔF_i to the forces returned by VASP.
  3. occupancies – modifies the number of electrons NELECT at each ionic step, enabling dynamic control of the total charge (e.g., to simulate a charging electrode).

The required VASP INCAR flags (PLUGINS/LOCAL_POTENTIAL, PLUGINS/FORCE_AND_STRESS, PLUGINS/OCCUPANCIES) activate the callbacks. The authors demonstrate the correctness of the scheme by testing a neutral hydrogen atom in vacuum: without corrections the total energy varies linearly with V_ext (∝ 1 e·V_ext) and the force varies linearly with the applied field (∝ 1 e·E_ext). After applying the derived corrections, both quantities become invariant, confirming that the missing nucleus‑field interaction has been properly accounted for.

Beyond the basic correction, the paper addresses the challenge of modeling electrified surfaces. Traditional approaches employ a “computational counter electrode” (CCE) consisting of a neon atom whose nuclear charge is tuned to compensate the net charge on the working electrode. This method is limited by the band gap of neon; excessive fields drive the Fermi level into the neon conduction or valence band, causing dielectric breakdown. To overcome this limitation, the authors introduce a “charge‑density counter electrode” (CDCE). Instead of explicit atoms, a Gaussian sheet of charge ρ_ext with total charge −n_elec is placed in the vacuum region. Solving Poisson’s equation via fast Fourier transform yields the corresponding V_ext, which is then added through the plugin. The total number of electrons is set to n_total = Σ Z_i + n_elec, ensuring overall charge neutrality while allowing arbitrarily strong fields limited only by the electrolyte’s band gap or vacuum level alignment.

The paper also integrates a thermopotentiostat scheme, originally developed by Deißenbeck, to mimic a constant‑potential experimental setup. The electrode charge n_elec(t) is updated each ionic timestep according to
n_elec(t+Δt) = n_elec(t) − C₀


Comments & Academic Discussion

Loading comments...

Leave a Comment