stringforge.kklt_database.KKLTDatabase

Contents

stringforge.kklt_database.KKLTDatabase#

class stringforge.kklt_database.KKLTDatabase(tdf_db=None, hf_repo=None, cache_dir=None, offline=False, cache_mode='persistent', shard_cache_size=32, dataset=None)#

Bases: LCSDatabase

Advanced KKLT index interface: a curated subset of LCSDatabase (dataset="tdf").

This is specialised infrastructure for curated KKLT-style searches, not the default user entry point. The KKLT database does not duplicate Calabi-Yau geometry data. Every row in the local catalogs carries a logical link (ks_id, triang_id, tdf_conifold_id) into the full TDF dataset; physical shard coordinates are resolved on demand by the wrapped TDF database held on tdf.

Models are indexed by (ks_id, coni_class_id, coni_id). Conifolds sharing the same one-face divisor on a given polytope form a single coni_class; this grouping cuts across triangulations of the same polytope.

Three local catalogs live under <cache_dir>/kklt/:

  • catalog.parquet (polytope-grain): one row per ks_id with h11, h12, chi, n_rigids_dual, Q, n_coni_classes. All KKLT polytopes satisfy n_rigids_dual > h12; the historically well-studied subset Q >= 100 is a downstream DataFrame filter, not a build-time cut.

  • conifold_class_catalog.parquet: one row per (ks_id, coni_class_id).

  • conifold_catalog.parquet: one row per (ks_id, coni_class_id, coni_id), carrying the logical TDF link.

Optional local run_log.parquet records cluster runs (scope="class" or scope="conifold") for private/local run-tracking. Public designated vacuum records belong in the shared vacua_vault/kklt_vacua area.

A TDF-compat fingerprint (tdf_schema_version, tdf_catalog_sha256) is stored in schema.json at build time and re-checked on every instantiation. A mismatch raises a UserWarning pointing the user at rebuild_links().

Example usage:

from stringforge.kklt_database import KKLTDatabase
db = KKLTDatabase()
polys   = db.query_polytopes(Q_min=100)
classes = db.query_classes(ks_id=int(polys.iloc[0]["ks_id"]))
cfs     = db.query_conifolds(
    ks_id=int(polys.iloc[0]["ks_id"]),
    coni_class_id=int(classes.iloc[0]["coni_class_id"]),
)

See the module page for the curated public method index. The class page is kept as the canonical object target for cross-references and the general index.