16 buildPythonPackage rec {
19 format = "setuptools";
21 src = fetchFromGitHub {
24 rev = "refs/tags/v${version}";
25 hash = "sha256-UCchzoYsqeIGViewPf4KedmhYktXLmp5Me4lzb1i8p0=";
28 # setup.py calls Cmake and passes the arguments in CMAKE_CONFIGURE_ARGS to cmake.
29 nativeBuildInputs = [ cmake ];
30 dontUseCmakeConfigure = true;
32 export CMAKE_CONFIGURE_ARGS="-DBUILD_LIBCINT=0 -DBUILD_LIBXC=0 -DBUILD_XCFUN=0"
33 PYSCF_INC_DIR="${libcint}:${libxc}:${xcfun}";
43 propagatedBuildInputs = [
50 nativeCheckInputs = [ pytestCheckHook ];
51 pythonImportsCheck = [ "pyscf" ];
53 # Set config used by tests to ensure reproducibility
54 echo 'pbc_tools_pbc_fft_engine = "NUMPY"' > pyscf/pyscf_config.py
55 export OMP_NUM_THREADS=1
57 export PYSCF_CONFIG_FILE=$(pwd)/pyscf/pyscf_config.py
60 # Numerically slightly off tests
77 "test_finite_diff_rks_eph"
78 "test_finite_diff_uks_eph"
79 "test_finite_diff_roks_grad"
80 "test_finite_diff_df_roks_grad"
82 "test_nosymm_sa4_newton"
86 "test_collinear_kgks_gga"
87 "test_libxc_gga_deriv4"
91 "--ignore=pyscf/pbc/tdscf"
92 "--ignore=pyscf/pbc/gw"
93 "--ignore-glob=*_slow.*py"
94 "--ignore-glob=*_kproxy_.*py"
95 "--ignore-glob=test_proxy.py"
99 description = "Python-based simulations of chemistry framework";
100 homepage = "https://github.com/pyscf/pyscf";
101 license = licenses.asl20;
102 platforms = [ "x86_64-linux" "x86_64-darwin" ];
103 maintainers = [ maintainers.sheepforce ];