| --- |
| dataset_info: |
| - config_name: Z_1-90 |
| features: |
| - name: material_id |
| dtype: string |
| - name: formation_energy_per_atom |
| dtype: float64 |
| - name: dft_band_gap |
| dtype: float64 |
| - name: pretty_formula |
| dtype: string |
| - name: e_above_hull |
| dtype: float64 |
| - name: elements |
| sequence: string |
| - name: spacegroup_number |
| dtype: float64 |
| - name: azure_bulk_modulus |
| dtype: float64 |
| - name: larsen_score_2d |
| dtype: float64 |
| - name: Si_100_mismatch |
| dtype: float64 |
| - name: azure_band_gap |
| dtype: float64 |
| - name: dft_bulk_modulus |
| dtype: float64 |
| - name: dft_poisson_ratio |
| dtype: float64 |
| - name: dft_mag_density |
| dtype: float64 |
| - name: structure |
| dtype: string |
| - name: unique_elements |
| sequence: string |
| - name: num_sites |
| dtype: int64 |
| splits: |
| - name: train |
| num_bytes: 69299317 |
| num_examples: 25923 |
| - name: valid |
| num_bytes: 22967236 |
| num_examples: 8650 |
| - name: test |
| num_bytes: 22926999 |
| num_examples: 8647 |
| download_size: 42557908 |
| dataset_size: 115193552 |
| - config_name: default |
| features: |
| - name: material_id |
| dtype: string |
| - name: formation_energy_per_atom |
| dtype: float64 |
| - name: dft_band_gap |
| dtype: float64 |
| - name: pretty_formula |
| dtype: string |
| - name: e_above_hull |
| dtype: float64 |
| - name: elements |
| sequence: string |
| - name: spacegroup_number |
| dtype: float64 |
| - name: azure_bulk_modulus |
| dtype: float64 |
| - name: larsen_score_2d |
| dtype: float64 |
| - name: Si_100_mismatch |
| dtype: float64 |
| - name: azure_band_gap |
| dtype: float64 |
| - name: dft_bulk_modulus |
| dtype: float64 |
| - name: dft_poisson_ratio |
| dtype: float64 |
| - name: dft_mag_density |
| dtype: float64 |
| - name: structure |
| dtype: string |
| - name: unique_elements |
| sequence: string |
| - name: num_sites |
| dtype: int64 |
| splits: |
| - name: train |
| num_bytes: 72244062 |
| num_examples: 27136 |
| - name: valid |
| num_bytes: 23916305 |
| num_examples: 9047 |
| - name: test |
| num_bytes: 23864869 |
| num_examples: 9046 |
| download_size: 44322023 |
| dataset_size: 120025236 |
| configs: |
| - config_name: Z_1-90 |
| data_files: |
| - split: train |
| path: Z_1-90/train-* |
| - split: valid |
| path: Z_1-90/valid-* |
| - split: test |
| path: Z_1-90/test-* |
| - config_name: default |
| data_files: |
| - split: train |
| path: data/train-* |
| - split: valid |
| path: data/valid-* |
| - split: test |
| path: data/test-* |
| --- |
| |
| The dataset is created with this pipeline: |
| ```bash |
| git clone https://github.com/microsoft/mattergen.git |
| cd mattergen |
| git lfs pull -I data-release/mp-20/ --exclude="" |
| unzip data-release/mp-20/mp_20.zip -d datasets |
| ``` |
|
|
| ```python |
| import pandas as pd |
| from tqdm.auto import tqdm |
| from pymatgen.io.cif import CifParser |
| from datasets import DatasetDict, Dataset |
| |
| train_path = "./datasets/mp_20/train.csv" |
| valid_path = "./datasets/mp_20/val.csv" |
| test_path = "./datasets/mp_20/test.csv" |
| |
| train_df = pd.read_csv(train_path) |
| train_structures = [ |
| CifParser.from_str(s).parse_structures(primitive=True, on_error="ignore")[0] |
| for s in tqdm(train_df["cif"], desc="Parsing CIFs", miniters=20) |
| ] |
| train_df = train_df.drop(columns=['Unnamed: 0', 'cif']) |
| train_df["structure"] = [s.to_json() for s in tqdm(train_structures, miniters=20)] |
| |
| valid_df = pd.read_csv(valid_path) |
| valid_structures = [ |
| CifParser.from_str(s).parse_structures(primitive=True, on_error="ignore")[0] |
| for s in tqdm(valid_df["cif"], desc="Parsing CIFs", miniters=20) |
| ] |
| valid_df = valid_df.drop(columns=['Unnamed: 0', 'cif']) |
| valid_df["structure"] = [s.to_json() for s in tqdm(valid_structures, miniters=20)] |
| |
| test_df = pd.read_csv(test_path) |
| test_structures = [ |
| CifParser.from_str(s).parse_structures(primitive=True, on_error="ignore")[0] |
| for s in tqdm(test_df["cif"], desc="Parsing CIFs", miniters=20) |
| ] |
| test_df = test_df.drop(columns=['Unnamed: 0', 'cif']) |
| test_df["structure"] = [s.to_json() for s in tqdm(test_structures, miniters=20)] |
| |
| |
| |
| train_dataset = Dataset.from_pandas(train_df) |
| valid_dataset = Dataset.from_pandas(valid_df) |
| test_dataset = Dataset.from_pandas(test_df) |
| |
| dataset_dict = DatasetDict({ |
| 'train': train_dataset, |
| 'valid': valid_dataset, |
| 'test': test_dataset |
| }) |
| dataset_dict.push_to_hub('xpanceo-team/mp-20', private=True) |
| ``` |