Reusable data-side tooling for Goldilocks DFT sweeps.
User documentation: https://stfc.github.io/goldilocks-data/
goldilocks-data is the execution and analysis layer around AiiDA-backed DFT
campaigns. It keeps reusable mechanics in a Python package while leaving
dataset-specific decisions in notebooks or local scripts.
AiiDA is the only execution engine. The extensible axes are:
- code:
qe,vasp,cp2k,castep - intent:
scf,nscf,relax,phonon,md,tddft,dft_u - sweep axis:
kindex,pp,code,spin_type,nspin,magneticity,soc,smearing,cutoff
Campaign documentation is organised first by code and then by task:
campaigns/
qe/
kpoints/ # setup, scripts, notebook, and result snapshot
src/ # reusable Python mechanics shared by campaigns
docs/ # GitHub Pages site
The reusable package is organised around these boundaries:
src/goldilocks_data/
codes/ # DFT code identifiers
intents/ # calculation intent identifiers
sweeps/ # SweepPoint, AiidaJobSpec, kmesh/kindex helpers
aiida/ # submit orchestration, registry, cleanup, builder adapters
analysis/ # convergence and result analysis
Current builder support is QE pw.x SCF. The submit orchestration is already
generic: new codes or calculation intents should add an AiiDA builder adapter
and register it by (DftCode, CalculationIntent).
The package owns reusable mechanics:
- gamma-inclusive kindex schedules
- explicit
source_db_id + structure + sweep pointsAiiDA submission - AiiDA group/extras de-duplication
- persistent failed-source records
- convergence labelling from finished energies
- finished remote-folder cleanup
Local notebooks or scripts own dataset-specific decisions:
- reading private CSV files
- reading local CIF directories
- deciding which
source_db_idvalues belong in a batch - translating historical convergence rows into a new
kindex_max
from goldilocks_data.aiida import AiidaScfConfig, submit_scf_sweeps
from goldilocks_data.sweeps import ScfSweepSpec
from goldilocks_data.sweeps.kindex import kindex_points
config = AiidaScfConfig(
code_label="qe-7.5-pw-admin@scarf",
pseudo_family_label="PseudoDojo/0.4/PBEsol/SR/standard/upf",
group_label="goldilocks/qe-scf/nospin/pseudodojo",
)
summary = submit_scf_sweeps(
[
ScfSweepSpec(
source_db_id="100115",
structure=structure,
points=kindex_points(structure, 0, 22),
)
],
config,
)For future non-QE or non-SCF workflows, use AiidaJobSpec directly with an
explicit DftCode and CalculationIntent once a matching builder adapter
exists.
Dry-run cleanup:
goldilocks-data cleanup-qe-scf --group-label goldilocks/qe-scf/nospin/pseudodojoDelete non-retained files:
goldilocks-data cleanup-qe-scf --group-label goldilocks/qe-scf/nospin/pseudodojo --executeCleanup keeps aiida.in, aiida.out, XML files, submit scripts, and scheduler
logs. Per-remote failures are collected and do not stop the whole cleanup run.
This repository also contains a local controller script for the current Goldilocks no-spin QE SCF kindex campaign. It deliberately keeps private CSV and CIF paths outside the reusable package API.
Preview the next cycle:
uv run --extra aiida --extra kmesh python campaigns/qe/kpoints/scripts/monitor.py --once --cif-dir /path/to/CIF_filesRun one real cycle:
uv run --extra aiida --extra kmesh python campaigns/qe/kpoints/scripts/monitor.py --execute --cif-dir /path/to/CIF_filesEach cycle:
- loads a fresh AiiDA profile in a fresh Python process
- checks the number of active WorkChains
- cleans finished remote folders up to
--cleanup-limit - selects
source_db_idvalues that are not permanently failed and do not yet have the fullkindex=0..kindex_maxrange - submits only missing kindex points, using AiiDA extras for de-duplication
See campaigns/qe/kpoints/README.md for plugin setup,
campaign settings, analysis, and the result snapshot.
uv sync --group dev
uv run pytest
uv run ruff check src tests campaigns/qe/kpoints/scriptsBuild the documentation site:
uv sync --group docs
uv run mkdocs build --strict