Added ability to add compute specs to only a subset of entries in Dataset
@@ -1635,6 +1635,7 @@ class Dataset(Collection):
tag: Optional[str] = None,
priority: Optional[str] = None,
protocols: Optional[Dict[str, Any]] = None,
+ subset: Optional[Set[str]] = None
) -> ComputeResponse:
"""Executes a computational method for all reactions in the Dataset.
Previously completed computations are not repeated.
@@ -1656,6 +1657,8 @@ class Dataset(Collection):
protocols: Optional[Dict[str, Any]], optional
Protocols for store more or less data per field. Current valid
protocols: {'wavefunction'}
+ subset : Set[str], optional
+ Computes only a subset of the dataset.
Returns
-------
@@ -1668,6 +1671,9 @@ class Dataset(Collection):
self.get_entries(force=True)
compute_keys = {"program": program, "method": method, "basis": basis, "keywords": keywords}
+ if subset:
+ molecule_idx = set(subset)
+ else:
molecule_idx = [e.molecule_id for e in self.data.records]
ret = self._compute(compute_keys, molecule_idx, tag, priority, protocols)
