stringforge.cy_io.CYDatabase

Contents

stringforge.cy_io.CYDatabase#

class stringforge.cy_io.CYDatabase(dataset='tdf', hf_repo='aschachner/cy-database', cache_dir=None, offline=False, shard_cache_size=32, cache_mode='persistent')#

Bases: object

Pure-I/O interface for Calabi-Yau geometry data stored in the HuggingFace-hosted cy-database.

The database is organised into sub-datasets (dataset parameter):

  • "tdf": toric models from the Kreuzer-Skarke list, identified by (ks_id, triang_id) in catalogue convention.

  • "cicy": Complete Intersection Calabi-Yau models, identified by cicy_id.

  • "kklt": curated KKLT search index with logical links back to TDF.

CYDatabase downloads catalogues and parquet shards lazily, caches them locally, supports offline operation, and exposes tabular query helpers. It intentionally has no JAXVacua dependency and does not construct lcs_tree or FluxVacuaFinder objects. Use stringforge.lcs_database.LCSDatabase for that model-loading bridge.

Example usage:

db = CYDatabase(dataset="tdf")
rows = db.query(h11=2, has_conifolds=True)
poly = db.get_polytope(ks_id=int(rows.iloc[0]["ks_id"]), h11=2)

offline_db = CYDatabase.from_local("./.stringforge_cache", dataset="tdf")

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.