diff options
author | Thierry Thomas <thierry@FreeBSD.org> | 2022-10-25 19:39:59 +0300 |
---|---|---|
committer | Thierry Thomas <thierry@FreeBSD.org> | 2022-10-26 20:58:26 +0300 |
commit | b8c5f27e68c6724bddd0a6b50b3d40c454e24a44 (patch) | |
tree | 5deab809ff32b2faf89e0f0b09166f52260e8a51 /science | |
parent | 3a06165f14666b9a5e1eca2e292fe96a895dcbd2 (diff) |
science/py-pyscf: chase libXC6
Patch from <https://github.com/pyscf/pyscf/pull/1467>.
PR: 267360
Approved by: yuri (maintainer)
Diffstat (limited to 'science')
-rw-r--r-- | science/py-pyscf/Makefile | 3 | ||||
-rw-r--r-- | science/py-pyscf/files/patch-pyscf_lib_dft_libxc__itrf.c | 56 |
2 files changed, 58 insertions, 1 deletions
diff --git a/science/py-pyscf/Makefile b/science/py-pyscf/Makefile index 887bcf8b4a41..10025fc36f73 100644 --- a/science/py-pyscf/Makefile +++ b/science/py-pyscf/Makefile @@ -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 diff --git a/science/py-pyscf/files/patch-pyscf_lib_dft_libxc__itrf.c b/science/py-pyscf/files/patch-pyscf_lib_dft_libxc__itrf.c new file mode 100644 index 000000000000..dbcee618bce5 --- /dev/null +++ b/science/py-pyscf/files/patch-pyscf_lib_dft_libxc__itrf.c @@ -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]; + } |