Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.81 KB | None | 0 0
  1.  
  2. #key: GKDHNwKre8uiowqhPh
  3.  
  4. from pymatgen.ext.matproj import MPRester
  5. import json
  6. from pprint import pprint
  7.  
  8. all_task_id = dict()
  9. mvc_ids = dict()
  10.  
  11. with MPRester("GKDHNwKre8uiowqhPh") as m:
  12.     for doc in m.query(criteria={}, properties = ["task_ids"]):
  13.         pprint(doc)
  14.  
  15.     #   result = m.get_data("mvc-1200012825")
  16.    
  17.  
  18.  
  19.    
  20. # file = open("test_result_MPRest",'w+')
  21. # file.write(str(result))
  22.  
  23.  
  24. #with open('testtxt','w') as f:
  25.  #  json.dump(result, f)
  26.  
  27. # all_task_ids = {task_id for doc in m.query(criteria={},["task_ids"])
  28. #     for task_id in doc.get("task_ids",[])}
  29. #   mvc_ids = {task_id for task_id in all_task_ids if "mvc" in task_id}
  30.  
  31.  
  32.     # for doc in m.query(criteria={}, ["task_ids"]):
  33.     #   for task_ids in doc.get("task_ids",[])
  34.     #       mvc_ids = {task_id for task_id in all task}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement