airsspy.volume_minsep_data#

Dataset helpers for volume and minsep predictors.

Module Contents#

Classes#

VolumeAggregate

Aggregated volume target for one reduced formula.

PairAggregate

Aggregated minsep target for one formula and canonical pair.

Functions#

canonical_pair

Return a deterministic canonical pair tuple.

canonical_pair_key

Return a canonical pair key formatted as A-B.

composition_dict_from_formula

Parse a reduced formula into a composition dictionary.

formula_num_atoms

Return the number of atoms in one reduced formula unit.

formula_species

Return species present in a reduced formula.

enumerate_formula_pairs

Enumerate all canonical species pairs implied by a formula.

load_dataset_records

Load volume/minsep training records from disk.

volume_per_atom_from_record

Normalize a structure’s cell volume by the number of atoms in the cell.

canonical_minsep_map

Collapse mirrored minsep entries like A-B and B-A into one key.

aggregate_training_targets

Aggregate structure-level records into formula-level model targets.

volume_rows_to_dicts

Serialize volume aggregate rows to dictionaries.

pair_rows_to_dicts

Serialize pair aggregate rows to dictionaries.

get_minsep_dict

Return the minimum observed distance for each ordered species pair.

build_dataset_rows

Build raw minsep/volume rows from Materials Project-like documents.

build_minsep_volume_dataset

Build a raw minsep/volume dataset from a Materials Project document dump.

curate_minsep_volume_dataset

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-B and B-A into one key.

class airsspy.volume_minsep_data.VolumeAggregate[source]#

Aggregated volume target for one reduced formula.

reduced_formula: str#

None

num_atoms_in_formula: float#

None

n_structures: int#

None

volume_per_atom: float#

None

volume_per_atom_min: float#

None

volume_per_atom_max: float#

None

volume_per_atom_mad: float#

None

class airsspy.volume_minsep_data.PairAggregate[source]#

Aggregated minsep target for one formula and canonical pair.

reduced_formula: str#

None

pair_key: str#

None

num_atoms_in_formula: float#

None

n_observations: int#

None

minsep: float#

None

minsep_min: float#

None

minsep_max: float#

None

minsep_mad: float#

None

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.