outSileSiesta¶
-
class
sisl.io.siesta.
outSileSiesta
(filename, mode='r', comment=None, *args, **kwargs)[source]¶ Output file
This enables reading the output quantities from the Siesta output.
Attributes
File of the current Sile
File of the current Sile
True if the full file has been read and “Job completed” was found.
Methods
__init__
(self, filename[, mode, comment])Initialize self.
dir_file
(self[, filename])File of the current Sile
exist
(self)Query whether the file exists
read
(self, \*args, \*\*kwargs)Generic read method which should be overloaded in child-classes
read_data
(self, \*args, \*\*kwargs)Read specific content in the Siesta out file
read_force
(self[, last, all])Reads the forces from the Siesta output file
read_geometry
(self[, last, all])Reads the geometry from the Siesta output file
read_moment
(self[, orbital, quantity, last, all])Reads the moments from the Siesta output file These will only be present in case of spin-orbit coupling.
read_species
(self)Reads the species from the top of the output file.
read_stress
(self[, key, last, all])Reads the stresses from the Siesta output file
write
(self, \*args, \*\*kwargs)Generic write method which should be overloaded in child-classes
-
property
base_file
¶ File of the current Sile
-
dir_file
(self, filename=None)¶ File of the current Sile
-
exist
(self)¶ Query whether the file exists
-
property
file
¶ File of the current Sile
-
property
job_completed
¶ True if the full file has been read and “Job completed” was found.
-
read
(self, *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_data
(self, *args, **kwargs)[source]¶ Read specific content in the Siesta out file
The currently implemented things are denoted in the parameters list. Note that the returned quantities are in the order of keywords, so:
>>> read_data(geometry=True, force=True) <geometry>, <force> >>> read_data(force=True, geometry=True) <force>, <geometry>
- Parameters
- geometry: bool
return the last geometry in the
outSileSiesta
- force: bool
return the last force in the
outSileSiesta
- moment: bool
return the last moments in the
outSileSiesta
(only for spin-orbit coupling calculations)
-
read_force
(self, last=True, all=False)[source]¶ Reads the forces from the Siesta output file
- Parameters
- last: bool, optional
only read the last force
- all: bool, optional
return a list of all forces (like an MD) If True last is ignored
- Returns
- forces: np.ndarray or None
returns
None
if the forces are not found in the output, otherwise forces will be returned
-
read_geometry
(self, last=True, all=False)[source]¶ Reads the geometry from the Siesta output file
- Parameters
- last: bool, optional
only read the last geometry
- all: bool, optional
return a list of all geometries (like an MD) If True last is ignored
- Returns
- geometries: list or Geometry or None
if all is False only one geometry will be returned (or None). Otherwise a list of geometries corresponding to the MD-runs.
-
read_moment
(self, orbital=False, quantity='S', last=True, all=False)[source]¶ Reads the moments from the Siesta output file These will only be present in case of spin-orbit coupling.
- Parameters
- orbital: bool, False
return a table with orbitally resolved moments.
- quantity: str, ‘S’
return the spin-moments or the L moments
- last: bool, True
only read the last force
- all: bool, False
return a list of all forces (like an MD) If True last is ignored
-
read_species
(self)[source]¶ Reads the species from the top of the output file.
If wanting the species this HAS to be the first routine called.
It returns an array of Atom objects which may easily be indexed.
-
read_stress
(self, key='static', last=True, all=False)[source]¶ Reads the stresses from the Siesta output file
- Parameters
- key{‘static’, ‘total’}
which stress to read from the output.
- last: bool, optional
only read the last stress
- all: bool, optional
return a list of all stresses (like an MD) If True last is ignored
- Returns
- stresses: np.ndarray or None
returns
None
if the stresses are not found in the output, otherwise stresses will be returned
-
write
(self, *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.
-
property