Skip to content

Commit

Permalink
Merge pull request #21251 from WilleBell/20240823120715_new_pr_OpenMM…
Browse files Browse the repository at this point in the history
…-Torch20240816

{bio}[foss/2023a] OpenMM-Torch v20240816, OpenMMTools v0.23.1
  • Loading branch information
lexming authored Sep 26, 2024
2 parents bc37cf5 + f0817dc commit bb98871
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
easyblock = 'CMakeMake'

name = 'OpenMM-Torch'
version = '20240816'
local_commit = '8893c0f'

homepage = 'https://openmm.org/'
description = """
OpenMM-Torch is an OpenMM plugin to define forces with neural networks.
The OpenMM-Torch package provides an interface to the PyTorch machine learning framework.
It lets you define new types of forces through PyTorch code.
"""

toolchain = {'name': 'foss', 'version': '2023a'}
toolchainopts = {'cstd': 'c++17'}

source_urls = ['https://github.com/openmm/%(namelower)s/archive']
sources = ['%s.tar.gz' % local_commit]
checksums = ['c2abf0bfce61b6e2e1f42d27a89032b4b994f7d67eb238ddf1a7d299cae551bf']

builddependencies = [
('CMake', '3.26.3'),
]

dependencies = [
('Python', '3.11.3'),
('PyTorch', '2.1.2'),
('OpenMM', '8.0.0'),
]

configopts = '-DOPENMM_DIR="${EBROOTOPENMM}" '
configopts += '-DPYTORCH_DIR="${EBROOTPYTORCH}/lib/python%(pyshortver)s/site-packages/torch"'

# install Python bindings
postinstallcmds = [
"sed -i 's|pip install |pip install --prefix=%(installdir)s |' %(start_dir)s/python/CMakeLists.txt",
"make PythonInstall",
]

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

sanity_check_commands = [
"python -c 'import openmmtorch'",
]

modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'}

moduleclass = 'bio'
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
easyblock = 'PythonBundle'

name = 'OpenMMTools'
version = '0.23.1'

homepage = 'https://github.com/choderalab/openmmtools'
description = """A batteries-included toolkit for the GPU-accelerated OpenMM molecular simulation engine.
openmmtools is a Python library layer that sits on top of OpenMM to provide access to a variety of useful tools
for building full-featured molecular simulation packages.
"""

toolchain = {'name': 'foss', 'version': '2023a'}
toolchainopts = {'usempi': True}

builddependencies = [
('hatchling', '1.18.0'),
]

dependencies = [
('Python', '3.11.3'),
('SciPy-bundle', '2023.07'),
('OpenMM', '8.0.0'),
('netcdf4-python', '1.6.4'),
('MDTraj', '1.9.9'),
('PyYAML', '6.0'),
('numba', '0.58.1'),
('jupyter-server', '2.7.2'),
]

use_pip = True
exts_list = [
('pymbar', '3.1', {
# pymbar 3.1 is not available via PyPI, see https://github.com/choderalab/pymbar/issues/475
'source_urls': ['https://github.com/choderalab/pymbar/archive/'],
'sources': ['%(version)s.tar.gz'],
'checksums': ['7a996e5d3fd8143378f9e18662483446a4a2fe7e57917511e96beb6b07fd6232'],
}),
('mpiplus', '0.0.2', {
'source_tmpl': 'v%(version)s.tar.gz',
'source_urls': ['https://github.com/choderalab/mpiplus/archive/'],
'checksums': ['5f051210b8cd321fdcbfa97a6e1606b63e6d6c7214c393bc04f93a8545b6d3a8'],
}),
(name, version, {
'source_tmpl': '%(version)s.tar.gz',
'source_urls': ['https://github.com/choderalab/openmmtools/archive/'],
'checksums': ['9281f50896a91f3f9e1ea16f0636f2aff494287a51a4ec03ae8e26f1b8edaccc'],
# import check requires use of mpirun, handled via sanity_check_commands
'modulename': False,
}),
]

sanity_check_paths = {
'files': ['bin/test-openmm-platforms'],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

sanity_check_commands = ["%(mpi_cmd_prefix)s python -c 'import %(namelower)s'"]

sanity_pip_check = True

moduleclass = 'bio'

0 comments on commit bb98871

Please sign in to comment.