Skip to main content

goldilocks-core

Goldilocks recommends settings for density functional theory (DFT) calculations and generates Quantum ESPRESSO input files (SCF, DOS, relaxation, and variable-cell relaxation) from a crystal structure.

Installation

Not published to PyPI yet -- clone the repository. Install uv first:

git clone https://github.com/junwen94/goldilocks-core.git
cd goldilocks-core
uv sync

Try it

Start the Workbench

With Node.js 24 or newer installed, run:

uv sync --extra http
npm --prefix web ci
uv run goldilocks assets install workbench
uv run --extra http poe workbench

The asset step installs the models and pseudopotential tables. Open http://127.0.0.1:5173, upload a CIF or POSCAR, review the recommended settings, and download the generated inputs.

For a built frontend instead, stop the development servers and run:

uv run --extra http poe stage

Then open http://127.0.0.1:8000. See the Workbench guide for Docker and development checks.

With mMACE (ML-backed magnetism features)

Without any extra setup, magnetism classification (is_magnetic) and magnetic-ordering ranking run at a heuristic/LLM tier. To get the real ML tier, install mace/e3nn/sphericart and a checkpoint file once, manually -- none of this can ever be a pip/uv extra (the mace fork it needs has no PyPI release):

uv pip install ase==3.28.0 e3nn==0.4.4 sphericart==1.0.9 sphericart-torch==1.0.9
uv pip install "mace-torch @ git+https://github.com/CheukHinHoJerry/mace.git@19cdf6692c48e068a24e06cfe1ffc670e8aea3dd"
mkdir -p ~/.local/share/goldilocks/mmace
curl -L -o ~/.local/share/goldilocks/mmace/mace_matpes_pbe_baseline_run-3.model \
  https://data-collections.psdi.ac.uk/api/records/1g8rw-q8128/files/mace_matpes_pbe_baseline_run-3.model/content
export GOLDILOCKS_MACE_BACKBONE=~/.local/share/goldilocks/mmace/mace_matpes_pbe_baseline_run-3.model

Then start the Workbench as above in the same shell (the backend only picks up GOLDILOCKS_MACE_BACKBONE if it's set before launch). Load a magnetic structure (e.g. src/goldilocks_core/examples/structures/Fe_bcc.cif) and check the Analysis column's "is magnetic" field: its caption switches to "Goldilocks-ML prediction" once the ml tier is live.

Two gotchas worth knowing up front: uv sync silently removes the two manually-installed packages again (they're not in uv.lock) -- re-run the uv pip install lines above after any uv sync; and the Workbench's own "Run mMACE" ranking button is currently broken (stfc/goldilocks-ml#95) -- use uv run goldilocks magnetic-orderings --rank-with-mmace from the CLI for ranking instead. Checksum verification and full troubleshooting: mMACE setup.

Generate inputs from the command line

Download the prediction models and default pseudopotential table, then generate inputs for the bundled silicon structure:

uv run goldilocks assets install default
uv run goldilocks run src/goldilocks_core/examples/structures/Si.cif --out si-run

Open si-run/scf.in to see the input. The directory also contains the pseudopotential file, a submission script, and goldilocks.json (full provenance for every setting).

Treat the recommended settings as a starting point: review warnings and check convergence for your calculation. The quickstart explains the output and how to run it.

Guides and reference

Licence

Code: BSD 3-Clause. Documentation under docs/ and example structures: CC BY 4.0. Downloaded pseudopotentials retain their upstream licences.

Release files for goldilocks-core 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for goldilocks-core 0.1.0
File Size Uploaded
goldilocks_core-0.1.0.tar.gz 210.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for goldilocks-core 0.1.0
File Interpreter ABI Platform
goldilocks_core-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 473.8 kB

Release files / goldilocks_core-0.1.0.tar.gz

Download URL goldilocks_core-0.1.0.tar.gz
Size 210.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f7345c619b721b237aebc5a7f6f37d6074366886b06f29e44bb0dbc048c949bc
BLAKE2b-256 checksum
How to use checksums
60b9d2bb9a17dd32ceb7dd0c3bb3d860f2b1c5f38c98ff9e010004113bca6284
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / goldilocks_core-0.1.0-py3-none-any.whl

Download URL goldilocks_core-0.1.0-py3-none-any.whl
Size 263.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba806e2adc332a79e1c2eeeee4c4cbbe43008b0f06a04f03198e316d31a516fa
BLAKE2b-256 checksum
How to use checksums
776e4f51a617131bdecf0f004a9848369a488d97bbb3f3cce8a733d3654b4d4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page