从MP数据库提取结构

from mp_api.client import MPRester
from pymatgen.core import composition
from pymatgen.io.vasp.inputs import Poscar
mpr=MPRester("5BhZJctjosrFpkuE6qErpu85dT4gw4VZ")
mp_entries = mpr.get_entries_in_chemsys(elements=["Na","Mo","Si","O"],additional_criteria={"thermo_types": ["GGA_GGA+U"]}) 
count = 0 
for entries in mp_entries:
    count +=1
    struc = entries.structure
    vasp_str = Poscar(struc)
    vasp_str.write_file('%d.vasp'%count)
#print(mp_entries[0].structure)

转载请注明来源 有问题可通过github提交issue