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#
Adapter for the C2DB 2D-materials database (c2db.fysik.dtu.dk). |
Functions#
|
Extract the C2DB material UID from any accepted reference. |
|
Scrape |
Module Contents#
- 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
Nonewhen 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.DatabaseSourceAdapter for the C2DB 2D-materials database (c2db.fysik.dtu.dk).