ENH: I/O support for mustem xtl data format
Add reading and writing support for the xtl file format used by muSTEM -a transmission electron microscopy computing program.
from ase import io, Atoms
# Reproduce the sto xtl file distributed with muSTEM
atoms = Atoms(['Sr', 'Ti', 'O', 'O', 'O'],
scaled_positions=[[0, 0, 0],
[0.5, 0.5, 0.5],
[0.5, 0.5, 0],
[0.5, 0, 0.5],
[0, 0.5, 0.5]],
cell=[3.905, 3.905, 3.905],
pbc=True)
# This format needs additional information (keV for the accelerating voltage and DW for the Debye-Waller factor of each element.)
filename = 'sto_mustem.xtl'
atoms.write(filename, keV=300,
DW={'Sr': 0.78700E-02, 'O': 0.92750E-02, 'Ti': 0.55700E-02})
atoms2 = io.read(filename, format='mustem')