Maintenance#

Modifying metadata and defaults#

Various parameters that are set when creating a dataset can be later modified. These include the name, description, tags, tagline, and the default routing tag & priority. See the following functions:

>>> ds = get_dataset_by_id(123)
>>> ds.set_default_priority("low")
>>> ds.set_name("New Dataset Name")
>>> print(ds.name)
New Dataset Name

>>> print(ds.default_priority)
PriorityEnum.low

Renaming and Deleting Entries and Specifications#

Entries and specifications can be renamed and deleted. Deletion can also optionally delete the underlying record.

rename_entries() and rename_specification() take a dictionary of old name to new name

>>> ds.rename_entries({'difluorine': 'F2 molecule'})
>>> ent = ds.get_entry('F2 molecule')
>>> print(ent.initial_molecule)
initial_molecule=Molecule(name='F2', formula='F2', hash='7ffa835')

Entries and specifications are deleted with delete_entries() and delete_specification(). Note that deleting entries and specifications by default do not delete the records

>>> # Keeps any records, but removes from dataset
>>> ds.delete_entries(['carbon monoxide'])

>>> # Deletes the records too
>>> ds.delete_specification('hf/sto-3g', delete_records=True)

Record Management#

Records that belong to the dataset can be managed via the usual client methods (see Managing Records). However, datasets have convenient methods for management, which use entry and specification names rather than record.

These functions are similar to the client counterparts, but instead use entry and specification names.

In addition, individual records can be removed from a dataset (and optionally deleted) with remove_records().

>>> # Reset carbon monoxide records
>>> ds.reset_records(entry_names=['carbon monoxide'])

>>> # Cancel pbe0/def2-qzvp computations
>>> ds.cancel_records(specification_names=['pbe0/def2-qzvp'])

Internal Jobs#

Internal jobs associated with a dataset can be listed using list_internal_jobs(). These are InternalJob objects.

>>> ds.list_internal_jobs()
[InternalJob(id=1614530, name='create_attach_view_ds_414', status=<InternalJobStatusEnum.complete: 'complete'>, ...