diff --git a/easybuild/easyconfigs/a/AlphaPulldown/AlphaPulldown-0.30.7-foss-2022a.eb b/easybuild/easyconfigs/a/AlphaPulldown/AlphaPulldown-0.30.7-foss-2022a.eb new file mode 100644 index 000000000000..a8c358efc187 --- /dev/null +++ b/easybuild/easyconfigs/a/AlphaPulldown/AlphaPulldown-0.30.7-foss-2022a.eb @@ -0,0 +1,69 @@ +# created by Denis Kristak (Inuits) +easyblock = 'PythonBundle' + +name = 'AlphaPulldown' +version = '0.30.7' + +homepage = 'https://github.com/KosinskiLab/AlphaPulldown' +description = """AlphaPulldown is a Python package that streamlines protein-protein +interaction screens and high-throughput modelling of higher-order oligomers using AlphaFold-Multimer""" + +toolchain = {'name': 'foss', 'version': '2022a'} + +dependencies = [ + ('Python', '3.10.4'), + ('OpenMM', '8.0.0'), + ('Kalign', '3.3.5'), + ('PyYAML', '6.0'), + ('cctbx-base', '2023.5'), + ('jax', '0.3.25'), # also provides absl-py + ('Biopython', '1.79'), + ('h5py', '3.7.0'), + ('IPython', '8.5.0'), + ('JupyterLab', '3.5.0'), + ('matplotlib', '3.5.2'), + ('TensorFlow', '2.11.0'), + ('tqdm', '4.64.0'), + ('dm-tree', '0.1.8'), + ('py3Dmol', '2.0.1.post1'), + ('AlphaFold', '2.3.4', '-ColabFold'), # must match with AlphaFold dep of ColabFold + ('ColabFold', '1.5.2'), +] + +use_pip = True + +# note: rely on extensions included in AlphaFold installation (PDBFixer, dm-haiku, contextlib2, ml-collections) +exts_list = [ + ('importlib-resources', '5.13.0', { + 'source_tmpl': 'importlib_resources-%(version)s.tar.gz', + 'checksums': ['82d5c6cca930697dbbd86c93333bb2c2e72861d4789a11c2662b933e5ad2b528'], + 'modulename': 'importlib_resources', + }), + (name, version, { + 'sources': ['%(namelower)s-%(version)s.tar.gz'], + 'patches': ['AlphaPulldown-%(version)s_AlphaFold-ColabFold-deps.patch'], + 'checksums': [ + {'alphapulldown-0.30.7.tar.gz': 'e089e4b3b238fe2874c7e4cc38368a6784f3e4664ad11b0b3d9088d1cdfa7c96'}, + {'AlphaPulldown-0.30.7_AlphaFold-ColabFold-deps.patch': + 'f9d756c7e6a34016697361ac5d94a04afa26b666199cb7326c7e58dc1ea649af'}, + ], + # loosen up strict version requirements for required Python packages, + # and remove copies of AlphaFold + ColabFold that are included (to use provided dependencies instead) + 'preinstallopts': "sed -i 's/==/>=/g' setup.cfg && rm -rf alphafold colabold alphapulldown/ColabFold && ", + }), +] + +fix_python_shebang_for = ['bin/*.py'] + +postinstallcmds = ["cp -a %(builddir)s/AlphaPulldown-*/example_data %(installdir)s/"] + +sanity_pip_check = True + +sanity_check_paths = { + 'files': ['bin/run_multimer_jobs.py', 'bin/rename_colab_search_a3m.py'], + 'dirs': ['example_data', 'lib/python%(pyshortver)s/site-packages/alphapulldown'], +} + +sanity_check_commands = ["run_multimer_jobs.py --help 2>&1 | grep 'USAGE:'"] + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/a/AlphaPulldown/AlphaPulldown-0.30.7_AlphaFold-ColabFold-deps.patch b/easybuild/easyconfigs/a/AlphaPulldown/AlphaPulldown-0.30.7_AlphaFold-ColabFold-deps.patch new file mode 100644 index 000000000000..f568d7503282 --- /dev/null +++ b/easybuild/easyconfigs/a/AlphaPulldown/AlphaPulldown-0.30.7_AlphaFold-ColabFold-deps.patch @@ -0,0 +1,82 @@ +use $EBROOTALPHAFOLD set by AlphaFold dependency provided by EasyBuild to determine path to run_alphafold.py script, +patch setup.cfg to not install alphafold/colafold packages + not install stereo_chemical_props.txt as data file (since it's provided by AlphaFold dependency) +author: Kenneth Hoste (HPC-UGent) +diff -ru alphapulldown-0.30.7.orig/alphapulldown/create_individual_features.py alphapulldown-0.30.7/alphapulldown/create_individual_features.py +--- alphapulldown-0.30.7.orig/alphapulldown/create_individual_features.py 2023-04-19 13:33:53 ++++ alphapulldown-0.30.7/alphapulldown/create_individual_features.py 2023-08-08 20:59:37 +@@ -42,19 +42,7 @@ + return module + + +-PATH_TO_RUN_ALPHAFOLD = os.path.join( +- os.path.dirname(alphafold.__file__), "run_alphafold.py" +-) +- +-try: +- run_af = load_module(PATH_TO_RUN_ALPHAFOLD, "run_alphafold") +-except FileNotFoundError: +- PATH_TO_RUN_ALPHAFOLD = os.path.join( +- os.path.dirname(os.path.dirname(alphafold.__file__)), "run_alphafold.py" +- ) +- +- run_af = load_module(PATH_TO_RUN_ALPHAFOLD, "run_alphafold") +- ++run_af = get_run_alphafold() + + flags = run_af.flags + flags.DEFINE_bool("save_msa_files", False, "save msa output or not") +diff -ru alphapulldown-0.30.7.orig/alphapulldown/utils.py alphapulldown-0.30.7/alphapulldown/utils.py +--- alphapulldown-0.30.7.orig/alphapulldown/utils.py 2023-05-24 16:31:29 ++++ alphapulldown-0.30.7/alphapulldown/utils.py 2023-08-08 20:59:52 +@@ -310,9 +310,13 @@ + return module + + def get_run_alphafold(): +- PATH_TO_RUN_ALPHAFOLD = os.path.join( +- os.path.dirname(alphafold.__file__), "run_alphafold.py" +- ) ++ ebrootalphafold = os.getenv('EBROOTALPHAFOLD') ++ if ebrootalphafold: ++ PATH_TO_RUN_ALPHAFOLD = os.path.join(ebrootalphafold, 'bin', 'run_alphafold.py') ++ else: ++ PATH_TO_RUN_ALPHAFOLD = os.path.join( ++ os.path.dirname(alphafold.__file__), "run_alphafold.py" ++ ) + + try: + run_af = load_module(PATH_TO_RUN_ALPHAFOLD, "run_alphafold") +@@ -323,4 +327,4 @@ + + run_af = load_module(PATH_TO_RUN_ALPHAFOLD, "run_alphafold") + +- return run_af +\ No newline at end of file ++ return run_af +diff -ru alphapulldown-0.30.7.orig/setup.cfg alphapulldown-0.30.7/setup.cfg +--- alphapulldown-0.30.7.orig/setup.cfg 2023-06-21 14:14:42 ++++ alphapulldown-0.30.7/setup.cfg 2023-08-08 21:01:04 +@@ -13,14 +13,10 @@ + [options] + packages = + alphapulldown +- alphafold +- colabfold + analysis_pipeline + af2plots + package_dir = + alphapulldown = ./alphapulldown +- alphafold = ./alphafold/alphafold +- colabfold = ./alphapulldown/ColabFold/colabfold + analysis_pipeline = ./alphapulldown/analysis_pipeline + af2plots = ./alphapulldown/analysis_pipeline/af2_plots/af2plots + include_package_data = True +@@ -49,9 +45,6 @@ + [options.packages.find] + where = ./ + exclude = test* +- +-[options.data_files] +-lib/python3.8/site-packages/alphafold/common/ = stereo_chemical_props.txt + + [egg_info] + tag_build = diff --git a/easybuild/easyconfigs/c/cctbx-base/cctbx-base-2023.5-foss-2022a.eb b/easybuild/easyconfigs/c/cctbx-base/cctbx-base-2023.5-foss-2022a.eb new file mode 100644 index 000000000000..8fd2d3a4c560 --- /dev/null +++ b/easybuild/easyconfigs/c/cctbx-base/cctbx-base-2023.5-foss-2022a.eb @@ -0,0 +1,92 @@ +easyblock = 'Binary' + +name = 'cctbx-base' +version = '2023.5' + +homepage = 'https://github.com/cctbx/cctbx_project' +description = "Computational Crystallography Toolbox" + +toolchain = {'name': 'foss', 'version': '2022a'} + +source_urls = ['https://github.com/cctbx/cctbx_project/releases/download/v2023.5/'] +sources = ['cctbx-%(version)s.tar.gz'] +patches = ['cctbx-base-%(version)s_do-not-use-non-public-boost-python-function.patch'] +checksums = [ + {'cctbx-2023.5.tar.gz': '9983a4296e27f5c344555f079170a9abfc1513a3788a8e6087ae156003c8b2af'}, + {'cctbx-base-2023.5_do-not-use-non-public-boost-python-function.patch': + '6e1a6669e5ddf94ed8d68c863c03013bc8c9239f8946381722e4de2a9a0442ec'}, +] + +builddependencies = [ + ('SCons', '4.4.0'), + ('Eigen', '3.4.0'), + ('pybind11', '2.9.2'), +] + +dependencies = [ + ('Python', '3.10.4'), + ('Boost', '1.79.0'), + ('Boost.Python-NumPy', '1.79.0'), + ('HDF5', '1.12.2'), + ('LibTIFF', '4.3.0'), +] + +extract_sources = True + +local_adaptbx_sconscript = 'modules/cctbx_project/boost_adaptbx/SConscript' + +local_bootstrap_build_cmd = "python bootstrap.py build --builder=cctbx --with-python $EBROOTPYTHON/bin/python " +local_bootstrap_build_cmd += "--no-boost-src --nproc %(parallel)s " +local_bootstrap_build_cmd += "--config-flags='--use_environment_flags' --config-flags='--skip_phenix_dispatchers' " + +local_libtbx_python_cmd = "./build/bin/libtbx.python lib/libtbx/auto_build/conda_build/install_build.py " +local_libtbx_python_cmd += "--prefix %(installdir)s --sp-dir %(installdir)s/lib/python%(pyshortver)s/site-packages " +local_libtbx_python_cmd += "--ext-dir %(installdir)s/lib/python%(pyshortver)s/lib-dynload --preserve-egg-dir " + +install_cmds = [ + # prepare + "rm -r modules/{boost,eigen,scons}", + "mkdir -p modules/boost && cd modules/boost && ln -s $EBROOTBOOST/include/boost", + "ln -s lib/libtbx/auto_build/bootstrap.py", + "export CCTBX_SKIP_CHEMDATA_CACHE_REBUILD=1", + + # patch SConscript scripts to use Boost* dependencies + "sed -i 's/build_boost_libs = True/build_boost_libs = False/g' %s" % local_adaptbx_sconscript, + """sed -i "s/'boost_python'/'boost_python%%(pymajver)s%%(pyminver)s'/g" %s""" % local_adaptbx_sconscript, + """sed -i "s/'boost_numpy'/'boost_numpy%%(pymajver)s%%(pyminver)s'/g" %s""" % local_adaptbx_sconscript, + """sed -i 's/"boost_python"/"boost_python%(pymajver)s%(pyminver)s"/g' modules/dxtbx/SConscript""", + + # build + local_bootstrap_build_cmd, + "cd build && ./bin/libtbx.configure cma_es crys3d fable rstbx spotinder", + "cd build && ./bin/libtbx.scons -j %(parallel)s", + + # patch bootstrap.py to not blindly overwrite $LD_LIBRARY_PATH + # cfr. https://github.com/cctbx/cctbx_project/commit/c53e5ec15b3a7172087dce11c1a908f03144b45c + r"sed 's@\(export LD_LIBRARY_PATH=\.\./base/lib\)\n@\1:$LD_LIBRARY_PATH\n@g' bootstrap.py", + + # install + "mkdir -p %(installdir)s/{bin,include,lib,share}", + "mkdir -p %(installdir)s/lib/python%(pyshortver)s/{lib-dynload,site-packages}", + local_libtbx_python_cmd, + + # install Python bindings + "cd modules/cctbx_project && pip install --no-deps --ignore-installed --prefix %(installdir)s .", +] + +sanity_check_paths = { + 'files': ['bin/cctbx.find_distances', 'bin/cctbx.getting_started', 'bin/cctbx.lattice_symmetry', + 'include/boost_adaptbx/type_id_eq.h', 'lib/libcctbx.%s' % SHLIB_EXT, + 'lib/libscitbx_minpack.%s' % SHLIB_EXT, 'lib/libspotfinder.%s' % SHLIB_EXT], + 'dirs': ['include/cctbx', 'include/scitbx', 'include/smtbx', 'lib/python%(pyshortver)s/lib-dynload', + 'lib/python%(pyshortver)s/site-packages', 'share/cctbx'], +} + +sanity_check_commands = [ + "cctbx.getting_started", + "cctbx.lattice_symmetry", +] + ["python -c 'import %s'" % x for x in ['boost_adaptbx', 'crys3d', 'libtbx', 'scitbx', 'spotfinder']] + +modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/c/cctbx-base/cctbx-base-2023.5_do-not-use-non-public-boost-python-function.patch b/easybuild/easyconfigs/c/cctbx-base/cctbx-base-2023.5_do-not-use-non-public-boost-python-function.patch new file mode 100644 index 000000000000..98a838e5bda5 --- /dev/null +++ b/easybuild/easyconfigs/c/cctbx-base/cctbx-base-2023.5_do-not-use-non-public-boost-python-function.patch @@ -0,0 +1,18 @@ +strip out optional code that relies on non-public cxxabi_cxa_demangle_is_broken function in Boost.Python; +fix for missing symbol _ZN5boost6python29cxxabi_cxa_demangle_is_brokenEv +author: Simon Branford (University of Birmingham) +--- cctbx-2023.5.orig/modules/cctbx_project/boost_adaptbx/meta_ext.cpp.orig 2023-06-27 09:10:15.541028000 +0100 ++++ cctbx-2023.5/modules/cctbx_project/boost_adaptbx/meta_ext.cpp 2023-06-27 09:11:30.755613353 +0100 +@@ -298,12 +298,6 @@ + #if defined(__llvm__) + result += "__llvm__\n"; + #endif +-#if defined(BOOST_PYTHON_HAVE_CXXABI_CXA_DEMANGLE_IS_BROKEN) \ +- && !defined(USE_CONDA) \ +- && !defined(__MINGW32__) // workaround for MinGW linking problem +- result += "boost::python::cxxabi_cxa_demangle_is_broken(): " +- + to_str(boost::python::cxxabi_cxa_demangle_is_broken()) + nl; +-#endif + #if defined(__GXX_WEAK__) + result += "__GXX_WEAK__ = " + to_str(__GXX_WEAK__) + nl; + #endif