sisl.io.axsfSile
- class sisl.io.axsfSile(filename, mode='r', comment=None, *args, **kwargs)
Bases:
xsfSile
AXSF file for XCrySDen
When creating an AXSF file one must denote how many geometries to write out. It is also necessary to use the axsf in a context manager, otherwise it will overwrite itself repeatedly.
>>> with axsfSile('file.axsf', 'w', steps=100) as axsf: ... for i in range(100): ... axsf.write_geometry(geom)
Methods
dir_file
([filename, filename_base])File of the current
Sile
read
(*args, **kwargs)Generic read method which should be overloaded in child-classes
read_geometry
([index, ret_data])Geometries and (possibly) associated data stored in the AXSF file
write
(*args, **kwargs)Generic write method which should be overloaded in child-classes
write_geometry
(geometry[, fmt, data])Writes the geometry to the contained file
write_supercell
(sc[, fmt])Writes the supercell to the contained file
File of the current
Sile
File of the current
Sile
- __init__(filename, mode='r', comment=None, *args, **kwargs)
- plot
Handles all plotting possibilities for a class
- read(*args, **kwargs)
Generic read method which should be overloaded in child-classes
- Parameters
kwargs – keyword arguments will try and search for the attribute
read_<>
and call it with the remaining**kwargs
as arguments.
- read_geometry(index=- 1, ret_data=False)[source]
Geometries and (possibly) associated data stored in the AXSF file
- Parameters
- Returns
geometries (list of Geometry or Geometry) – A list of geometries (or a single Geometries) corresponding to requested indices.
data (ndarray of shape (nindex, natoms, nperatom) and dtype float64) – Only returned if
data
is True.
- to_json()
- write(*args, **kwargs)
Generic write method which should be overloaded in child-classes
- Parameters
**kwargs – keyword arguments will try and search for the attribute write_ and call it with the remaining
**kwargs
as arguments.
- write_grid = None