This module contains various utility functions for dealing with files.
Takes a file path and contents, and uses them to work out which of the known filetypes it should be interpreted as. File extensions will always be believed, and if that can’t be used, contents will be examined and a guess made.
- path (str) – The structure file path.
- filestring (str) – The structure file contents.
open(path, *args, **kwargs)¶
Opens a structure file at the given path on disk. Supported filetypes are .pdb, .cif, and .xyz - if another file extension (or no extension) is given, atomium will use the filecontents to try and guess the format.
Parameters: path (str) – The location of the file on disk. Return type: