matminer.data_retrieval.retrieve_MP.MPDataRetrieval获取materials project数据
from matminer.data_retrieval.retrieve_MP import MPDataRetrieval
mpdr=MPDataRetrieval(api_key='')
#得到所有元素材料的密度,例如那些包含一个元素的材料 df=mpdr.get_dataframe(criteria={
'nelements':1}, properties=['density','pretty_formula']) print('there are %d enties on MP with 1 element'%(df['density'].count()))
0%| | 0/716 [00:00<?, ?it/s] there are 716 enties on MP with 1 element
带隙是 band_gap,大于4怎么写呢? 是 greater than, 缩写成 gt. 在 matminer中要写成 $gt
df=mpdr.get_dataframe({
'band_gap':{
'$gt':4.0}},['pretty_formula','band_gap'])
0%| | 0/8285 [00:00<?, ?it/s]
df.head()
pretty_formula | band_gap | |
---|---|---|
material_id | ||
mp-10080 | PrGeBO5 | 4.0136 |
mp- | Na2Ge(S2O7)3 | 4.0030 |
mp- | KLiICl | 4.0542 |
mp- | CsC2N3 | 4.0731 |
mp- | Y2(CN2)3 | 4.0364 |
存在弹性常数信息用 “elasticity”: {“$exists”: True} 表示,没有警告信息用 一个空列表表示:“elasticity.warnings”: []
df=mpdr.get_dataframe({
"elasticity":{
"$exists":True}}, ['pretty_formula','elasticity.K_VRH','elasticity.G_VRH'])
0%| | 0/13172 [00:00<?, ?it/s]
df.head()
pretty_formula | elasticity.K_VRH | elasticity.G_VRH | |
---|---|---|---|
material_id | |||
mp-10003 | Nb4CoSi | 191.0 | 97.0 |
mp- | BeC2 | 83.0 | 45.0 |
mp- | ZrB6 | 179.0 | 41.0 |
mp- | HfIr | 202.0 | 12.0 |
mp- | SiC | 241.0 | 176.0 |
除了上次的搜索条件外,我们想搜索包含 Pb 和 Te 的材料:“elements”: {“KaTeX parse error: Expected '}', got 'EOF' at end of input: …above_hull": {"lt”: 1e-6}
df=mpdr.get_dataframe(criteria={
"elasticity":{
'$exists':True}, 'elasticity.warnings':[], 'elements':{
'$all':['Pb','Te']}, 'e_above_hull':{
'$lt':1e-6}}, properties=['elasticity.K_VRH','elasticity.G_VRH', 'pretty_formula','e_above_hull','bandstructure', 'dos'])
让我们来看看
这些稳定化合物的能带结构和状态密度,这些化合物包含 Pb 和 Te,这对热电学应用很有意思:
df.head()
elasticity.K_VRH | elasticity.G_VRH | pretty_formula | e_above_hull | bandstructure | dos | |
---|---|---|---|---|---|---|
material_id | ||||||
mp-19717 | 40.0 | 24.0 | TePb | 0 | <pymatgen.electronic_structure.bandstructure.B... | Complete DOS for Full Formula (Te1 Pb1)\nReduc... |
mp-20740 | 25.0 | 13.0 | Tl4Te3Pb | 0 | <pymatgen.electronic_structure.bandstructure.B... | Complete DOS for Full Formula (Tl8 Te6 Pb2)\nR... |
mp- | 34.0 | 16.0 | Te2Pd3Pb2 | 0 | <pymatgen.electronic_structure.bandstructure.B... | Complete DOS for Full Formula (Te4 Pd6 Pb4)\nR... |
from pymatgen.electronic_structure.plotter import BSDOSPlotter
E:\Anaconda\lib\site-packages\pymatgen\electronic_structure\boltztrap.py:58: FutureWarning: which is deprecated; use which in shutil instead. shutil.which has been available since Python 3.3. This will be removed in v2023. which("x_trans"),
mpid='mp-20740' idx=df.index[df.index==mpid][0]
import matplotlib.pyplot as plt BSDOSPlotter().get_plot(bs=df.loc[mpid,'bandstructure'],dos=df.loc[mpid,'dos']) plt.show()
from matminer.data_retrieval.retrieve_Citrine import CitrineDataRetrieval
cdr=CitrineDataRetrieval(api_key='')
df=cdr.get_dataframe(criteria={
'formula':'Si', 'data_type':'EXPERIMENTAL'}, properties=['Bnad gap'], secondary_fields=True)
0it [00:00, ?it/s] all available fields: [] suggested common fields: []
cdr.get_dataframe?
df_OH=cdr.get_dataframe(criteria={
},properties=['adsorption energy of OH'], secondary_fields=True)
0%| | 0/9 [00:00<?, ?it/s]E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) 11%|█████████▎ | 1/9 [00:00<00:01, 5.39it/s]E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) 44%|█████████████████████████████████████▎ | 4/9 [00:00<00:00, 15.13it/s]E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) 78%|█████████████████████████████████████████████████████████████████▎ | 7/9 [00:00<00:00, 19.22it/s]E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) 100%|████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:00<00:00, 17.45it/s] all available fields: ['category', 'chemicalFormula', 'Adsorption energy of OH', 'references', 'uid', 'Morphology', 'Adsorption energy of OH-units', 'Adsorption energy of OH-conditions', 'Surface facet', 'Adsorption energy of OH-dataType'] suggested common fields: ['references', 'chemicalFormula', 'Surface facet', 'Adsorption energy of OH', 'Adsorption energy of OH-units', 'Adsorption energy of OH-dataType', 'Morphology', 'Adsorption energy of OH-conditions']
df_O=cdr.get_dataframe(criteria={
},properties=['adsorption energy of O'], secondary_fields=True)
0%| | 0/21 [00:00<?, ?it/s]E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) 14%|███████████▊ | 3/21 [00:00<00:00, 28.91it/s]E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) 29%|███████████████████████▋ | 6/21 [00:00<00:00, 27.23it/s]E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) 43%|███████████████████████████████████▌ | 9/21 [00:00<00:00, 24.81it/s]E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) 57%|██████████████████████████████████████████████▊ | 12/21 [00:00<00:00, 25.41it/s]E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) 71%|██████████████████████████████████████████████████████████▌ | 15/21 [00:00<00:00, 25.99it/s]E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) 86%|██████████████████████████████████████████████████████████████████████▎ | 18/21 [00:00<00:00, 25.90it/s]E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:123: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead. system_normdf = json_normalize(system_value) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:129: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. non_prop_df = non_prop_df.append(non_prop_row) E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_Citrine.py:167: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. prop_df = prop_df.append(p_df) 100%|██████████████████████████████████████████████████████████████████████████████████| 21/21 [00:00<00:00, 25.96it/s] all available fields: ['Adsorption energy of O-conditions', 'Reconstruction', 'category', 'chemicalFormula', 'Adsorption energy of O', 'references', 'uid', 'Adsorption energy of O-units', 'Surface facet'] suggested common fields: ['references', 'chemicalFormula', 'Surface facet', 'Adsorption energy of O', 'Adsorption energy of O-units', 'Adsorption energy of O-conditions', 'Reconstruction']
df_OH.head()
references | chemicalFormula | Surface facet | Adsorption energy of OH | Adsorption energy of OH-units | Adsorption energy of OH-dataType | Morphology | Adsorption energy of OH-conditions | |
---|---|---|---|---|---|---|---|---|
1 | [{'citation': '10.1039/c2cc30281k', 'doi': '10... | Pt | (111) | 2.44 | eV | NaN | NaN | NaN |
2 | [{'citation': '10.1016/s1872-2067(12)60642-1',... | Cu | (211) | -3.55 | eV | COMPUTATIONAL | NaN | NaN |
3 | [{'citation': '10.1016/s1872-2067(12)60642-1',... | ZnO | NaN | -3.03 | eV | COMPUTATIONAL | Thin film | NaN |
4 | [{'citation': '10.1016/j.corsci.2012.11.011', ... | Fe | (100) | -3.95 | eV | NaN | NaN | NaN |
5 | [{'citation': '10.1021/jpm', 'doi': '10.... | Pt | (111) | 2.71 | eV | NaN | NaN | [{'name': 'Site', 'scalars': [{'value': 'Top s... |
df_O.head()
references | chemicalFormula | Surface facet | Adsorption energy of O | Adsorption energy of O-units | Adsorption energy of O-conditions | Reconstruction | |
---|---|---|---|---|---|---|---|
1 | [{'citation': '10.1016/j.jcat.2007.04.018', 'd... | Fe | (111) | -5.42 | eV | NaN | NaN |
2 | [{'citation': '10.1002/cctc.', 'doi':... | Pt | (111) | 1.53 | eV | NaN | NaN |
3 | [{'citation': '10.1021/jpj', 'doi': '10.... | Pt | (111) | -4.54 | eV | NaN | NaN |
4 | [{'citation': '10.1021/jpq', 'doi': '10.... | Co | (0001) | 2.37 | eV | [{'name': 'Site', 'scalars': [{'value': 'FCC s... | NaN |
5 | [{'citation': '10.1007/bf00', 'doi': '10... | Rh | (110) | -300 | kJ/mol | NaN | NaN |
from matminer.data_retrieval.retrieve_MPDS import MPDSDataRetrieval
E:\Anaconda\lib\site-packages\matminer\data_retrieval\retrieve_MPDS.py:30: UserWarning: No module named 'jmespath' warnings.warn(str(ex))
MDF 数据检索工具 matmin.data _ review。matminer.data_retrieval.retrieve_MDF.MDFDataRetrieval使用 Globus 初始化键进行初始化。在第一次调用 MDFDataRetrieval 对象时,应该会提示您输入一串数字和字母,您可以在 MDF Globus 身份验证网站上输入这些数字和字母。这个系统的一个优点是它实际上根本不需要身份验证。您可以使用 onymous = True,并且可以使用几个 MDF 数据集。但是,其中许多不会,您必须使用 Web 进行身份验证才能访问整个 MDF。
from matminer.data_retrieval.retrieve_MDF import MDFDataRetrieval
mdf_dr = MDFDataRetrieval(anonymous=True)
df=mdf_dr.get_dataframe(criteria={
'elements':['Ag','Be'],'sources':['oqmd']})
df.head()
crystal_structure.number_of_atoms | crystal_structure.space_group_number | crystal_structure.volume | dft.converged | dft.cutoff_energy | dft.exchange_correlation_functional | files.0.data_type | files.0.filename | files.0.globus | files.0.length | ... | jarvis.formation_enthalpy | jarvis.id | jarvis.landing_page | jarvis.total_energy | origin.creator | origin.name | origin.type | jarvis.bandgap.mbj | material.elements.2 | oqmd.magnetic_moment.value | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 2 | 221 | 25.2675 | True | 520.0 | PBE | ASCII text, with very long lines, with no line... | .json | globus://e38ee745-6d04-11e5-ba46-22000b92c6ec/... | 10833 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
1 | 2 | 221 | 24.0794 | True | 520.0 | PBE | ASCII text, with very long lines, with no line... | 86132.json | globus://e38ee745-6d04-11e5-ba46-22000b92c6ec/... | 11014 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
2 | 4 | 225 | 40.8748 | True | 520.0 | PBE | ASCII text, with very long lines, with no line... | .json | globus://e38ee745-6d04-11e5-ba46-22000b92c6ec/... | 11526 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
3 | 6 | 227 | 62.5236 | True | 520.0 | PBE | ASCII text, with very long lines, with no line... | 19313.json | globus://e38ee745-6d04-11e5-ba46-22000b92c6ec/... | 11320 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
4 | 4 | 139 | 40.6980 | True | 520.0 | PBE | ASCII text, with very long lines, with no line... | 71045.json | globus://e38ee745-6d04-11e5-ba46-22000b92c6ec/... | 11283 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
5 rows × 48 columns