Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions easybuild/easyconfigs/a/AmberTools/AmberTools-25.2-foss-2025a.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
easyblock = 'EB_Amber'

name = 'AmberTools'
local_ambertools_ver = 25
# Patch levels from http://ambermd.org/AmberPatches.php and http://ambermd.org/ATPatches.php
patchlevels = (2, 0) # (AmberTools, Amber)
version = '%s.%s' % (local_ambertools_ver, patchlevels[0])

homepage = 'https://ambermd.org/'
description = """AmberTools consists of several independently developed packages that work well by themselves,
and with Amber itself. The suite can also be used to carry out complete molecular dynamics simulations,
with either explicit water or generalized Born solvent models."""

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

# download requires registration
local_download_credentials = '?Name=Easybuild&Institution=Easybuild&City=Internet&State=Other&Country=Belgium'
source_urls = ['https://ambermd.org/cgi-bin/AmberTools%s-get.pl' % local_ambertools_ver]
sources = [{
'download_filename': local_download_credentials,
'filename': 'AmberTools%s.tar.bz2' % local_ambertools_ver,
}]
patches = [
'AmberTools-20_cmake-locate-netcdf.patch',
'AmberTools-20_fix_missing_MPI_LIBRARY_error.patch',
'AmberTools-20_fix_xblas_missing_make_dependency.patch',
'AmberTools-21_CMake-FlexiBLAS.patch',
'AmberTools-21_fix_incorrect_dvout_call.patch',
'AmberTools-21_fix_potential_use_before_init.patch',
'AmberTools-21_fix_rism_argument_mismatch.patch',
'AmberTools-21_fix_xray_fftpack_arg_mismatch.patch',
'AmberTools-25_fix_test_missing_dirs.patch',
'AmberTools-25_parmed-update.patch',
'AmberTools-25_fix-boost.patch',
'AmberTools-25_skip-tests.patch',
'AmberTools-25_fix-sander-numpy.patch',
]
checksums = [
{'AmberTools25.tar.bz2': 'ac009b2adeb25ccd2191db28905b867df49240e038dc590f423edf0d84f8a13b'},
{'AmberTools-20_cmake-locate-netcdf.patch': '473e07c53b6f641d96d333974a6af2e03413fecef79f879d3fdecf7fecaab4d0'},
{'AmberTools-20_fix_missing_MPI_LIBRARY_error.patch':
'0b89a0624167bc23876bcdefcb1055f591e38e3bd559a71d5749e342bd311acc'},
{'AmberTools-20_fix_xblas_missing_make_dependency.patch':
'ff25e91fdc72347a778c3837b581e174d6a8c71efa5b46e11391b18bca84fd65'},
{'AmberTools-21_CMake-FlexiBLAS.patch': '9543812c24c4b7842f64f1f8abaf2c92b5c4c0fadcdbd9811e76b81a778f0d36'},
{'AmberTools-21_fix_incorrect_dvout_call.patch':
'1054d4007f5c79126a41582e1e80514267cf406416ed6c471574cd708b16319b'},
{'AmberTools-21_fix_potential_use_before_init.patch':
'377e645b5bd2c91ebb4d0b6fbca0407a94289e5ddc5b1e7ed0cb0b0724ad2139'},
{'AmberTools-21_fix_rism_argument_mismatch.patch':
'14255e5739cec39303df570f06820c7532f7395e1b73b1e4104377984e2c9fc1'},
{'AmberTools-21_fix_xray_fftpack_arg_mismatch.patch':
'99c954e693659efc2a1d121f91510f56408006f0751d91595f45a34b03364e2f'},
{'AmberTools-25_fix_test_missing_dirs.patch': '1c4c44cb012b625933781e9811f1657d5ddfd14cfbf4894bb1f767995eadc3b6'},
{'AmberTools-25_parmed-update.patch': '2216c7883be026ce48aac7589f75749f2a42ec74f6e3ceba378d762403c50924'},
{'AmberTools-25_fix-boost.patch': 'f4ccf7dedb5aa5b289ad5f69f3c1dc808c3fcc226d7118eaba40b108688e37cc'},
{'AmberTools-25_skip-tests.patch': '3de155ba9eedcbe84eb44962e9a5e66fda9d9dfff9ad50a356750baa286f8e21'},
{'AmberTools-25_fix-sander-numpy.patch': '82b875153927b8a0977022d608bbf51513ea936384f3059ecd41a37dfb004d5e'},
]

builddependencies = [
('CMake', '3.31.3'),
('pkgconf', '2.3.0'),
('Bison', '3.8.2'),
('flex', '2.6.4'),
('make', '4.4.1'),
('Cython', '3.1.1'),
]

