airsspy.volume_minsep_data#
Dataset helpers for volume and minsep predictors.
Module Contents#
Classes#
Aggregated volume target for one reduced formula. |
|
Aggregated minsep target for one formula and canonical pair. |
Functions#
Return a deterministic canonical pair tuple. |
|
Return a canonical pair key formatted as |
|
Parse a reduced formula into a composition dictionary. |
|
Return the number of atoms in one reduced formula unit. |
|
Return species present in a reduced formula. |
|
Enumerate all canonical species pairs implied by a formula. |
|
Load volume/minsep training records from disk. |
|
Normalize a structure’s cell volume by the number of atoms in the cell. |
|
Collapse mirrored minsep entries like |
|
Aggregate structure-level records into formula-level model targets. |
|
Serialize volume aggregate rows to dictionaries. |
|
Serialize pair aggregate rows to dictionaries. |
|
Return the minimum observed distance for each ordered species pair. |
|
Build raw minsep/volume rows from Materials Project-like documents. |
|
Build a raw minsep/volume dataset from a Materials Project document dump. |
|
Select the lowest-energy-above-hull row for each reduced formula. |
API#
- airsspy.volume_minsep_data.canonical_pair(symbol_a: str, symbol_b: str) tuple[str, str][source]#
Return a deterministic canonical pair tuple.
- airsspy.volume_minsep_data.canonical_pair_key(symbol_a: str, symbol_b: str) str[source]#
Return a canonical pair key formatted as
A-B.
- airsspy.volume_minsep_data.composition_dict_from_formula(formula: str) dict[str, float][source]#
Parse a reduced formula into a composition dictionary.
- airsspy.volume_minsep_data.formula_num_atoms(formula: str) float[source]#
Return the number of atoms in one reduced formula unit.
- airsspy.volume_minsep_data.formula_species(formula: str) tuple[str, ...][source]#
Return species present in a reduced formula.
- airsspy.volume_minsep_data.enumerate_formula_pairs(formula: str) list[tuple[str, str]][source]#
Enumerate all canonical species pairs implied by a formula.
- airsspy.volume_minsep_data.load_dataset_records(path: str | pathlib.Path) list[dict][source]#
Load volume/minsep training records from disk.
- airsspy.volume_minsep_data.volume_per_atom_from_record(record: dict) float[source]#
Normalize a structure’s cell volume by the number of atoms in the cell.
- airsspy.volume_minsep_data.canonical_minsep_map(record: dict) dict[str, float][source]#
Collapse mirrored minsep entries like
A-BandB-Ainto one key.
- class airsspy.volume_minsep_data.VolumeAggregate[source]#
Aggregated volume target for one reduced formula.
- class airsspy.volume_minsep_data.PairAggregate[source]#
Aggregated minsep target for one formula and canonical pair.
- airsspy.volume_minsep_data.aggregate_training_targets(records: collections.abc.Iterable[dict]) tuple[list[airsspy.volume_minsep_data.VolumeAggregate], list[airsspy.volume_minsep_data.PairAggregate], dict][source]#
Aggregate structure-level records into formula-level model targets.
- airsspy.volume_minsep_data.volume_rows_to_dicts(rows: collections.abc.Iterable[airsspy.volume_minsep_data.VolumeAggregate]) list[dict][source]#
Serialize volume aggregate rows to dictionaries.
- airsspy.volume_minsep_data.pair_rows_to_dicts(rows: collections.abc.Iterable[airsspy.volume_minsep_data.PairAggregate]) list[dict][source]#
Serialize pair aggregate rows to dictionaries.
- airsspy.volume_minsep_data.get_minsep_dict(structure: pymatgen.core.Structure, cutoff: float = 5.0) dict[str, float][source]#
Return the minimum observed distance for each ordered species pair.
- airsspy.volume_minsep_data.build_dataset_rows(docs: collections.abc.Iterable[dict[str, Any]], *, show_progress: bool = True) list[dict[str, Any]][source]#
Build raw minsep/volume rows from Materials Project-like documents.
- airsspy.volume_minsep_data.build_minsep_volume_dataset(*, mp_docs_path: str | pathlib.Path, output_path: str | pathlib.Path, show_progress: bool = True) dict[str, Any][source]#
Build a raw minsep/volume dataset from a Materials Project document dump.
- airsspy.volume_minsep_data.curate_minsep_volume_dataset(*, minsep_dataset_path: str | pathlib.Path, mp_docs_path: str | pathlib.Path, output_path: str | pathlib.Path) dict[source]#
Select the lowest-energy-above-hull row for each reduced formula.