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
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de, 2025/01
# pyForceFieldConstraints test fails on some machines:
# Default number of steps for ff.Minimize is 200 and the default force tolerance is 0.0001.
# The minimize does not converge within 200 steps and therefore we increse the number of steps to 500.
diff -ru rdkit-Release_2024_03_5/Code/ForceField/Wrap/testConstraints.py rdkit-Release_2024_03_5_relax_pyForceFieldConstraints_test/Code/ForceField/Wrap/testConstraints.py
--- rdkit-Release_2024_03_5/Code/ForceField/Wrap/testConstraints.py 2024-07-19 09:46:29.000000000 +0200
+++ rdkit-Release_2024_03_5_relax_pyForceFieldConstraints_test/Code/ForceField/Wrap/testConstraints.py 2025-01-27 12:39:11.746639187 +0100
@@ -160,7 +160,12 @@
ff = ChemicalForceFields.UFFGetMoleculeForceField(m)
self.assertTrue(ff)
ff.UFFAddAngleConstraint(1, 3, 6, False, -10.0, 10.0, 100.0)
- r = ff.Minimize()
+ # THEMBL r = ff.Minimize()
+ # Minimize((ForceField)self[, (int)maxIts=200[, (float)forceTol=0.0001[, (float)energyTol=1e-06]]]) → int :¶
+ # THEMBL default maxIts is 200 and forceTol is 0.0001.
+ # on some machines Minimize does not converge within 200 steps. Therefore we
+ # increase the number of steps.
+ r = ff.Minimize(500)
self.assertTrue(r == 0)
conf = m.GetConformer()
angle = rdMolTransforms.GetAngleDeg(conf, 1, 3, 6)
84 changes: 84 additions & 0 deletions easybuild/easyconfigs/r/RDKit/RDKit-2025_03_3-foss-2024a.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
easyblock = 'CMakeMake'

name = 'RDKit'
version = '2025_03_3'

homepage = 'https://www.rdkit.org'
description = "RDKit is a collection of cheminformatics and machine-learning software written in C++ and Python."

toolchain = {'name': 'foss', 'version': '2024a'}

source_urls = ['https://github.com/rdkit/rdkit/archive/']
sources = ['Release_%(version)s.tar.gz']
checksums = ['b11436e81e72811e31b66deb58fd7e48ece60771b2ccae5527235f4f81f511bd']

builddependencies = [
('CMake', '3.29.3'),
('Eigen', '3.4.0'),
('pkgconf', '2.2.0'),
]
dependencies = [
('Python', '3.12.3'),
('SciPy-bundle', '2024.05'),
('SQLite', '3.45.3'),
('matplotlib', '3.9.2'),
('Pillow', '10.4.0'),
('Boost.Python-NumPy', '1.85.0'),
('cairo', '1.18.0'),
('Catch2', '2.13.10'),
]

_config_opts = [
'-DPy_ENABLE_SHARED=1',
'-DRDK_INSTALL_STATIC_LIBS=OFF',
'-DRDK_INSTALL_INTREE=OFF',
'-DRDK_BUILD_INCHI_SUPPORT=ON',
'-DBOOST_ROOT="$EBROOTBOOST"',
]
configopts = ' '.join(_config_opts)

_src_dir = '%(builddir)s/rdkit-Release_%(version)s'

# merge source directory into build directory in order to run the tests
buildopts = '&& cp -RT %(builddir)s/%(namelower)s-*/ ./'

# Specify path for libraries so that they are found during the tests when the module is built with --rpath flag.
pretestopts = 'export LD_LIBRARY_PATH=%(builddir)s/easybuild_obj/lib:${LD_LIBRARY_PATH} && '
pretestopts += 'export RDBASE=$PWD && '
pretestopts += 'export PYTHONPATH=$PWD:$PYTHONPATH &&'

runtest = True
# disable some tests with known issues
testopts = "-j %(parallel)s -E 'pythonSourceTests|distGeomHelpersCatch|pyGraphMolWrap'"

# generate minimal dist-info:
_distinfodir = '%(installdir)s/lib/python%(pyshortver)s/site-packages/rdkit-%(version)s.dist-info'
postinstallcmds = [
f'mkdir {_distinfodir}',
f'touch {_distinfodir}/METADATA',
f'echo "Name: %(namelower)s" >> {_distinfodir}/METADATA',
f'echo "Version: %(version)s" >> {_distinfodir}/METADATA',
]

local_libs = ['Alignment', 'Catalogs', 'ChemicalFeatures', 'ChemReactions', 'ChemTransforms', 'coordgen', 'DataStructs',
'Depictor', 'Descriptors', 'DistGeometry', 'DistGeomHelpers', 'EigenSolvers', 'FileParsers',
'FilterCatalog', 'Fingerprints', 'FMCS', 'ForceFieldHelpers', 'ForceField', 'FragCatalog', 'GraphMol',
'hc', 'InfoTheory', 'maeparser', 'MMPA', 'MolAlign', 'MolCatalog', 'MolChemicalFeatures', 'MolDraw2D',
'MolHash', 'MolInterchange', 'MolStandardize', 'MolTransforms', 'Optimizer', 'PartialCharges', 'RDBoost',
'RDGeneral', 'RDGeometryLib', 'RDStreams', 'ReducedGraphs', 'RGroupDecomposition', 'RingDecomposerLib',
'ScaffoldNetwork', 'ShapeHelpers', 'SimDivPickers', 'SLNParse', 'SmilesParse', 'Subgraphs',
'SubstructLibrary', 'SubstructMatch', 'Trajectory']

sanity_check_paths = {
'files': [f'lib/libRDKit{lib}.{SHLIB_EXT}' for lib in local_libs],
'dirs': [
'include/rdkit', 'lib/python%(pyshortver)s/site-packages/rdkit',
'lib/python%(pyshortver)s/site-packages/rdkit-%(version)s.dist-info'
],
}

sanity_check_commands = [
"python -c 'import rdkit.rdBase'",
]

moduleclass = 'chem'