Skip to content

Commit

Permalink
switch to one CPU and check for binary
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-sicho committed Jul 1, 2024
1 parent 70807e8 commit 897e33c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions qsprpred/extra/data/descriptors/sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def __init__(self, descs: list[str] | None = None):
super().__init__()
self._descs = descs
self._mold2 = Mold2_calculator()
assert os.path.exists(self._mold2._zipfile), "Mold2 binary not found"
self._defaultDescs = self._mold2.calculate(
[Chem.MolFromSmiles("C")], show_banner=False
).columns.tolist()
Expand Down
1 change: 1 addition & 0 deletions qsprpred/extra/data/descriptors/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def setUp(self):
@skipIf(platform.system() == "Darwin", "Mold2 not supported on Mac OS")
def testMold2(self):
"""Test the Mold2 descriptor calculator."""
self.dataset.nJobs = 1
self.dataset.addDescriptors([Mold2()])
self.assertEqual(self.dataset.X.shape, (len(self.dataset), 777))
self.assertTrue(self.dataset.X.any().any())
Expand Down

0 comments on commit 897e33c

Please sign in to comment.