# IT4Innovations
# LK 2023

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': '2020b'}

dependencies = [
    ('Python', '3.8.6'),
    ('OpenMM', '7.5.0'),
    ('Kalign', '3.3.1'),
    ('PyYAML', '5.3.1'),
    ('cctbx-base', '2020.8'),
    ('jax', '0.2.19'),  # also provides absl-py
    ('Biopython', '1.78'),
    ('h5py', '3.1.0'),
    ('IPython', '7.18.1'),
    ('JupyterLab', '2.2.8'),
    ('matplotlib', '3.3.3'),
    ('TensorFlow', '2.4.1'),
    ('tqdm', '4.56.2'),
#    ('dm-tree', '0.1.5'),
]

use_pip = True

exts_list = [
    ('py3Dmol', '2.0.1.post1', {
        'modulename': 'py3Dmol',
        'checksums': ['add70ecf8f647970925eb8c1043c5c1343813fa49e613b77f0628e522c4148ac'],
    }),
    ('PDBFixer', '1.7', {
        'source_urls': ['https://github.com/openmm/pdbfixer/archive/refs/tags/'],
        'sources': [{'download_filename': 'v%(version)s.tar.gz', 'filename': '%(name)s-%(version)s.tar.gz'}],
        'checksums': ['a0bef3c52a7bbe69a6aea5333f51f3e7d158339be5829aed19b0344bd66d4eea'],
    }),
    ('dm-haiku', '0.0.4', {
        'modulename': 'haiku',
        'patches': ['%(name)s-%(version)s_fix-deps.patch'],
        'source_urls': ['https://github.com/deepmind/dm-haiku/archive/refs/tags/'],
        'sources': [{'download_filename': 'v%(version)s.tar.gz', 'filename': '%(name)s-%(version)s.tar.gz'}],
        'checksums': [
            {'dm-haiku-0.0.4.tar.gz': 'e9896d161938b53f869fde207f3f6fca496d09b2a47d21dd9b6b65e897ad6aab'},
            {'dm-haiku-0.0.4_fix-deps.patch': 'c509e0aa049401f340234b0a5eba59c9e8af8eff94b9e92f0693aeadfa4c5aa8'},
        ],
    }),
    ('toolz', '0.11.1', {
        'checksums': ['c7a47921f07822fe534fb1c01c9931ab335a4390c782bd28c6bcc7c2f71f3fbf'],
    }),
    ('importlib-resources', '5.12.0', {
        'modulename': 'importlib_resources',
        'source_tmpl': 'importlib_resources-%(version)s.tar.gz',
        'checksums': ['4be82589bf5c1d7999aedf2a45159d10cb3ca4f19b2271f8792bc8e6da7b22f6'],
    }),
    ('contextlib2', '21.6.0', {
        'checksums': ['ab1e2bfe1d01d968e1b7e8d9023bc51ef3509bba217bb730cee3827e1ee82869'],
    }),
    ('ml-collections', '0.1.1', {
        'sources': ['ml_collections-%(version)s.tar.gz'],
        'checksums': ['3fefcc72ec433aa1e5d32307a3e474bbb67f405be814ea52a2166bfc9dbe68cc'],
    }),
    (name, version, {
        'patches': ['%(name)s-0.30.4_fix-deps.patch'],
        'sources': ['%(namelower)s-%(version)s.tar.gz'],
        'checksums': [
            {'alphapulldown-0.30.7.tar.gz': '94388d37ed2eb8607bca0f07ca095eba'},
            {'AlphaPulldown-0.30.4_fix-deps.patch': 'fc5bf395cb36d02efa6d538df49749e722b2d2c257197e3dac83a81c9405c0c9'},
        ],
    }),
]

#sanity_pip_check = True

sanity_check_paths = {
    'files': ['bin/run_multimer_jobs.py', 'bin/rename_colab_search_a3m.py'],
    'dirs': ['lib/python%(pyshortver)s/site-packages/alphapulldown'],
}

moduleclass = 'data'
