-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
automate figshare data file article CRUD
- update keywords in pyproject.toml to better reflect growing benchmark scope - add script for EDA of 103 phononDB PBE structures in data/phonons/phonondb_103_pbe_eda.py - data-files.yml add MD5 checksums for data integrity - data.py add new data file path for phononDB structures - better error handling Figshare upload scripts - more figshare module unit tests
- Loading branch information
Showing
16 changed files
with
761 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
"""Exploratory data analysis of the 103 structures in Togo's phononDB PBE dataset. | ||
Used for the anharmonic phonon analysis, specifically the thermal conductivity kappa. | ||
See https://github.com/atztogo/phonondb/blob/bba206/README.md#url-links-to-phono3py- | ||
finite-displacement-method-inputs-of-103-compounds-on-mdr-at-nims-pbe for details. | ||
""" | ||
|
||
# %% | ||
from collections import defaultdict | ||
|
||
import ase.io | ||
import moyopy | ||
import moyopy.interface | ||
import pymatviz as pmv | ||
|
||
from matbench_discovery.data import DataFiles | ||
|
||
__date__ = "2025-01-14" | ||
|
||
|
||
# %% | ||
atoms_list = ase.io.read(DataFiles.phonondb_pbe_structures.path, index=":") | ||
|
||
|
||
# %% visually inspect first 12 structures | ||
fig = pmv.structure_3d_plotly(atoms_list[:12], n_cols=3, scale=0.5) | ||
fig.show() | ||
|
||
|
||
# %% | ||
elem_counts: dict[str, int] = defaultdict(int) | ||
for atoms in atoms_list: | ||
for symb in atoms.symbols: | ||
elem_counts[symb] += 1 | ||
|
||
|
||
# %% | ||
fig = pmv.ptable_heatmap_plotly(elem_counts, fmt=".0f") | ||
fig.show() | ||
|
||
|
||
# %% plot spacegroup distribution | ||
spg_nums: dict[str, int] = {} | ||
for atoms in atoms_list: | ||
moyo_cell = moyopy.interface.MoyoAdapter.from_atoms(atoms).data | ||
moyo_data = moyopy.MoyoDataset(moyo_cell) | ||
spg_nums[atoms.info["material_id"]] = moyo_data.number | ||
|
||
fig = pmv.spacegroup_sunburst(spg_nums.values(), show_counts="value+percent") | ||
fig.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.