license: gpl-3.0
task_categories:
- other
pretty_name: cy-database — Calabi–Yau geometries for string-compactification workflows
tags:
- physics
- string-theory
- flux-compactifications
- calabi-yau
- mathematics
- mirror-symmetry
size_categories:
- 1M<n<10M
cy-database — Calabi–Yau geometries for string-compactification workflows
Precomputed Calabi–Yau threefold data, organised as a family of sub-datasets, accessed through the stringforge infrastructure package. Each sub-dataset covers one class of Calabi–Yau constructions and is keyed by a class-specific identifier system.
This top-level card describes the conventions, layout, and loading interface that are common to all sub-datasets. Each sub-dataset has its own card with construction-specific details.
Available sub-datasets
| Sub-dataset | Construction class | Identifier | Status | Card |
|---|---|---|---|---|
tdf/ |
Trilayer, double favourable toric hypersurfaces from the Kreuzer–Skarke list | (ks_id, triang_id) |
Available | TDF card |
cicy/ |
Complete-intersection Calabi–Yau threefolds | cicy_id |
Available | CICY card |
kklt/ |
Curated KKLT index over tdf/ (one-face-divisor conifold classes) |
(ks_id, coni_class_id, coni_id) |
Available | KKLT card |
Quick start
pip install stringforge
from stringforge import CYDatabase, TDFDatabase, CICYDatabase, LCSDatabase, KKLTDatabase
# 1. Pure I/O on the TDF sub-dataset (no JAXVacua import)
db = TDFDatabase() # downloads catalogue only (~10 MB)
df = db.query(h11=2, has_conifolds=True) # catalogue-level filter, no shard I/O
# 2. Same as 1, but in mirror convention and producing JAXVacua model objects
lcs = LCSDatabase(dataset="tdf") # mirror-convention wrapper
tree = lcs.load( # returns a jaxvacua.lcs.lcs_tree
ks_id=int(df.iloc[0]["ks_id"]),
triang_id=int(df.iloc[0]["triang_id"]),
h12=int(df.iloc[0]["h12"]), # h12 in mirror convention
include_gv=True,
include_conifolds=True,
)
# 3. Plain CICY access
cicy = CICYDatabase()
cicy_df = cicy.query(h11=3)
# 4. Curated KKLT index (logical links into TDF; no geometry duplication)
kklt = KKLTDatabase()
polys = kklt.query_polytopes(Q_min=100)
The LCSDatabase class is the recommended entry point for JAXVacua workflows: it operates in the mirror convention used by lcs_tree / FluxVacuaFinder and exposes load_model(...) to construct a fully initialised FluxVacuaFinder in one call.
Repository layout
aschachner/cy-database/
README.md ← this file (umbrella card)
tdf/ ← Trilayer, Double Favourable toric models
README.md ← TDF card
catalog.parquet
conifold_catalog.parquet
schema.json
manifest.json
lcs_data/h11_{N}/
gv/h11_{N}/
conifolds/h11_{N}/
polytope/
extra/
cicy/ ← Complete-intersection threefolds
README.md ← CICY card
catalog.parquet
schema.json
manifest.json
lcs_data/h11_{N}/
gv/
kklt/ ← Curated KKLT index over tdf/
README.md ← KKLT card
catalog.parquet ← polytope-grain
conifold_class_catalog.parquet ← class-grain
conifold_catalog.parquet ← conifold-grain (with TDF link)
schema.json
gv/h11_{N}/
Shared design
All sub-datasets follow the same conventions.
Format
- Apache Parquet shards for all bulk data.
- One small
catalog.parquetper sub-dataset, serving as the lazy-download entry point. KKLT additionally carries a class-grain and a conifold-grain catalogue.
Lazy, on-demand access
The stringforge.cy_io.CYDatabase class downloads only the files required by a given query:
db.query(...)→ catalogue only (~10 MB).db.load(...)→ catalogue + the specific shard(s) needed for one model.db.load_batch(...)→ catalogue + shards for a batch of models.
Constructing a database object performs no network access; the first query downloads the catalogue, and only subsequent model-loading steps download shard files.
Cache modes
cache_mode="persistent"(default): shards are cached in memory (LRU) and on disk. Optimal for repeated access.cache_mode="none": shards are downloaded, the requested row is read, and the file is deleted immediately. Ideal for scanning millions of models without filling local disk.
Offline mode
For HPC clusters without outbound network access, set offline=True. All data is served from the local cache; any missing shard raises FileNotFoundError instead of triggering a network call. The common pattern is to warm the cache on a login node and replay on worker nodes.
Schema versioning
Each sub-dataset carries a schema.json file with an integer schema_version. CYDatabase checks it against the client library's stringforge.SCHEMA_VERSION and raises a clear SchemaVersionError on incompatibility.
Bucketing by $h^{1,1}$
Where row sizes scale strongly with $h^{1,1}$ (e.g. triple intersection tensors are $O(h^3)$), data is sub-bucketed by $h^{1,1}$ (directories named h11_{N}/). This keeps small-$h^{1,1}$ users from downloading large-$h^{1,1}$ data, and vice versa. Flat splits (small, uniform rows) are not bucketed.
Adaptive shard sizing
For large buckets (e.g. conifolds at high $h^{1,1}$ with millions of rows), shard sizes are chosen adaptively to target ≈ 30 files per bucket, clamped to $[500,; 50,000]$ rows. See each sub-dataset's card for specifics.
Mirror convention
Catalogues store h11 and h12 in catalogue convention (typically small h11, large h12). JAXVacua works in the mirror convention (the two are swapped). Use stringforge.lcs_database.LCSDatabase — which inherits from CYDatabase — when working with mirror-convention models; it transparently swaps the two columns at the boundary.
Loading without stringforge
All sub-datasets are plain Parquet and can be read with any compatible tool:
import pandas as pd
from huggingface_hub import hf_hub_download
catalog_path = hf_hub_download(
repo_id="aschachner/cy-database",
filename="tdf/catalog.parquet",
repo_type="dataset",
)
catalog = pd.read_parquet(catalog_path)
Each catalogue contains (shard_id, row_index) pointers into the sub-dataset's data splits, so you can resolve individual rows by path construction. See each sub-dataset card for the catalogue schema and resolved path templates.
Versioning and rebuilds
Builds are incremental: unchanged models (tracked by SHA-256 hash of their source files) are skipped, and only new or changed models are appended. Major layout changes bump SCHEMA_VERSION in stringforge/cy_io.py.
Scope and limitations
- Data is precomputed; not all fields are present for every model. Use
has_gv=True,has_conifolds=True, etc. to filter inquery(). - Catalogues use pandas nullable
Int64for optional shard pointers; consumers that do not support nullable integers should cast or drop missing rows. - Sub-datasets are independent: different constructions live in separate top-level directories and use different identifier schemes.
Citation
If you use this dataset, please cite:
@article{XXX
}
Licence
GPL-3.0, matching the stringforge and jaxvacua libraries.
Contact
Issues, questions, and contributions: https://github.com/AndreasSchachner/stringforge/issues.