Hi, Does anybody know that what does this error mean and how can fix it?
Code:
structure = df.iloc[0]["structure"]
print(type(structure))
# initialize the featurizer to use structural order parameters (i.e.,
# octahedral, tetrahedral) rather than coordination number.
cnnf = ChemEnvSiteFingerprint.from_preset('multi_weights')
# get the features for the first site in the structure.
site_1_features = cnnf.featurize(structure,0)
error:
KeyError Traceback (most recent call last)
<ipython-input-38-f42d4f38d5ae> in <module>
6
7 # get the features for the first site in the structure.
----> 8 site_1_features = cnnf.featurize(structure,0)
9 List.append(site_1_features)
10 # get the feature labels
F:\anaconda\envs\mlp\lib\site-packages\matminer\featurizers\site.py in featurize(self, struct, idx)
1219 for ce in self.cetypes:
1220 try:
-> 1221 tmp = se.get_csms(idx, ce)
1222 tmp = tmp[0]['symmetry_measure'] if len(tmp) != 0 \
1223 else self.max_csm
F:\anaconda\envs\mlp\lib\site-packages\pymatgen\analysis\chemenv\coordination_environments\structure_environments.py in get_csms(self, isite, mp_symbol)
628 return []
629 else:
--> 630 return [envs[mp_symbol] for envs in self.ce_list[isite][cn]]
631
632 def plot_csm_and_maps(self, isite, max_csm=8.0):
F:\anaconda\envs\mlp\lib\site-packages\pymatgen\analysis\chemenv\coordination_environments\structure_environments.py in <listcomp>(.0)
628 return []
629 else:
--> 630 return [envs[mp_symbol] for envs in self.ce_list[isite][cn]]
631
632 def plot_csm_and_maps(self, isite, max_csm=8.0):
F:\anaconda\envs\mlp\lib\site-packages\pymatgen\analysis\chemenv\coordination_environments\structure_environments.py in __getitem__(self, mp_symbol)
1894
1895 def __getitem__(self, mp_symbol):
-> 1896 return self.coord_geoms[mp_symbol]
1897
1898 def __len__(self):
KeyError: 'SH:11'