Last active
March 7, 2024 15:44
-
-
Save ifilot/c83740bc21aa7231e4e7d442e16e879c to your computer and use it in GitHub Desktop.
VASP 6.4.2 - quickfix for negative values caused by vacuum region
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- xclib_grad.F | |
+++ xclib_grad.F | |
@@ -335,6 +335,15 @@ | |
#ifdef USELIBXC | |
ELSE IF (LEXCH==99) THEN | |
+! fix negative values caused by vacuum region | |
+! see: https://www.vasp.at/forum/viewtopic.php?p=25830#p25830 | |
+ IF (D<=0) THEN | |
+ EXC = 0._q | |
+ EXCD = 0._q | |
+ EXCDD = 0._q | |
+ RETURN | |
+ ENDIF | |
+ | |
DTMP(1)=D | |
SIGMATMP(1)=DD*DD | |
SIGMAZERO(1)=0._q |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment