pymatgen package

Subpackages

Module contents

get_structure_from_mp(formula)[source]

Convenience method to get a crystal from the Materials Project database via the API. Requires PMG_MAPI_KEY to be set.

Parameters:formula (str) – A formula
Returns:
(Structure) The lowest energy structure in Materials Project with that
formula.
loadfn(fname)[source]

Convenience method to perform quick loading of data from a filename. The type of object returned depends the file type.

Parameters:fname (string) – A filename.
Returns:Note that fname is matched using unix-style, i.e., fnmatch. (Structure) if POSCAR/CONTCAR/.cif (Vasprun) *vasprun (obj) if json (passthrough to monty.serialization.loadfn)