From 4a3c4594785e55649f6f2ec68bc7d83090257991 Mon Sep 17 00:00:00 2001 From: sassy Date: Mon, 25 Mar 2024 23:02:35 +0000 Subject: [PATCH 1/3] adding easyconfigs: OpenBabel-3.1.1-gompi-2023a.eb and patches: OpenBabel-3.1.1_fix-ctime.patch --- .../OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb | 63 +++++++++++++++++++ .../OpenBabel/OpenBabel-3.1.1_fix-ctime.patch | 14 +++++ 2 files changed, 77 insertions(+) create mode 100644 easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb create mode 100644 easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1_fix-ctime.patch diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb new file mode 100644 index 00000000000..f4dfce952b7 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb @@ -0,0 +1,63 @@ +name = 'OpenBabel' +version = '3.1.1' + +homepage = 'https://openbabel.org' +description = """Open Babel is a chemical toolbox designed to speak the many + languages of chemical data. It's an open, collaborative project allowing anyone + to search, convert, analyze, or store data from molecular modeling, chemistry, + solid-state materials, biochemistry, or related areas.""" + +toolchain = {'name': 'gompi', 'version': '2023a'} +# avoid failing tests on skylake and broadwell CPUs. +# remove option 'optarch' when building on CPUs that don't support AVX2 +# see also: https://github.com/openbabel/openbabel/issues/2138 +toolchainopts = {'pic': True, 'optarch': 'mavx2'} + +source_urls = [GITHUB_LOWER_SOURCE] +sources = ['%%(namelower)s-%s.tar.gz' % version.replace('.', '-')] +patches = [ + # Fix test failure with Python 3 + # Ref: https://github.com/openbabel/openbabel/commit/7de27f309db5f7ec026ef5c5235e5b33bf7d1a85.patch + 'OpenBabel-3.1.1_fix-distgeom-test.patch', + 'OpenBabel-3.1.1_fix-CoordgenLibs-no-templates.patch', + 'OpenBabel-3.1.1_fix-ctime.patch', +] +checksums = [ + {'openbabel-3-1-1.tar.gz': 'c97023ac6300d26176c97d4ef39957f06e68848d64f1a04b0b284ccff2744f02'}, + {'OpenBabel-3.1.1_fix-distgeom-test.patch': '8d7687eb49142bb5ba2997cf90805b42480f313515c44b3912a9f826aaf4fbcd'}, + {'OpenBabel-3.1.1_fix-CoordgenLibs-no-templates.patch': + 'cc0396b38a78ef70c869cd93887210c64d6f4293c016aec9269b5a0230fdb51c'}, + {'OpenBabel-3.1.1_fix-ctime.patch': '79c5b7f65d99f42f039b3942bc52bae7363f3742a7e2564b5b7bfb29aa105b36'}, +] + +builddependencies = [ + ('CMake', '3.26.3'), + ('SWIG', '4.1.1'), +] +dependencies = [ + ('Python', '3.11.3'), + ('zlib', '1.2.13'), + ('libxml2', '2.11.4'), + ('Eigen', '3.4.0'), + ('RapidJSON', '1.1.0'), + ('cairo', '1.17.8'), # optional: for .png output + ('Boost', '1.82.0'), + ('maeparser', '1.3.1'), + ('CoordgenLibs', '3.0.2'), +] + +configopts = '-DBoost_INCLUDE_DIR=$EBROOTBOOST/include -DBoost_LIBRARY_DIR_RELEASE=$EBROOTBOOST/lib ' +# Enable support for OpenMP compilation of forcefield code (optional) +configopts += '-DENABLE_OPENMP=ON ' + +# OpenBabel-3.1.1 creates directories named 3.1.0, which leads to BABEL_LIBDIR and BABEL_DATDIR +# (set in the easyblock) having invalid values. Work around this with some symlinks. +postinstallcmds = [ + 'ln -s %(installdir)s/lib/openbabel/3.1.0 %(installdir)s/lib/openbabel/%(version)s', + 'ln -s %(installdir)s/share/openbabel/3.1.0 %(installdir)s/share/openbabel/%(version)s', +] + +pretestopts = 'cp lib/_openbabel.%s %%(builddir)s/openbabel-*/scripts/python/openbabel/ && ' % SHLIB_EXT +runtest = 'test' + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1_fix-ctime.patch b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1_fix-ctime.patch new file mode 100644 index 00000000000..85457db3284 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1_fix-ctime.patch @@ -0,0 +1,14 @@ + included +Author: J. Sassmannshausen (Imperial College London/UK) +diff --git a/openbabel-openbabel-3-1-1.orig/include/openbabel/obutil.h b/openbabel-openbabel-3-1-1/include/openbabel/obutil.h +index 233ab0b..4ff35f0 100644 +--- a/openbabel-openbabel-3-1-1.orig/include/openbabel/obutil.h ++++ b/openbabel-openbabel-3-1-1/include/openbabel/obutil.h +@@ -37,6 +37,7 @@ GNU General Public License for more details. + #endif + + #include ++#include + + #ifndef M_PI + #define M_PI 3.14159265358979323846 From 39f88509089bab9e04033367a5f262e0f8efe6cc Mon Sep 17 00:00:00 2001 From: sassy Date: Wed, 27 Mar 2024 15:51:09 +0000 Subject: [PATCH 2/3] =?UTF-8?q?Added=20=C3=85ke=20patch=20to=20use=20Rapid?= =?UTF-8?q?JSON-1.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb | 2 + .../OpenBabel-3.1.1_disable_bad_tests.patch | 519 ++++++++++++++++++ 2 files changed, 521 insertions(+) create mode 100644 easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1_disable_bad_tests.patch diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb index f4dfce952b7..d5296c7159e 100644 --- a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb +++ b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb @@ -20,6 +20,7 @@ patches = [ # Ref: https://github.com/openbabel/openbabel/commit/7de27f309db5f7ec026ef5c5235e5b33bf7d1a85.patch 'OpenBabel-3.1.1_fix-distgeom-test.patch', 'OpenBabel-3.1.1_fix-CoordgenLibs-no-templates.patch', + 'OpenBabel-3.1.1_disable_bad_tests.patch', 'OpenBabel-3.1.1_fix-ctime.patch', ] checksums = [ @@ -27,6 +28,7 @@ checksums = [ {'OpenBabel-3.1.1_fix-distgeom-test.patch': '8d7687eb49142bb5ba2997cf90805b42480f313515c44b3912a9f826aaf4fbcd'}, {'OpenBabel-3.1.1_fix-CoordgenLibs-no-templates.patch': 'cc0396b38a78ef70c869cd93887210c64d6f4293c016aec9269b5a0230fdb51c'}, + {'OpenBabel-3.1.1_disable_bad_tests.patch': 'a88f54d834cc181ac66d98f0040dbfadabe9d3ef1bee7305f8e73c31c20f9de2'}, {'OpenBabel-3.1.1_fix-ctime.patch': '79c5b7f65d99f42f039b3942bc52bae7363f3742a7e2564b5b7bfb29aa105b36'}, ] diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1_disable_bad_tests.patch b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1_disable_bad_tests.patch new file mode 100644 index 00000000000..b0814fe6111 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1_disable_bad_tests.patch @@ -0,0 +1,519 @@ +Disable tests that do textual compare of numerical values. +Some of these values may vary on the last one or two digits. + +Åke Sandgren, 2024-03-27 +diff -ru openbabel-openbabel-3-1-1.orig/test/testobconv_writers.py openbabel-openbabel-3-1-1/test/testobconv_writers.py +--- openbabel-openbabel-3-1-1.orig/test/testobconv_writers.py 2020-05-08 17:38:02.000000000 +0200 ++++ openbabel-openbabel-3-1-1/test/testobconv_writers.py 2024-03-27 08:19:01.012651395 +0100 +@@ -669,81 +669,82 @@ + """) + + # cdjson -- ChemDoodle JSON +-class TestCDJSON(unittest.TestCase, WriteMixin): +- fmt = "cdjson" +- maxDiff = None +- def test_default(self): +- self.assertWriters(self.fmt, """\ +-{ +- "m": [ +- { +- "a": [ +- { +- "x": 31.692, +- "y": -0.498 +- }, +- { +- "x": 31.406, +- "y": 19.51 +- }, +- { +- "x": 48.59, +- "y": 29.764 +- }, +- { +- "x": 66.062, +- "y": 20.008 +- }, +- { +- "x": 66.35, +- "y": -0.0 +- }, +- { +- "x": 0.0, +- "y": 0.0 +- }, +- { +- "x": -20.009999999999999, +- "y": 0.10200000000000001, +- "l": 8 +- } +- ], +- "b": [ +- { +- "b": 0, +- "e": 5, +- "o": 2 +- }, +- { +- "b": 0, +- "e": 1 +- }, +- { +- "b": 1, +- "e": 2, +- "o": 2 +- }, +- { +- "b": 2, +- "e": 3 +- }, +- { +- "b": 3, +- "e": 4, +- "o": 2 +- }, +- { +- "b": 4, +- "e": 5 +- }, +- { +- "b": 5, +- "e": 6 +- } +- ] +- } +- ] +-}""") ++## Should never do pure textual compare of numerical values. ++## class TestCDJSON(unittest.TestCase, WriteMixin): ++## fmt = "cdjson" ++## maxDiff = None ++## def test_default(self): ++## self.assertWriters(self.fmt, """\ ++## { ++## "m": [ ++## { ++## "a": [ ++## { ++## "x": 31.692, ++## "y": -0.498 ++## }, ++## { ++## "x": 31.406, ++## "y": 19.51 ++## }, ++## { ++## "x": 48.59, ++## "y": 29.764 ++## }, ++## { ++## "x": 66.062, ++## "y": 20.008 ++## }, ++## { ++## "x": 66.35, ++## "y": -0.0 ++## }, ++## { ++## "x": 0.0, ++## "y": 0.0 ++## }, ++## { ++## "x": -20.009999999999999, ++## "y": 0.10200000000000001, ++## "l": 8 ++## } ++## ], ++## "b": [ ++## { ++## "b": 0, ++## "e": 5, ++## "o": 2 ++## }, ++## { ++## "b": 0, ++## "e": 1 ++## }, ++## { ++## "b": 1, ++## "e": 2, ++## "o": 2 ++## }, ++## { ++## "b": 2, ++## "e": 3 ++## }, ++## { ++## "b": 3, ++## "e": 4, ++## "o": 2 ++## }, ++## { ++## "b": 4, ++## "e": 5 ++## }, ++## { ++## "b": 5, ++## "e": 6 ++## } ++## ] ++## } ++## ] ++## }""") + + ## # cdxml -- ChemDraw CDXML format + ## XXX fails on an unpatched system +@@ -2754,179 +2755,180 @@ + """) + + # pcjson -- PubChem JSON +-class TestPCJSON(unittest.TestCase, WriteMixin): +- fmt = "pcjson" +- maxDiff = None +- def test_default(self): +- self.assertWriters(self.fmt, """\ +-{ +- "PC_Compounds": [ +- { +- "atoms": { +- "aids": [ +- 1, +- 2, +- 3, +- 4, +- 5, +- 6, +- 7, +- 8, +- 9, +- 10, +- 11, +- 12, +- 13 +- ], +- "element": [ +- 6, +- 6, +- 6, +- 6, +- 6, +- 6, +- 8, +- 1, +- 1, +- 1, +- 1, +- 1, +- 1 +- ] +- }, +- "bonds": { +- "aid1": [ +- 1, +- 1, +- 2, +- 3, +- 4, +- 5, +- 6, +- 1, +- 2, +- 3, +- 4, +- 5, +- 7 +- ], +- "aid2": [ +- 6, +- 2, +- 3, +- 4, +- 5, +- 6, +- 7, +- 8, +- 9, +- 10, +- 11, +- 12, +- 13 +- ], +- "order": [ +- 2, +- 1, +- 2, +- 1, +- 2, +- 1, +- 1, +- 1, +- 1, +- 1, +- 1, +- 1, +- 1 +- ] +- }, +- "coords": [ +- { +- "type": [ +- 1 +- ], +- "aids": [ +- 1, +- 2, +- 3, +- 4, +- 5, +- 6, +- 7, +- 8, +- 9, +- 10, +- 11, +- 12, +- 13 +- ], +- "conformers": [ +- { +- "x": [ +- 1.5846, +- 1.5703, +- 2.4295, +- 3.3031, +- 3.3175, +- 0.0, +- -1.0005, +- 2.313816216007316, +- 0.669250157347277, +- 2.4146659588503769, +- 4.189331679349326, +- 4.052466878708012, +- -1.4648575597102012 +- ], +- "y": [ +- 1.5846, +- 1.5703, +- 2.4295, +- 3.3031, +- 3.3175, +- 0.0, +- -1.0005, +- 2.313816216007316, +- 0.669250157347277, +- 2.4146659588503769, +- 4.189331679349326, +- 4.052466878708012, +- -1.4648575597102012 +- ], +- "style": { +- "annotation": [ +- 8, +- 8, +- 8, +- 8, +- 8, +- 8 +- ], +- "aid1": [ +- 1, +- 1, +- 2, +- 3, +- 4, +- 5 +- ], +- "aid2": [ +- 6, +- 2, +- 3, +- 4, +- 5, +- 6 +- ] +- } +- } +- ] +- } +- ], +- "charge": 0 +- } +- ] +-}""") ++## Should never do pure textual compare of numerical values. ++## class TestPCJSON(unittest.TestCase, WriteMixin): ++## fmt = "pcjson" ++## maxDiff = None ++## def test_default(self): ++## self.assertWriters(self.fmt, """\ ++## { ++## "PC_Compounds": [ ++## { ++## "atoms": { ++## "aids": [ ++## 1, ++## 2, ++## 3, ++## 4, ++## 5, ++## 6, ++## 7, ++## 8, ++## 9, ++## 10, ++## 11, ++## 12, ++## 13 ++## ], ++## "element": [ ++## 6, ++## 6, ++## 6, ++## 6, ++## 6, ++## 6, ++## 8, ++## 1, ++## 1, ++## 1, ++## 1, ++## 1, ++## 1 ++## ] ++## }, ++## "bonds": { ++## "aid1": [ ++## 1, ++## 1, ++## 2, ++## 3, ++## 4, ++## 5, ++## 6, ++## 1, ++## 2, ++## 3, ++## 4, ++## 5, ++## 7 ++## ], ++## "aid2": [ ++## 6, ++## 2, ++## 3, ++## 4, ++## 5, ++## 6, ++## 7, ++## 8, ++## 9, ++## 10, ++## 11, ++## 12, ++## 13 ++## ], ++## "order": [ ++## 2, ++## 1, ++## 2, ++## 1, ++## 2, ++## 1, ++## 1, ++## 1, ++## 1, ++## 1, ++## 1, ++## 1, ++## 1 ++## ] ++## }, ++## "coords": [ ++## { ++## "type": [ ++## 1 ++## ], ++## "aids": [ ++## 1, ++## 2, ++## 3, ++## 4, ++## 5, ++## 6, ++## 7, ++## 8, ++## 9, ++## 10, ++## 11, ++## 12, ++## 13 ++## ], ++## "conformers": [ ++## { ++## "x": [ ++## 1.5846, ++## 1.5703, ++## 2.4295, ++## 3.3031, ++## 3.3175, ++## 0.0, ++## -1.0005, ++## 2.313816216007316, ++## 0.669250157347277, ++## 2.4146659588503769, ++## 4.189331679349326, ++## 4.052466878708012, ++## -1.4648575597102012 ++## ], ++## "y": [ ++## 1.5846, ++## 1.5703, ++## 2.4295, ++## 3.3031, ++## 3.3175, ++## 0.0, ++## -1.0005, ++## 2.313816216007316, ++## 0.669250157347277, ++## 2.4146659588503769, ++## 4.189331679349326, ++## 4.052466878708012, ++## -1.4648575597102012 ++## ], ++## "style": { ++## "annotation": [ ++## 8, ++## 8, ++## 8, ++## 8, ++## 8, ++## 8 ++## ], ++## "aid1": [ ++## 1, ++## 1, ++## 2, ++## 3, ++## 4, ++## 5 ++## ], ++## "aid2": [ ++## 6, ++## 2, ++## 3, ++## 4, ++## 5, ++## 6 ++## ] ++## } ++## } ++## ] ++## } ++## ], ++## "charge": 0 ++## } ++## ] ++## }""") + + # pcm -- PCModel Format + class TestPCM(unittest.TestCase, WriteMixin): From 1e6dce0511f137e20877fd1d49d472c0608d5fa5 Mon Sep 17 00:00:00 2001 From: sassy Date: Wed, 27 Mar 2024 17:10:59 +0000 Subject: [PATCH 3/3] RapidJSON corrected --- .../easyconfigs/o/OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb index d5296c7159e..2316351baa8 100644 --- a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb +++ b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-3.1.1-gompi-2023a.eb @@ -41,7 +41,7 @@ dependencies = [ ('zlib', '1.2.13'), ('libxml2', '2.11.4'), ('Eigen', '3.4.0'), - ('RapidJSON', '1.1.0'), + ('RapidJSON', '1.1.0-20230928'), ('cairo', '1.17.8'), # optional: for .png output ('Boost', '1.82.0'), ('maeparser', '1.3.1'),