quacc

raw JSON →
1.2.6 verified Sat May 09 auth: no python

A platform for high-throughput, database-driven quantum chemistry and computational materials science. Current version: 1.2.6. Release cadence: monthly.

pip install quacc
error ModuleNotFoundError: No module named 'quacc'
cause quacc requires Python >=3.11
fix
Upgrade Python to 3.11 or higher, then pip install quacc
error AttributeError: module 'quacc' has no attribute 'Flow'
cause Importing from the wrong location or using an older version
fix
Use from quacc import Flow (not from quacc.flow import Flow). Upgrade to >=1.0.
error ValueError: Unknown recipe decorator
cause The @recipe decorator was introduced in v1.2.0
fix
Upgrade quacc to >=1.2.0: pip install --upgrade quacc
breaking In v1.0, the database backend was changed from SQLite to a custom JSON-based store. Existing databases are not compatible.
fix Export your old data using quacc<1.0 and re-import with quacc>=1.0.
gotcha The QUACC_DB_FILE environment variable must be set before importing quacc, otherwise a temporary file is used.
fix Set os.environ['QUACC_DB_FILE'] = 'my_db.json' before importing quacc.
deprecated The quacc.database module is deprecated in favor of top-level functions.
fix Use from quacc import get, put instead of from quacc.database import get, put.

Basic usage: define a recipe and run it in a Flow.

import os
os.environ['QUACC_DB_FILE'] = os.environ.get('QUACC_DB_FILE', 'quacc.db')
from quacc import Flow, get, recipe

# Define a simple relaxation workflow
@recipe
def relax(atoms, calculator):
    atoms.calc = calculator
    atoms.get_potential_energy()
    return atoms

# Run the flow
flow = Flow()
flow.add(relax, atoms=...)
flow.run()