Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation #8

Merged
merged 13 commits into from
Oct 15, 2023
Prev Previous commit
Merge branch 'main' into docs
  • Loading branch information
shenoynikhil authored Oct 15, 2023
commit 8af214b4a7b025b01d5fb3a418597dbd00232594
11 changes: 9 additions & 2 deletions src/openqdc/datasets/orbnet_denali.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from openqdc.utils.molecule import atom_table


def read_mol(mol_id, conf_dict, base_path, energy_target_names: List[str]) -> Dict[str, np.ndarray]:
def read_archive(mol_id, conf_dict, base_path, energy_target_names: List[str]) -> Dict[str, np.ndarray]:
res = []
for conf_id, conf_label in conf_dict.items():
try:
Expand Down Expand Up @@ -71,7 +71,14 @@ def read_raw_entries(self):
for mol_id, group in df.groupby("mol_id")
}

fn = lambda x: read_mol(x[0], x[1], self.root, self.energy_target_names)
# print(df.head())
# tmp = df.to_dict('index')
# for i, k in enumerate(tmp):
# print(k, tmp[k])
# if i > 10:
# break
# exit()
fn = lambda x: read_archive(x[0], x[1], self.root, self.energy_target_names)
res = dm.parallelized(fn, list(labels.items()), scheduler="threads", n_jobs=-1, progress=True)
samples = sum(res, [])
return samples
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.