diff --git a/422_PySCF/PySCF-2.7.0-foss-2023a.eb b/422_PySCF/PySCF-2.7.0-foss-2023a.eb new file mode 100644 index 0000000..0080ddf --- /dev/null +++ b/422_PySCF/PySCF-2.7.0-foss-2023a.eb @@ -0,0 +1,135 @@ +easyblock = 'CMakeMakeCp' +name = 'PySCF' +version = '2.7.0' + +homepage = 'http://www.pyscf.org' +description = "PySCF is an open-source collection of electronic structure modules powered by Python." + +toolchain = {'name': 'foss', 'version': '2023a'} + +source_urls = ['https://github.com/pyscf/pyscf/archive/'] +sources = ['v%(version)s.tar.gz'] +checksums = ['f2f94e6dae8556085bb765eb5250f61589e977b4f12540c748241101d40da241'] + +builddependencies = [ + ('CMake', '3.26.3'), + ('pybind11', '2.11.1'), # needed by zquatev +] + +dependencies = [ + ('Python', '3.11.3'), + ('SciPy-bundle', '2023.07'), # for numpy, scipy + ('h5py', '3.9.0'), + ('libcint', '5.4.0'), + ('libxc', '6.2.2'), + ('XCFun', '2.1.1'), # TODO + ('CPPE', '0.3.1'), # extra # TODO + ('PyBerny', '0.6.3'), # extra # TODO + ('PyCheMPS2', '1.8.12'), # needed by dmrgscf # TODO + ('Block', '1.5.3-20200525'), # needed by dmrgscf # TODO + ('NECI', '20230620'), # needed by fciqmc # TODO + ('Dice', '20240101'), # needed by icmpspt # TODO +] + +exts_defaultclass = 'PythonPackage' +exts_default_options = { + 'download_dep_fail': True, + 'use_pip': True, + 'modulename': 'pyscf.%(name)s', + 'source_urls': ['https://github.com/pyscf/%(name)s/archive/'], + 'sources': [{'download_filename': '%(version)s.tar.gz', 'filename': '%(name)s-%(version)s.tar.gz'}], +} + +# The following list of extensions is equivalent to installing PySCF with extras: +# all + dmrgscf + fciqmcscf + hci + mbd + tblis + zquatev +exts_list = [ # TODO + ('dftd3', '94091d8', { + 'checksums': ['a69ae44b3d02d2c06fd531373f20ee1251ef27fc932d40a7cafea6c09d8784fc'], + }), + ('doci', '08079a9', { + 'checksums': ['f492ba45dfe50c9b459e53a946a677528af0dc2097ff77ea3767aa4f46c5d9ba'], + }), + ('icmpspt', 'f26062b', { + 'patches': [('PySCF-2.1.1_icmpspt-exe-path.patch', 0)], + 'checksums': [ + {'icmpspt-f26062b.tar.gz': '8f44b317da209882e0353d2731d8bc907de450af02429e962ae9b8d3f8c95a47'}, + {'PySCF-2.1.1_icmpspt-exe-path.patch': 'e972e377b34b964c48a99909301bf21a9c73d8eb9ecb96a889621d71471c56c9'}, + ], + }), + ('properties', '8b94d8d', { + 'modulename': 'pyscf.prop', + 'checksums': ['b40e071472a6bdfcaec8cd358c7c58c58748c59d8b188fdca09d6eca63329914'], + }), + ('qsdopt', '3ad2c02', { + 'checksums': ['cc639150e5f9efad8ffe496b3dccd2952a1f60fdad51f611cffba701892b384e'], + }), + ('semiempirical', '470d716', { + 'checksums': ['0bbe304867fd053ed647445ac84c4c76787ad23def9f72415aec297740121eef'], + }), + ('shciscf', 'e8985e7', { + 'checksums': ['a017ffcf54601ccb3e95a273eff47289905c81d7fd590f9b51e22a69e141b592'], + }), + ('MCfun', '0.2.2', { + 'modulename': 'mcfun', + 'source_urls': ['https://github.com/Multi-collinear/%(name)s/archive/'], + 'sources': [{'download_filename': 'v%(version)s.tar.gz', 'filename': '%(name)s-%(version)s.tar.gz'}], + 'checksums': ['1cb6b36be86bcf13c15ecc9934d13dc67eb15834a7a6545e73f82f53835e278d'], + }), + ('pyqmc', '0.6.0', { + 'modulename': 'pyqmc', + 'source_urls': ['https://github.com/WagnerGroup/%(name)s/archive/'], + 'sources': [{'download_filename': 'v%(version)s.tar.gz', 'filename': '%(name)s-%(version)s.tar.gz'}], + 'checksums': ['6e9f612c2d0bf2198154520e01dce57cf3a6e474840c1892466de3171eaeb7db'], + }), + ('dmrgscf', '4ff57bf', { + 'patches': [('PySCF-2.1.1_dmrgscf-settings.patch', 0)], + 'checksums': [ + {'dmrgscf-4ff57bf.tar.gz': '0683cfc2e6676aa11da7b2eee66e96442a64a37b72f65057779718c5fdb43c5f'}, + {'PySCF-2.1.1_dmrgscf-settings.patch': 'a0310a2a90e96bd64d1560b2cc73a805717e129d2921e91cc5e6038b9f153677'}, + ], + }), + ('fciqmc', 'ee98fb4', { + 'modulename': 'pyscf.fciqmcscf', + 'checksums': ['b2f081ac295df0e622c6d1b3bff6d7834f97131f1f0fc87ec8bcff2137ef4199'], + }), + ('mbd', '485c18c', { + 'patches': [('PySCF-2.1.1_mbd-fix-init.patch', 0)], + 'checksums': [ + {'mbd-485c18c.tar.gz': 'de1fb14650fcb87909cae33dc318d2e213653ac4393ced7e070dfa6308d95846'}, + {'PySCF-2.1.1_mbd-fix-init.patch': '4f8e4b2e39b77428187851c4b6ced39401561bc81f4f3a4605da5d5c7b798cbc'}, + ], + }), + ('naive-hci', '0c28d6e', { + 'modulename': 'pyscf.hci', + 'checksums': ['de247d17b80133655df5966341e5adb691b0df150cd9b0f1980cf62ec55229d5'], + }), + ('tblis', '0d4dfd2', { + 'modulename': 'pyscf.tblis_einsum', + 'source_urls': ['https://github.com/pyscf/pyscf-tblis/archive/'], + 'checksums': ['5e0e5840b78451085420b333cd4b5ee06fd659df06f142fa854de65b3f73fc5e'], + }), + ('zquatev', '4eb41b1', { + 'modulename': 'zquatev', + 'preinstallopts': "sed -i 's/add_subdirectory(pybind11)/find_package(pybind11 REQUIRED)/' CMakeLists.txt && ", + 'source_urls': ['https://github.com/sunqm/%(name)s/archive/'], + 'checksums': ['4caf08e3831a5d86e6bc22f3b4028cc159101cb9658d09de16e382e268a5a2e9'], + }), +] + +start_dir = 'pyscf/lib' +configopts = "-DBUILD_LIBCINT=OFF -DBUILD_LIBXC=OFF -DBUILD_XCFUN=OFF" +prebuildopts = "export PYSCF_INC_DIR=$EBROOTQCINT/include:$EBROOTLIBXC/lib && " + +_py_site_packages = 'lib/python%(pyshortver)s/site-packages' +files_to_copy = [(['pyscf'], _py_site_packages)] + +sanity_check_paths = { + 'files': [_py_site_packages + '/pyscf/__init__.py'], + 'dirs': [_py_site_packages + d for d in ['/pyscf/data', '/pyscf/lib']], +} + +sanity_check_commands = ["python -c 'import pyscf'"] + +modextrapaths = {'PYTHONPATH': _py_site_packages} + +moduleclass = 'chem'