gemdat.io
This module contains functions to read and write data.
get_list_of_known_materials()
Return list of known materials.
Returns:
Source code in src/gemdat/io.py
120 121 122 123 124 125 126 127 128 | |
load_known_material(name, supercell=None)
Load known material from internal database.
Parameters:
-
name(str) –Name of the material
-
supercell(tuple(int, int, int) | None, default:None) –Optionally, scale the lattice by a sequence of three factors. For example,
(2, 1, 1)specifies that the supercell should have dimensions \(2a \times b \times c\).
Returns:
-
structure(Structure) –Output structure
Source code in src/gemdat/io.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
read_cif(filename)
Load cif file and return first item as pymatgen.core.structure.Structure.
Parameters:
Returns:
-
structure(Structure) –Output structure
Source code in src/gemdat/io.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
write_cif(structure, filename, **kwargs)
Write structure to cif file using pymatgen.io.cif.CifWriter.
Parameters:
-
structure(Structure) –Structure to save
-
filename(Path | str) –Filename to write to
-
**kwargs(dict, default:{}) –Additional keyword arguments passed to pymatgen.io.cif.CifWriter. In particular, pass
symprecto detect and write the space group symmetry (otherwise the cif is written in P1).
Source code in src/gemdat/io.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |