yuanyue-liu-group / CP-VASP

17 stars 8 forks source link

CP-VASP image

CP-VASP

Thank you for taking interest in CP-VASP! CP-VASP is a patch to the Vienna Ab-Initio Simulation Package (VASP) to enable DFT calculations under constant electrode potential. This is essential for accurately simulating the electrochemical interface, where the Fermi level is controlled by external electrode potential. CP-VASP enables fixed-structure calculation, structural relaxation, and molecular dynamics (MD) simulations under a given electrode potential.

As shown in the lefthand figure above, the supercell for CP-VASP is made of an explicit region with atoms of interest and an implicit region that models the solution as a dielectric continuum containing point charges (where the dielectric continuum represents the solvent, and the point charges represent the electrolyte ions). The supercell is connected to an “electrode” with potential Uext. CP-VASP tunes the number of electrons in the explicit region to change the average Fermi level to a target value set by Uext. These net electronic charges are balanced by the ionic charges in the implicit region to keep the system charge neutral.

CP-VASP has various algorithms to tune the electron number. Particularly, for MD simulations, it can emulate the “true” grand-canonical ensemble of electrons to produce the correct Fermi level fluctuation (see the righthand figure above). Moreover, it implements “flash solvation” technique which avoids the “flying solvent” problem at the explicit-implicit interface (see section 6 in the manual). This technique also significantly accelerates the MD simulation.

The first version of CP-VASP was developed by Xunhua Zhao and Yuanyue Liu in 2020. The latest version was developed by Zachary Levell*, Ruoyu Wang*, Saerom Yu*, Xunhua Zhao, and Yuanyue Liu. (* These authors contributed equally)

We have recently developed version 2 of CP-VASP. This README contains instructions for installing and using version 2. If you would like to use a previous version, navigate to the desired version and consult the manual in the corresponding folder.

Key features:

  1. Flash solvation method to avoid flying water problem in MD
  2. “True” grand canonical ensemble for electron dynamics
  3. Support both vaspsol and vaspsol++

Prerequisites

CP-VASP version 2 is currently compatible with VASP version 6.3.2 and 6.4.2. Please see the VASP manual for download instructions: https://www.vasp.at/wiki/index.php/Installing_VASP.6.X.X

CP-VASP also requires installing either VASPsol++ or VASPsol (VASPsol++ is currently only compatible with VASP 6.3.2). The instructions for installing VASPsol++ and VASPsol can be found at the following links:
VASPsol++: https://github.com/VASPsol/VASPsol
VASPsol: https://github.com/henniggroup/VASPsol/tree/master

We note that the developers of VASPsol have released an updated patch file for VASP6 that can be found here:
https://github.com/henniggroup/VASPsol/issues/43.

Installation

Due to the VASP copyright, we cannot share the patch directly on Github. However, you can fill out the request form at the link below, and we will subsequently give you access to the patch files.
https://docs.google.com/forms/d/e/1FAIpQLSdjinABLY26jora50jedL5X6bj5Pc7BTeys5pmclstlWs46Lw/viewform

If you are using VASPsol++, use the cp-vaspol++.patch file. If you are instead using VASPsol, use the cp-vaspsol.patch file. To apply the patch, navigate to the /src directory in your VASP folder and copy the appropriate patch file into it. Then execute the following command (assuming you are using VASPsol++): patch -p0 < cp-vaspsol++.patch

Instructions

See "CP-VASP Manual.pdf" under the folder for your desired version of CP-VASP for detailed instructions on using CP-VASP. We have also provided a few examples in "CP-VASP Examples.pdf".

Troubleshooting & Discussion

If you encounter issues using CP-VASP or have questions/comments, please check the issues tab on this GitHub repository. If you don't see your issue or question, please make a post and we will assist you.

How to Cite

Please cite the following publications when using CP-VASP in your research: