Skip to content

Commit

Permalink
update driver to use QCArchiveDataset
Browse files Browse the repository at this point in the history
  • Loading branch information
ntBre committed Nov 7, 2024
1 parent e2d4c9e commit bf2f453
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from openff.toolkit.utils import OpenEyeToolkitWrapper
from yammbs import MoleculeStore
from yammbs.cached_result import CachedResultCollection
from yammbs.inputs import QCArchiveDataset

from config import Config

Expand Down Expand Up @@ -39,8 +39,9 @@ def _main(forcefield, dataset, sqlite_file, out_dir, procs, invalidate_cache):
store = MoleculeStore(sqlite_file)
else:
print(f"loading cached dataset from {dataset}", flush=True)
crc = CachedResultCollection.from_json(dataset)
store = MoleculeStore.from_cached_result_collection(crc, sqlite_file)
with open(dataset) as inp:
crc = QCArchiveDataset.model_validate_json(inp.read())
store = MoleculeStore.from_qcarchive_dataset(crc, sqlite_file)

print("started optimizing store", flush=True)
start = time.time()
Expand Down

0 comments on commit bf2f453

Please sign in to comment.