sisl.io.siesta.siesta module¶
Sile object for reading/writing SIESTA binary files
-
class
sisl.io.siesta.siesta.
ncSileSiesta
(filename, mode='r', lvl=0, access=1, _open=True)[source]¶ Bases:
sisl.io.siesta.sile.SileCDFSIESTA
SIESTA file object
Attributes
file
Filename of the current Sile
Methods
ArgumentParser
(*args, **kwargs)Returns the arguments that is available for this Sile ArgumentParser_out
([parser])Appends additional arguments based on the output of the file grids
()Return a list of available grids in this file. isDataset
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([group, dimension, variable, levels, root])Iterator on all groups, variables and dimensions. read
(*args, **kwargs)Generic read method which should be overloaded in child-classes read_density_matrix
(**kwargs)Returns a density matrix from the underlying NetCDF file read_energy_density_matrix
(**kwargs)Returns energy density matrix from the underlying NetCDF file read_es
(*args, **kwargs)Deprecated function which is superseeded by read_hamiltonian
read_geom
(*args, **kwargs)Deprecated function which is superseeded by read_geometry
read_geometry
()Returns Geometry object from a SIESTA.nc file read_grid
(name[, idx])Reads a grid in the current SIESTA.nc file read_hamiltonian
(**kwargs)Returns a tight-binding model from the underlying NetCDF file read_hessian
(**kwargs)Returns a tight-binding model from the underlying NetCDF file read_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns a SuperCell object from a SIESTA.nc file write
(*args, **kwargs)Generic write method which should be overloaded in child-classes write_es
(*args, **kwargs)Deprecated function which is superseeded by write_hamiltonian
write_geom
(*args, **kwargs)Deprecated function which is superseeded by write_geometry
write_geometry
(geom)Creates the NetCDF file and writes the geometry information write_hamiltonian
(H, **kwargs)Writes Hamiltonian model to file write_hessian
(H, **kwargs)Writes Hessian model to file write_sc
(*args, **kwargs)Deprecated function which is superseeded by write_supercell
Creates/Opens a SileCDF
Opens a SileCDF with
mode
and compression levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- means stores certain variables in the object.
Attributes
file
Filename of the current Sile
Methods
ArgumentParser
(*args, **kwargs)Returns the arguments that is available for this Sile ArgumentParser_out
([parser])Appends additional arguments based on the output of the file grids
()Return a list of available grids in this file. isDataset
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([group, dimension, variable, levels, root])Iterator on all groups, variables and dimensions. read
(*args, **kwargs)Generic read method which should be overloaded in child-classes read_density_matrix
(**kwargs)Returns a density matrix from the underlying NetCDF file read_energy_density_matrix
(**kwargs)Returns energy density matrix from the underlying NetCDF file read_es
(*args, **kwargs)Deprecated function which is superseeded by read_hamiltonian
read_geom
(*args, **kwargs)Deprecated function which is superseeded by read_geometry
read_geometry
()Returns Geometry object from a SIESTA.nc file read_grid
(name[, idx])Reads a grid in the current SIESTA.nc file read_hamiltonian
(**kwargs)Returns a tight-binding model from the underlying NetCDF file read_hessian
(**kwargs)Returns a tight-binding model from the underlying NetCDF file read_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns a SuperCell object from a SIESTA.nc file write
(*args, **kwargs)Generic write method which should be overloaded in child-classes write_es
(*args, **kwargs)Deprecated function which is superseeded by write_hamiltonian
write_geom
(*args, **kwargs)Deprecated function which is superseeded by write_geometry
write_geometry
(geom)Creates the NetCDF file and writes the geometry information write_hamiltonian
(H, **kwargs)Writes Hamiltonian model to file write_hessian
(H, **kwargs)Writes Hessian model to file write_sc
(*args, **kwargs)Deprecated function which is superseeded by write_supercell
-
read_energy_density_matrix
(**kwargs)[source]¶ Returns energy density matrix from the underlying NetCDF file
-
read_geometry
()[source]¶ Returns Geometry object from a SIESTA.nc file
NOTE: Interaction range of the Atoms are currently not read.
-
read_grid
(name, idx=0)[source]¶ Reads a grid in the current SIESTA.nc file
Enables the reading and processing of the grids created by SIESTA
-
write_hamiltonian
(H, **kwargs)[source]¶ Writes Hamiltonian model to file
Parameters: H :
Hamiltonian
modelthe model to be saved in the NC file
Ef : double=0
the Fermi level of the electronic structure (in eV)