I’ve encountered an issue with importing ElementProperty module while following the example code for element-composition featurization in Step 2.1 of the bulk modulus notebook. The error message I received was:
raise ValueError(f"Unexpected atomic number {Z=}")
ValueError: Unexpected atomic number Z=119
Upon investigating the source code at matminer/utils/data.py line 223, it seems the code attempts to access elemental properties beyond the maximum Atomic Number of 118. The relevant code snippet is as follows:
with open(os.path.join(self.data_dir, f"{descriptor_name}.table")) as f:
self.all_elemental_props[descriptor_name] = dict()
lines = f.readlines()
print(_pt_data)
for atomic_no in range(1, len(_pt_data) + 1): # max Z=103
# output:
...
Atomic_no: 118
Atomic_no: 119
After modifying the source code to restrict the loop to a maximum atomic number of 103:
for atomic_no in range(1, 104): # max Z=103
I was able to successfully parse the periodict_able.json . However, I am now facing another issue related to the ASE integration within PyMatGen, specifically in the file: