From 646e18bd5e31ce7aef257d5d225aefdde368adb5 Mon Sep 17 00:00:00 2001
From: Henning Glawe <glaweh@debian.org>
Date: Sun, 3 Dec 2017 16:22:35 +0100
Subject: [PATCH] update vdw-df2 functional setting: x_qe_VDW_DF2 ->
 VDW_C_DF2-LDA_C_PW

---
 .../parser-quantum-espresso/QuantumEspressoXC.py   |  5 ++++-
 .../refactor_test/testuite-xc.ref.log              | 14 ++++----------
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/parser/parser-quantum-espresso/QuantumEspressoXC.py b/parser/parser-quantum-espresso/QuantumEspressoXC.py
index 9eb6ac0..e96dc22 100644
--- a/parser/parser-quantum-espresso/QuantumEspressoXC.py
+++ b/parser/parser-quantum-espresso/QuantumEspressoXC.py
@@ -1051,7 +1051,10 @@ VAN_DER_WAALS = [
     },
     {
         'xc_terms': [{
-            'XC_functional_name': "x_qe_VDW_DF2",
+            'XC_functional_name': "VDW_C_DF2",
+        }],
+        'xc_terms_subtract': [{
+            'XC_functional_name': "LDA_C_PW",
         }],
         'xc_section_method': {
             'x_qe_xc_inlc_name':       "vdw2",
diff --git a/test/xc_functionals/refactor_test/testuite-xc.ref.log b/test/xc_functionals/refactor_test/testuite-xc.ref.log
index 5660e49..77ad89b 100644
--- a/test/xc_functionals/refactor_test/testuite-xc.ref.log
+++ b/test/xc_functionals/refactor_test/testuite-xc.ref.log
@@ -132,7 +132,7 @@ qe_xc: 0.00 OPTBK88 ( 1  4 23  1 0 0)
 ]
 qe_xc: 0.00 VDW-DF2 ( 0 413 0 2)
 {
-  "XC_functional": "GGA_X_RPW86+LDA_C_PW-1.000*LDA_X+x_qe_VDW_DF2",
+  "XC_functional": "GGA_X_RPW86-1.000*LDA_X+VDW_C_DF2",
   "x_qe_xc_icorr": 4,
   "x_qe_xc_icorr_comment": "Perdew-Wang",
   "x_qe_xc_icorr_name": "pw",
@@ -147,15 +147,12 @@ qe_xc: 0.00 VDW-DF2 ( 0 413 0 2)
   {
     "XC_functional_name": "GGA_X_RPW86"
   },
-  {
-    "XC_functional_name": "LDA_C_PW"
-  },
   {
     "XC_functional_name": "LDA_X",
     "XC_functional_weight": -1.0
   },
   {
-    "XC_functional_name": "x_qe_VDW_DF2"
+    "XC_functional_name": "VDW_C_DF2"
   }
 ]
 qe_xc: 0.00 SLA  PW   TPSS TPSS ( 1  4  0  0 0 1)
@@ -574,7 +571,7 @@ qe_xc: 0.00 VDW-DF ( 1  4  4  0 1 0)
 ]
 qe_xc: 0.00 VDW-DF2 ( 1  4 13  0 2 0)
 {
-  "XC_functional": "GGA_X_RPW86+LDA_C_PW+x_qe_VDW_DF2",
+  "XC_functional": "GGA_X_RPW86+VDW_C_DF2",
   "x_qe_xc_icorr": 4,
   "x_qe_xc_icorr_comment": "Perdew-Wang",
   "x_qe_xc_icorr_name": "pw",
@@ -593,10 +590,7 @@ qe_xc: 0.00 VDW-DF2 ( 1  4 13  0 2 0)
     "XC_functional_name": "GGA_X_RPW86"
   },
   {
-    "XC_functional_name": "LDA_C_PW"
-  },
-  {
-    "XC_functional_name": "x_qe_VDW_DF2"
+    "XC_functional_name": "VDW_C_DF2"
   }
 ]
 qe_xc: 0.00 B86BPBE ( 1  4 22  4 0 0)
-- 
GitLab