uniform handling of io formats
The read()
, write()
, and iread()
functions from ase.io
already provide functionality for slicing, filename-vs-file-object and paropen in a centralized fashion.
There's an important decision to be made: Are the individual read/write functions for different formats simply internal backends or are they public?
If they are public, they should all expose more or less the same interface, which should be no less rich than that of ase.io.read/write
. This can be done with a decorator which must be applied to all of them.
If they are backends, they should expose minimal interfaces with no regards to user convenience - after all, ase.io
handles all those things, and the only responsibility of the backend functions is to be as simple as possible.
Seeing the ASE documentation I get the imprssion that the readers/writers are mostly private. I therefore think we should cut them down as much as possible, so we always use file objects. Does anyone disagree?