Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions matminer/featurizers/composition/tests/test_composite.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import math
import unittest
import pandas as pd
from pymatgen.core import Composition

from matminer.featurizers.composition.composite import ElementProperty, Meredig
from matminer.featurizers.composition.tests.base import CompositionFeaturesTest
Expand All @@ -23,6 +25,20 @@ def test_elem_deml(self):
self.assertAlmostEqual(df_elem_deml["DemlData mean atom_num"][0], 15.2)
self.assertAlmostEqual(df_elem_deml["DemlData std_dev atom_num"][0], 12.7279, 4)

df_for_RE = pd.DataFrame(
{
"composition": [
Composition("Mg99.21Zn0.18Mn0.02Ce0.48Si0.01La0.1"),
]
}
)
df_elem_deml_for_RE = ElementProperty.from_preset("deml").featurize_dataframe(df_for_RE, col_id="composition")
self.assertAlmostEqual(df_elem_deml_for_RE["DemlData minimum heat_cap"][0], 19.789)
self.assertAlmostEqual(df_elem_deml_for_RE["DemlData maximum heat_cap"][0], 27.11)
self.assertAlmostEqual(df_elem_deml_for_RE["DemlData range heat_cap"][0], 7.32099999999999)
self.assertAlmostEqual(df_elem_deml_for_RE["DemlData mean heat_cap"][0], 24.8819017999999)
self.assertAlmostEqual(df_elem_deml_for_RE["DemlData std_dev heat_cap"][0], 1.35708660591194)

def test_elem_matminer(self):
df_elem = ElementProperty.from_preset("matminer").featurize_dataframe(self.df, col_id="composition")
self.assertAlmostEqual(df_elem["PymatgenData minimum melting_point"][0], 54.8, 1)
Expand Down
23 changes: 23 additions & 0 deletions matminer/utils/data_files/deml_elementdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,20 +1036,24 @@
# from CRC handbook: 25C and thermo stable standard state, 1 bar
# units: J/mol.K
heat_cap = {
"H": 28.836,
"He": 20.786,
"Li": 24.86,
"Be": 16.443,
"B": 11.087,
"C": 6.115,
"N": 29.124,
"O": 29.378,
"F": 31.304,
"Ne": 20.786,
"Na": 28.23,
"Mg": 24.869,
"Al": 24.2,
"Si": 19.789,
"P": 23.824,
"S": 22.75,
"Cl": 33.949,
"Ar": 20.786,
"K": 29.60,
"Ca": 25.929,
"Sc": 25.52,
Expand All @@ -1067,6 +1071,7 @@
"As": 24.64,
"Se": 25.363,
"Br": 75.69,
"Kr": 20.786,
"Rb": 31.060,
"Sr": 26.4,
"Y": 26.53,
Expand All @@ -1082,18 +1087,36 @@
"Sb": 25.23,
"Te": 25.73,
"I": 54.44,
"Xe": 20.786,
"Cs": 32.21,
"Ba": 28.07,
"Hf": 25.73,
"Ta": 25.63,
"W": 24.27,
"Re": 25.48,
"Os": 24.7,
"Ir": 25.10,
"Pt": 25.86,
"Au": 25.418,
"Hg": 27.983,
"Pb": 26.65,
"Bi": 25.52,
"Rn": 20.786,
"La": 27.11,
"Ce": 26.94,
"Pr": 27.20,
"Nd": 27.45,
"Sm": 29.54,
"Eu": 27.66,
"Gd": 37.03,
"Tb": 28.91,
"Dy": 27.7,
"Ho": 27.15,
"Er": 28.12,
"Yb": 26.74,
"Lu": 26.86,
"Ac": 27.2,
"U": 27.665,
}

# ionization energies (J/mol)
Expand Down