File input and output
Use atomli.io.read and atomli.io.write for supported structure formats.
Read a structure
Section titled “Read a structure”from atomli.io import read
atoms = read("structure.xyz")Write a structure
Section titled “Write a structure”from atomli.io import write
write("optimized.xyz", atoms)The file suffix usually selects the format. When a format cannot represent a property, do not assume that property will survive a round trip. Verify the cell, periodicity, arrays, and constraints that matter to your workflow.