PAOFLOW.gen.qe_input.sources.c2db#

C2DB (Computational 2D Materials Database) adapter.

Resolves a C2DB reference (material UID such as 2C-1, a material-page URL https://c2db.fysik.dtu.dk/material/<uid>, or a bare c2db:<uid> token), downloads the per-material structure JSON, and scrapes the HTML overview table for the band gap and magnetic flag. Everything is normalized into a MaterialRecord flagged as two-dimensional.

Only the Python standard library and numpy are used (no ASE dependency): the C2DB structure download is a minimal ASE-atoms dict that json parses directly.

Attributes#

Classes#

C2dbSource

Adapter for the C2DB 2D-materials database (c2db.fysik.dtu.dk).

Functions#

resolve_uid(identifier)

Extract the C2DB material UID from any accepted reference.

scrape_overview(html)

Scrape (gap_eV, magnetic) from a C2DB material page.

Module Contents#

PAOFLOW.gen.qe_input.sources.c2db.C2DB_HOST = 'https://c2db.fysik.dtu.dk'[source]#
PAOFLOW.gen.qe_input.sources.c2db.resolve_uid(identifier)[source]#

Extract the C2DB material UID from any accepted reference.

PAOFLOW.gen.qe_input.sources.c2db.scrape_overview(html)[source]#

Scrape (gap_eV, magnetic) from a C2DB material page.

Each value is None when it cannot be located, so the caller can fall back to a CLI override.

class PAOFLOW.gen.qe_input.sources.c2db.C2dbSource[source]#

Bases: PAOFLOW.gen.qe_input.sources.base.DatabaseSource

Adapter for the C2DB 2D-materials database (c2db.fysik.dtu.dk).

name = 'c2db'[source]#
matches(identifier)[source]#

Return True if identifier belongs to this database.

fetch(identifier, metallic=None, magnetic=None, kpoints=None, **options)[source]#

Download and normalize identifier into a MaterialRecord.