Common Tasks

Check computation progress

The FractalClient.query_tasks method returns information on active tasks.

client = qcportal.FractalClient(...)
client.query_tasks(status='WAITING')  # return tasks in queue
client.query_tasks(status='RUNNING')  # return running tasks

The tag and manager fields may be used to find only your tasks.

Find Errors and Restart Jobs

Some jobs may fail, and will end up in the ERROR state.

myerrs = client.query_tasks(status='ERROR')  # return errored tasks

Errored jobs may be inspected:

record = client.query_results(mye[0][0]
print(record.stdout)  # Standard output
print(record.stderr)  # Standard error
print(client.query_kvstore(record.error)[0])  # Error message

and restarted:

res = client.modify_tasks("restart", [ for e in myerrs])

Delete a column

You may wish to remove a model from a Dataset or ReactionDataset. Models are stored in, and can be removed from there:

# Output e.g.
# {('energy', 'psi4', 'b3lyp', 'def2-svp', 'scf_default'),
# ('energy', 'psi4', 'hf', 'sto-3g', 'scf_default'),
# ('energy', 'psi4', 'lda', 'sto-3g', 'scf_default')}'energy', 'psi4', 'lda', 'sto-3g', 'scf_default'))

ds = client.get_collection(...)
# Output e.g.
# {('energy', 'psi4', 'b3lyp', 'def2-svp', 'scf_default'),
# ('energy', 'psi4', 'hf', 'sto-3g', 'scf_default')}

See also

Many examples of interacting with collections hosted on QCArchive are provided on the QCArchive Examples page.