science/py-pyscf: chase libXC6
Patch from <https://github.com/pyscf/pyscf/pull/1467>. PR: 267360 Approved by: yuri (maintainer)
This commit is contained in:
parent
3a06165f14
commit
b8c5f27e68
@ -1,12 +1,13 @@
|
||||
PORTNAME= pyscf
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 2.1.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= science python
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= yuri@FreeBSD.org
|
||||
COMMENT= Python module for quantum chemistry
|
||||
WWW= https://www.pymol.org/
|
||||
WWW= https://pypi.org/project/pyscf/
|
||||
|
||||
LICENSE= BSD2CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
56
science/py-pyscf/files/patch-pyscf_lib_dft_libxc__itrf.c
Normal file
56
science/py-pyscf/files/patch-pyscf_lib_dft_libxc__itrf.c
Normal file
@ -0,0 +1,56 @@
|
||||
--- pyscf/lib/dft/libxc_itrf.c.orig 2022-09-03 00:05:50 UTC
|
||||
+++ pyscf/lib/dft/libxc_itrf.c
|
||||
@@ -453,7 +453,7 @@ int LIBXC_is_hybrid(int xc_id)
|
||||
raise_error -1;
|
||||
}
|
||||
|
||||
-#if XC_MAJOR_VERSION < 6
|
||||
+#if XC_MAJOR_VERSION <= 6
|
||||
switch(func.info->family)
|
||||
{
|
||||
#ifdef XC_FAMILY_HYB_LDA
|
||||
@@ -483,7 +483,7 @@ double LIBXC_hybrid_coeff(int xc_id)
|
||||
raise_error 0.0;
|
||||
}
|
||||
|
||||
-#if XC_MAJOR_VERSION < 6
|
||||
+#if XC_MAJOR_VERSION <= 6
|
||||
switch(func.info->family)
|
||||
{
|
||||
#ifdef XC_FAMILY_HYB_LDA
|
||||
@@ -530,7 +530,7 @@ void LIBXC_rsh_coeff(int xc_id, double *rsh_pars) {
|
||||
rsh_pars[1] = 0.0;
|
||||
rsh_pars[2] = 0.0;
|
||||
|
||||
-#if XC_MAJOR_VERSION < 6
|
||||
+#if XC_MAJOR_VERSION <= 6
|
||||
XC(hyb_cam_coef)(&func, &rsh_pars[0], &rsh_pars[1], &rsh_pars[2]);
|
||||
#else
|
||||
switch(xc_hyb_type(&func)) {
|
||||
@@ -548,7 +548,7 @@ int LIBXC_is_cam_rsh(int xc_id) {
|
||||
fprintf(stderr, "XC functional %d not found\n", xc_id);
|
||||
raise_error -1;
|
||||
}
|
||||
-#if XC_MAJOR_VERSION < 6
|
||||
+#if XC_MAJOR_VERSION <= 6
|
||||
int is_cam = func.info->flags & XC_FLAGS_HYB_CAM;
|
||||
#else
|
||||
int is_cam = (xc_hyb_type(&func) == XC_HYB_CAM);
|
||||
@@ -793,7 +793,7 @@ void LIBXC_eval_xc(int nfn, int *fn_id, double *fac, d
|
||||
// set the range-separated parameter
|
||||
if (omega[i] != 0) {
|
||||
// skip if func is not a RSH functional
|
||||
-#if XC_MAJOR_VERSION < 6
|
||||
+#if XC_MAJOR_VERSION <= 6
|
||||
if (func.cam_omega != 0) {
|
||||
func.cam_omega = omega[i];
|
||||
}
|
||||
@@ -805,7 +805,7 @@ void LIBXC_eval_xc(int nfn, int *fn_id, double *fac, d
|
||||
// Recursively set the sub-functionals if they are RSH
|
||||
// functionals
|
||||
for (j = 0; j < func.n_func_aux; j++) {
|
||||
-#if XC_MAJOR_VERSION < 6
|
||||
+#if XC_MAJOR_VERSION <= 6
|
||||
if (func.func_aux[j]->cam_omega != 0) {
|
||||
func.func_aux[j]->cam_omega = omega[i];
|
||||
}
|
Loading…
Reference in New Issue
Block a user