1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391
|
Index: psi4/CMakeLists.txt
===================================================================
--- psi4.orig/CMakeLists.txt
+++ psi4/CMakeLists.txt
@@ -189,7 +189,6 @@ ExternalProject_Add(psi4-core
pcmsolver_external
pybind11_external
simint_external
- libxc_external
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/psi4
CMAKE_ARGS -DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
Index: psi4/external/upstream/CMakeLists.txt
===================================================================
--- psi4.orig/external/upstream/CMakeLists.txt
+++ psi4/external/upstream/CMakeLists.txt
@@ -9,7 +9,6 @@ foreach(dir pybind11
libint
pcmsolver
simint
- libxc
)
add_subdirectory(${dir})
endforeach()
Index: psi4/psi4/CMakeLists.txt
===================================================================
--- psi4.orig/psi4/CMakeLists.txt
+++ psi4/psi4/CMakeLists.txt
@@ -138,10 +138,10 @@ else()
message(STATUS "Disabled simint")
endif()
-find_package(Libxc 4.0.2 CONFIG REQUIRED)
-get_property(_loc TARGET Libxc::xc PROPERTY LOCATION)
-list(APPEND _addons ${_loc})
-message(STATUS "${Cyan}Using Libxc${ColourReset}: ${_loc} (version ${Libxc_VERSION})")
+add_library(Libxc_external INTERFACE) # dummy
+add_library(Libxc::xc INTERFACE IMPORTED)
+set_property(TARGET Libxc::xc PROPERTY INTERFACE_LINK_LIBRARIES "-lxc")
+set(Libxc_FOUND 1)
if(APPLE)
set(PRE_LIBRARY_OPTION -Wl,-all_load)
Index: psi4/psi4/driver/procrouting/dft_funcs/dict_dh_funcs.py
===================================================================
--- psi4.orig/psi4/driver/procrouting/dft_funcs/dict_dh_funcs.py
+++ psi4/psi4/driver/procrouting/dft_funcs/dict_dh_funcs.py
@@ -588,56 +588,6 @@ def get_pwpb95_tweaks():
funcs.append({
- "name": "PWPB95",
- "x_functionals": {
- "GGA_X_PW91": {
- "tweak": get_pwpb95_tweaks(),
- "alpha": 0.50
- }
- },
- "x_hf": {
- "alpha": 0.50
- },
- "c_functionals": {
- "MGGA_C_BC95": {
- "tweak": [0.03241, 0.00250],
- "alpha": 0.731
- }
- },
- "c_mp2": {
- "ss": 0.0,
- "os": 0.269
- },
- "citation": ' L. Goerigk, S.Grimme, J.Chem. Theory Compt. 7, 291-309, 2011 \n',
- "description": ' PWPB95 SOS Double Hybrid XC Functional\n',
-})
-
-funcs.append({
- "name": "PTPSS",
- "x_functionals": {
- "MGGA_X_TPSS": {
- "tweak": [0.15, 0.88491, 0.047, 0.872, 0.16952],
- "alpha": 0.50
- }
- },
- "x_hf": {
- "alpha": 0.50
- },
- "c_functionals": {
- "MGGA_C_TPSS": {
- "tweak": [0.06080, 6.3, 0.53, 0.87, 0.50, 2.26],
- "alpha": 0.625
- }
- },
- "c_mp2": {
- "ss": 0.0,
- "os": 0.375
- },
- "citation": ' L. Goerigk, S.Grimme, J. Chem. Theory Comput., 7, 291-309, 2011 \n',
- "description": ' PTPSS SOS Double Hybrid XC Functional\n',
-})
-
-funcs.append({
"name": "DSD-PBEB95",
"x_functionals": {
"GGA_X_PBE": {
Index: psi4/psi4/driver/procrouting/dft_funcs/dict_hyb_funcs.py
===================================================================
--- psi4.orig/psi4/driver/procrouting/dft_funcs/dict_hyb_funcs.py
+++ psi4/psi4/driver/procrouting/dft_funcs/dict_hyb_funcs.py
@@ -33,52 +33,6 @@ import copy
funcs = []
-funcs.append({
- "name": "wPBE0",
- "alias": ["LC-WPBE0"],
- "x_functionals": {
- "GGA_X_HJS_PBE": {
- "omega": 0.3,
- "alpha": 0.75
- }
- },
- "x_hf": {
- "alpha": 0.25,
- "beta": 1.0,
- "omega": 0.3
- },
- "c_functionals": {
- "GGA_C_PBE": {}
- },
- "description":
- ' PBE0 SR-XC Functional (HJS Model)\n',
- "citation":
- ' Henderson et. al., J. Chem. Phys., 128, 194105, 2008\n' + \
- ' Weintraub, Henderson, and Scuseria, J. Chem. Theory. Comput., 5, 754, 2009\n',
-})
-
-funcs.append({
- "name": "wPBE",
- "alias": ["LC-WPBE", "LCWPBE"],
- "x_functionals": {
- "GGA_X_HJS_PBE": {
- "omega": 0.4
- }
- },
- "x_hf": {
- "alpha": 0.0,
- "beta": 1.0,
- "omega": 0.4
- },
- "c_functionals": {
- "GGA_C_PBE": {}
- },
- "description":
- ' PBE SR-XC Functional (HJS Model)\n',
- "citation":
- ' Henderson et. al., J. Chem. Phys., 128, 194105, 2008\n' + \
- ' Weintraub, Henderson, and Scuseria, J. Chem. Theory. Comput., 5, 754, 2009\n',
-})
# funcs.append({
# "name": "wB97X-D3",
@@ -157,36 +111,6 @@ funcs.append({
})
funcs.append({
- "name": "PBEh3c",
- "alias": ["PBEH-3C"],
- "x_functionals": {
- "GGA_X_PBE": {
- "tweak": [1.0245, 0.12345679],
- "alpha": 0.58
- }
- },
- "x_hf": {
- "alpha": 0.42
- },
- "c_functionals": {
- "GGA_C_PBE": {
- "tweak": [0.03]
- }
- },
- "dispersion": {
- "type": "d3bj",
- "params": {
- 's6': 1.000,
- 's8': 0.0000,
- 'a1': 0.4860,
- 'a2': 4.5000
- }
- },
- "description": ' PBE Hybrid based 3C composite method with a small basis set, gCP and D3(BJ)\n',
- "citation": ' Grimme et. al., J. Chem. Phys., 143, 054107, 2015\n',
-})
-
-funcs.append({
"name": "SOGGA11-X",
"alias": ["SOGGA11X"],
"x_functionals": {
@@ -357,26 +281,6 @@ def get_pw6b95_tweaks():
funcs.append({
- "name": "PW6B95",
- "x_functionals": {
- "GGA_X_PW91": {
- "tweak": get_pw6b95_tweaks(),
- "alpha": 0.72
- }
- },
- "x_hf": {
- "alpha": 0.28
- },
- "c_functionals": {
- "MGGA_C_BC95": {
- "tweak": [0.03668, 0.00262]
- }
- },
- "description": ' PW6B95 Hybrid Meta-GGA XC Functional\n',
- "citation": ' Y. Zhao and D. Truhlar, J. Phys. Chem. A., 109,5656-5667, 2005\n',
-})
-
-funcs.append({
"name": "dlDF",
"x_functionals": {
"HYB_MGGA_X_DLDF": {
Index: psi4/psi4/src/psi4/libfunctional/LibXCfunctional.cc
===================================================================
--- psi4.orig/psi4/src/psi4/libfunctional/LibXCfunctional.cc
+++ psi4/psi4/src/psi4/libfunctional/LibXCfunctional.cc
@@ -35,13 +35,12 @@
#include "psi4/libpsi4util/PsiOutStream.h"
#include "psi4/libpsi4util/exception.h"
-#include "libxc/xc.h"
#include <cmath>
#include <string>
#include <algorithm>
// LibXC helper utility for setter functions, not really supposed to do this
-#include "libxc/xc.h"
+#include <xc.h>
using namespace psi;
@@ -173,11 +172,14 @@ void LibXCFunctional::set_omega(double o
omega_ = omega;
user_omega_ = true;
if (xc_func_name_ == "XC_GGA_X_WPBEH") {
- xc_gga_x_wpbeh_set_params(xc_functional_.get(), omega);
+ outfile->Printf("LibXCfunctional: set_omega is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_omega not implemented in Fedora package for input functional");
} else if (xc_func_name_ == "XC_GGA_X_HJS_PBE") {
- xc_gga_x_hjs_set_params(xc_functional_.get(), omega);
+ outfile->Printf("LibXCfunctional: set_omega is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_omega not implemented in Fedora package for input functional");
} else if (xc_func_name_ == "XC_HYB_GGA_XC_LRC_WPBEH") {
- xc_gga_x_wpbeh_set_params(xc_functional_->func_aux[0], omega);
+ outfile->Printf("LibXCfunctional: set_omega is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_omega not implemented in Fedora package for input functional");
} else if (xc_func_name_ == "XC_HYB_GGA_XC_WB97X") {
xc_functional_->cam_omega = omega;
} else if (xc_func_name_ == "XC_HYB_GGA_XC_WB97") {
@@ -225,80 +227,41 @@ void LibXCFunctional::set_tweak(std::vec
bool failed = true;
size_t vsize = values.size();
if (xc_func_name_ == "XC_GGA_X_B86") {
- if (vsize == 3) {
- // (XC(func_type) *p, FLOAT beta, FLOAT gamma, FLOAT omega);
- xc_gga_x_b86_set_params(xc_functional_.get(), values[0], values[1], values[2]);
- failed = false;
- }
+ outfile->Printf("LibXCfunctional: set_tweak is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_tweak not implemented in Fedora package for input functional");
} else if (xc_func_name_ == "XC_GGA_X_B88") {
- if (vsize == 2) {
- // (XC(func_type) *p, FLOAT beta, FLOAT gamma);
- xc_gga_x_b88_set_params(xc_functional_.get(), values[0], values[1]);
- failed = false;
- }
+ outfile->Printf("LibXCfunctional: set_tweak is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_tweak not implemented in Fedora package for input functional");
} else if (xc_func_name_ == "XC_GGA_X_PBE") {
- if (vsize == 2) {
- // (XC(func_type) *p, FLOAT kappa, FLOAT mu);
- xc_gga_x_pbe_set_params(xc_functional_.get(), values[0], values[1]);
- failed = false;
- }
+ outfile->Printf("LibXCfunctional: set_tweak is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_tweak not implemented in Fedora package for input functional");
} else if (xc_func_name_ == "XC_GGA_C_PBE") {
- if (vsize == 1) {
- // (XC(func_type) *p, FLOAT beta);
- xc_gga_c_pbe_set_params(xc_functional_.get(), values[0]);
- failed = false;
- }
+ outfile->Printf("LibXCfunctional: set_tweak is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_tweak not implemented in Fedora package for input functional");
} else if (xc_func_name_ == "XC_GGA_X_PW91") {
- if (vsize == 7) {
- // (XC(func_type) *p, FLOAT a, FLOAT b, FLOAT c, FLOAT d, FLOAT f, FLOAT alpha, FLOAT expo);
- xc_gga_x_pw91_set_params(xc_functional_.get(), values[0], values[1], values[2], values[3], values[4], values[5],
- values[6]);
- failed = false;
- }
+ outfile->Printf("LibXCfunctional: set_tweak is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_tweak not implemented in Fedora package for input functional");
} else if (xc_func_name_ == "XC_GGA_X_RPBE") {
- if (vsize == 2) {
- // (XC(func_type) *p, FLOAT kappa, FLOAT mu);
- xc_gga_x_rpbe_set_params(xc_functional_.get(), values[0], values[1]);
- failed = false;
- }
+ outfile->Printf("LibXCfunctional: set_tweak is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_tweak not implemented in Fedora package for input functional");
} else if (xc_func_name_ == "XC_GGA_X_OPTX") {
- if (vsize == 3) {
- // (XC(func_type) *p, FLOAT a, FLOAT b, FLOAT gamma);
- xc_gga_x_optx_set_params(xc_functional_.get(), values[0], values[1], values[2]);
- failed = false;
- }
+ outfile->Printf("LibXCfunctional: set_tweak is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_tweak not implemented in Fedora package for input functional");
} else if (xc_func_name_ == "XC_GGA_C_LYP") {
- if (vsize == 4) {
- // (XC(func_type) *p, FLOAT A, FLOAT B, FLOAT c, FLOAT d);
- xc_gga_c_lyp_set_params(xc_functional_.get(), values[0], values[1], values[2], values[3]);
- failed = false;
- }
+ outfile->Printf("LibXCfunctional: set_tweak is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_tweak not implemented in Fedora package for input functional");
} else if ((xc_func_name_ == "XC_HYB_GGA_XC_HSE03") || (xc_func_name_ == "XC_HYB_GGA_XC_HSE06")) {
- if (vsize == 3) {
- // "Mixing parameter beta", "Screening parameter omega_HF", "Screening parameter omega_PBE"
- xc_func_set_ext_params(xc_functional_.get(), values.data());
- failed = false;
- }
+ outfile->Printf("LibXCfunctional: set_tweak is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_tweak not implemented in Fedora package for input functional");
} else if (xc_func_name_ == "XC_MGGA_X_TPSS") {
- if (vsize == 5) {
- // (xc_func_type *p, double b, double c, double e, double kappa, double mu, double BLOC_a, double BLOC_bu);
- xc_mgga_x_tpss_set_params(xc_functional_.get(), values[0], values[1], values[2], values[3],
- values[4], 2.0, 0.0);
- failed = false;
- }
+ outfile->Printf("LibXCfunctional: set_tweak is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_tweak not implemented in Fedora package for input functional");
} else if (xc_func_name_ == "XC_MGGA_C_TPSS") {
- if (vsize == 6) {
- // (xc_func_type *p, double beta, double d, double C0_0, double C0_1, double C0_2, double C0_3);
- xc_mgga_c_tpss_set_params(xc_functional_.get(), values[0], values[1], values[2], values[3],
- values[4], values[5]);
- failed = false;
- }
+ outfile->Printf("LibXCfunctional: set_tweak is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_tweak not implemented in Fedora package for input functional");
} else if (xc_func_name_ == "XC_MGGA_C_BC95") {
- if (vsize == 2) {
- // (XC(func_type) *p, FLOAT css, FLOAT copp);
- xc_mgga_c_bc95_set_params(xc_functional_.get(), values[0], values[1]);
- failed = false;
- }
+ outfile->Printf("LibXCfunctional: set_tweak is not implemented in Fedora package for functional %s\n.", xc_func_name_.c_str());
+ throw PSIEXCEPTION("LibXCfunctional: set_tweak not implemented in Fedora package for input functional");
// } else if (xc_func_name_ == "XC_MGGA_C_PKZB") {
// if (vsize == 6) {
// // ((XC(func_type) *p, FLOAT beta, FLOAT d, FLOAT C0_0, FLOAT C0_1, FLOAT C0_2, FLOAT
Index: psi4/psi4/src/psi4/libfunctional/factory.cc
===================================================================
--- psi4.orig/psi4/src/psi4/libfunctional/factory.cc
+++ psi4/psi4/src/psi4/libfunctional/factory.cc
@@ -31,8 +31,8 @@ PRAGMA_WARNING_PUSH
PRAGMA_WARNING_IGNORE_DEPRECATED_DECLARATIONS
#include <memory>
PRAGMA_WARNING_POP
+#include <xc.h>
#include "functional.h"
-#include "libxc/xc.h"
#include "psi4/psi4-dec.h"
#include "LibXCfunctional.h"
#include "psi4/libpsi4util/exception.h"
--- ./tests/dft-smoke/input.dat.orig 2019-01-04 18:41:13.402451579 +0100
+++ ./tests/dft-smoke/input.dat 2019-01-04 18:41:19.834533568 +0100
@@ -6,7 +6,6 @@
"DLDF+D09": -76.8410958136, #TEST
"DSD-PBEP86-D3BJ": -76.2032218018, #TEST
"PBE": -76.2994541311, #TEST
- "WPBE": -76.3341949067, #TEST
} #TEST
molecule h2o {
|