Spaces:
Running
Running
File size: 322 Bytes
75ac94f |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import json
from ase.db import connect
from pymatgen.core import Structure
with open("wbm_structures.json") as f:
structs = json.load(f)
with connect("wbm_structures.db") as db:
for id, s in structs.items():
atoms = Structure.from_dict(s).to_ase_atoms(msonable=False)
db.write(atoms, wbm_id=id)
|