dependencies = [
('zlib', '1.3.1'),
('bzip2', '1.0.8'),
('Python', '3.13.1'),
('SciPy-bundle', '2025.06'),
('Perl', '5.40.0'),
('Perl-bundle-CPAN', '5.40.0'),
('Boost', '1.88.0'),
('libreadline', '8.2'),
('matplotlib', '3.10.3'),
('netCDF', '4.9.3'),
('netCDF-Fortran', '4.6.2'),
('PnetCDF', '1.14.0'),
('Tkinter', '%(pyver)s'),
('X11', '20250521'),
('mpi4py', '4.1.0'),
('FFTW', '3.3.10'),
('netcdf4-python', '1.7.2'),
('PyYAML', '6.0.2'),
('RDKit', '2025.03.4'),
('PLUMED', '2.9.4'),
]

_fe_toolkit_path = "%(builddir)s/%(name)s/src/fe-toolkit/"
_setup_path = "/src/python/setup.py"
_fe_toolkit_pkgs = ['edgembar', 'fetkutils', 'ndfes']
Comment thread
laraPPr marked this conversation as resolved.
# recythonize pytraj files - python3.13 compability
prebuildopts = "cd %(builddir)s/%(name)s/src/pytraj && find . -name '*.cpp' -delete && python setup.py --cythonize && "
prebuildopts += "cd %(builddir)s/easybuild_obj && "
# unpin numpy version restriction in fe-toolkit pkgs
prebuildopts += """sed -i "/'numpy<2',/d" """
for _pkg in _fe_toolkit_pkgs:
prebuildopts += f"{_fe_toolkit_path}{_pkg}{_setup_path} "
prebuildopts += '&& '

sanity_check_commands = [
f"python -c 'import {', '.join(_fe_toolkit_pkgs)}'",
"pip check",
"python -c 'import parmed'",
]

runtest = True

moduleclass = 'chem'
13 changes: 13 additions & 0 deletions easybuild/easyconfigs/a/AmberTools/AmberTools-25_fix-boost.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
New Boost (here v1.88) needs newer cxx standard to work
From: https://aur.archlinux.org/cgit/aur.git/tree/0001-Use-cxx14-for-Boost.patch?h=ambertools
Added by: Pavel Tomanek (Inuits)
--- a/AmberTools/src/moft/CMakeLists.txt 2025-02-12 17:09:45.031074795 +0100
+++ b/AmberTools/src/moft/CMakeLists.txt 2025-02-12 17:08:16.999758347 +0100
@@ -4,6 +4,7 @@

target_include_directories(metatwist PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_options(metatwist PRIVATE ${OPT_CXXFLAGS})
+target_compile_features(metatwist PRIVATE cxx_std_14)
target_link_libraries(metatwist fftw boost_program_options boost_iostreams boost_regex boost_system boost_timer boost_chrono boost_filesystem boost_graph)

install(TARGETS metatwist DESTINATION ${BINDIR})
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Fix numpy syntax to be compatible with v2
--- AmberTools/src/pysander/sander/__init__.py.orig 2025-08-08 11:21:39.084040000 +0200
+++ AmberTools/src/pysander/sander/__init__.py 2025-08-08 11:22:44.758277000 +0200
@@ -83,7 +83,7 @@
# numpy arrays to solve this quickly, but in cases where the coordinates
# are given as a list (or tuple) of Vec3's (or tuples), this requires
# separate handling
- positions = _np.array(positions, copy=False, subok=True)
+ positions = _np.asarray(positions)
positions = positions.flatten()
natom = _pys.natom()
if len(positions) != natom * 3:
@@ -260,7 +260,7 @@
box = rst.box

# Convert from numpy arrays to regular arrays
- coordinates = _np.array(coordinates, copy=False, subok=True)
+ coordinates = _np.asarray(coordinates)
coordinates = coordinates.flatten().tolist()
if box is None or box is False:
box = _np.zeros(6)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Make sure test_amber_clean.sh dosen't try to cd into a possibly missing directory.
--- test/test_amber_clean.sh.orig 2025-07-14 13:34:48.866262000 +0200
+++ test/test_amber_clean.sh 2025-07-14 13:35:44.941307000 +0200
@@ -1273,7 +1273,11 @@
echo $delete_list | xargs /bin/rm -f

# Remove cuda remd test output
-cd cuda/remd && make clean && cd ../..
+if [ -d "cuda/remd" ]; then
+ cd cuda/remd && make clean && cd ../..
+fi

# Remove hip remd test output
-cd hip/remd && make clean && cd ../..
+if [ -d "hip/remd" ]; then
+ cd hip/remd && make clean && cd ../..
+fi
Loading