Skip to content

Instantly share code, notes, and snippets.

View ifilot's full-sized avatar

Ivo Filot ifilot

View GitHub Profile
@ifilot
ifilot / vasp6.4.2_xclib_grad.F.patch
Last active March 7, 2024 15:44
VASP 6.4.2 - quickfix for negative values caused by vacuum region
--- 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