Guest User

Untitled

a guest
Jan 22nd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. import json
  2. from pprint import pprint
  3. from aflowml.client import AFLOWmlAPI
  4.  
  5. with open('entries_data.json', 'r') as json_file:
  6. entries_data = json.load(json_file)
  7. predictions = []
  8. ml = AFLOWmlAPI()
  9. count = 1
  10. print("Fetching predictions:")
  11. for entry in entries_data:
  12. print('%s of %s %s' % (
  13. count,
  14. len(entries_data),
  15. entry['auid']
  16. ))
  17. count += 1
  18. prediction = ml.get_prediction(entry['poscar'], 'plmf')
  19. # merge entry and prediction dict
  20. predictions.append(prediction)
  21. print('Output')
  22. pprint(predictions)
Add Comment
Please, Sign In to add comment