18 buildPythonPackage rec {
22 src = fetchFromGitHub {
26 hash = "sha256-KMxwyAK00Zc0i76zWTMznfXQCVCt+4HOH8SlwuOCORk=";
29 patches = [ (fetchpatch {
30 name = "libxc-6"; # https://github.com/pyscf/pyscf/pull/1467
31 url = "https://github.com/pyscf/pyscf/commit/ebcfacc90e119cd7f9dcdbf0076a84660349fc79.patch";
32 sha256 = "sha256-O+eDlUKJeThxQcHrMGqxjDfRCmCNP+OCgv/L72jAF/o=";
35 # setup.py calls Cmake and passes the arguments in CMAKE_CONFIGURE_ARGS to cmake.
36 nativeBuildInputs = [ cmake ];
37 dontUseCmakeConfigure = true;
39 export CMAKE_CONFIGURE_ARGS="-DBUILD_LIBCINT=0 -DBUILD_LIBXC=0 -DBUILD_XCFUN=0"
40 PYSCF_INC_DIR="${libcint}:${libxc}:${xcfun}";
50 propagatedBuildInputs = [
57 checkInputs = [ nose nose-exclude ];
59 pythonImportsCheck = [ "pyscf" ];
61 # Set config used by tests to ensure reproducibility
62 echo 'pbc_tools_pbc_fft_engine = "NUMPY"' > pyscf/pyscf_config.py
63 export OMP_NUM_THREADS=1
65 export PYSCF_CONFIG_FILE=$(pwd)/pyscf/pyscf_config.py
67 # As defined for the PySCF CI at https://github.com/pyscf/pyscf/blob/master/.github/workflows/run_tests.sh
68 # minus some additionally numerically instable tests, that are sensitive to BLAS, FFTW, etc.
73 --exclude-dir=examples --exclude-dir=pyscf/pbc/grad \
74 --exclude-dir=pyscf/x2c \
75 --exclude-dir=pyscf/adc \
76 --exclude-dir=pyscf/pbc/tdscf \
79 -e test_mc2step_4o4e \
87 -e call_in_background \
88 -e libxc_cam_beta_bug \
89 -e test_finite_diff_rks_eph \
90 -e test_finite_diff_uks_eph \
92 -e test_n3_cis_ewald \
93 -I test_kuccsd_supercell_vs_kpts\.py \
94 -I test_kccsd_ghf\.py \
96 --exclude-test=pyscf/pbc/gw/test/test_kgw_slow_supercell.DiamondTestSupercell3 \
97 --exclude-test=pyscf/pbc/gw/test/test_kgw_slow_supercell.DiamondKSTestSupercell3 \
98 --exclude-test=pyscf/pbc/gw/test/test_kgw_slow.DiamondTestSupercell3 \
99 --exclude-test=pyscf/pbc/gw/test/test_kgw_slow.DiamondKSTestSupercell3 \
100 --exclude-test=pyscf/pbc/tdscf/test/test_krhf_slow_supercell.DiamondTestSupercell3 \
101 --exclude-test=pyscf/pbc/tdscf/test/test_kproxy_hf.DiamondTestSupercell3 \
102 --exclude-test=pyscf/pbc/tdscf/test/test_kproxy_ks.DiamondTestSupercell3 \
103 --exclude-test=pyscf/pbc/tdscf/test/test_kproxy_supercell_hf.DiamondTestSupercell3 \
104 --exclude-test=pyscf/pbc/tdscf/test/test_kproxy_supercell_ks.DiamondTestSupercell3 \
105 -I .*_slow.*py -I .*_kproxy_.*py -I test_proxy.py tdscf/*_slow.py gw/*_slow.py
111 description = "Python-based simulations of chemistry framework";
112 homepage = "https://github.com/pyscf/pyscf";
113 license = licenses.asl20;
114 platforms = [ "x86_64-linux" "x86_64-darwin" ];
115 maintainers = [ maintainers.sheepforce ];