outSileSiesta

class sisl.io.siesta.outSileSiesta(filename, mode='r', comment='#')[source]

Siesta output file object

This enables reading the output quantities from the Siesta output.

Attributes

file File of the current Sile

Methods

__init__(filename[, mode, comment])
exist() Query whether the file exists
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific content in the Siesta out file
read_force(*args, **kwargs)
read_geometry(*args, **kwargs)
read_moment(*args, **kwargs)
read_species(*args, **kwargs)
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
exist()

Query whether the file exists

file

File of the current Sile

is_keys(keys)

Returns true if isinstance(keys,(list,np.ndarray))

key2case(key, case)

Converts str/list of keywords to proper case

keys2case(keys, case)

Converts str/list of keywords to proper case

line_has_key(line, key, case=True)
line_has_keys(line, keys, case=True)
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_data(*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) 
<geom>, <forces>
>>> read_data(force=True,geometry=True) 
<forces>, <geom>
Parameters:

geom: 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(*args, **kwargs)
read_geometry(*args, **kwargs)
read_moment(*args, **kwargs)
read_species(*args, **kwargs)
readline(comment=False)

Reads the next line of the file

step_either(keywords, case=True)

Steps the file-handle until the keyword is found in the input

step_to(keywords, case=True, reread=True)

Steps the file-handle until the keyword is found in the input

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.