fdfSileSiesta¶
-
class
sisl.io.siesta.
fdfSileSiesta
(filename, mode='r', base=None)[source]¶ FDF file object
Attributes
file
Return the current file name (without the directory prefix) Methods
__init__
(filename[, mode, base])Initialize an FDF file from the filename exist
()Query whether the file exists get
(key[, unit, default, with_unit])Retrieve fdf-keyword from the file includes
(*args, **kwargs)is_keys
(keys)Returns true if isinstance(keys,(list,np.ndarray))
key
(key)Return the key as written in the fdf-file. 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])print
(key, value)Return a string which is pretty-printing the key+value read
(*args, **kwargs)Generic read method which should be overloaded in child-classes read_geometry
(*args, **kwargs)Returns Geometry object from the FDF file read_supercell
(*args, **kwargs)Returns SuperCell object from the FDF file readline
([comment])Reads the next line of the file set
(key, value[, keep])Add the key and value to the FDF 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 type
(key)Return the type of the fdf-keyword write
(*args, **kwargs)Generic write method which should be overloaded in child-classes write_geometry
(*args, **kwargs)write_supercell
(*args, **kwargs)-
exist
()¶ Query whether the file exists
-
file
¶ Return the current file name (without the directory prefix)
-
includes
(*args, **kwargs)¶
-
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_geometry
(*args, **kwargs)[source]¶ Returns Geometry object from the FDF file
NOTE: Interaction range of the Atoms are currently not read.
-
set
(key, value, keep=True)[source]¶ Add the key and value to the FDF file
Parameters: key : str
the fdf-key value to be set in the fdf file
value : str or list of str
the value of the string. If a str is passed a regular fdf-key is used, if a list it will be a %block.
keep : bool, optional
whether old flags will be kept in the fdf 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.
-
write_geometry
(*args, **kwargs)¶
-
write_supercell
(*args, **kwargs)¶
-