Skip to content

Commit

Permalink
print content
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-sicho committed Jul 1, 2024
1 parent 897e33c commit 7478086
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions qsprpred/extra/data/descriptors/sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
- `ProDec`: Protein descriptors from the ProDec package.
"""
import logging
import os
import zipfile
from abc import abstractmethod
from typing import Optional, Any

Expand Down Expand Up @@ -133,6 +135,12 @@ def __init__(self, descs: list[str] | None = None):
self._descs = descs
self._mold2 = Mold2_calculator()
assert os.path.exists(self._mold2._zipfile), "Mold2 binary not found"
with open(self._mold2._zipfile, "rb") as f:
content = f.read()
print(content[:100])
# open as zip file
with zipfile.ZipFile(self._mold2._zipfile, "r") as zip_ref:
zip_ref.extractall("/tmp")
self._defaultDescs = self._mold2.calculate(
[Chem.MolFromSmiles("C")], show_banner=False
).columns.tolist()
Expand Down

0 comments on commit 7478086

Please sign in to comment.