get_sile

sisl.io.get_sile(file, *args, **kwargs)

Retrieve an object from the global lookup table via filename and the extension

Internally this is roughly equivalent to get_sile_class(...)().

Parameters
  • file (str or pathlib.Path) – the file to be quried for a correct Sile object. This file name may contain {<class-name>} which sets cls in case cls is not set. For instance get_sile("water.dat{xyzSile}") will read the file water.dat using the xyzSile class.

  • cls (class) – In case there are several files with similar file-suffixes you may query the exact base-class that should be chosen. If there are several files with similar file-endings this function returns a random one.