Make main io functions accessible at hiphive.io level
Description
As a user I find it inconvenient to have to import the phonopy io functions from such a deeply nested module.
from hiphive.io.phonopy import write_phonopy_fc2
Note the double occurrence of phonopy
.
Why not simplify the notation and task
from hiphive.io import write_phonopy_fc2
by adding
from .phonopy import (read_phonopy_fc2,
read_phonopy_fc3,
write_phonopy_fc2,
write_phonopy_fc3)
from .shengBTE import (read_shengBTE_fc3,
write_shengBTE_fc3
__all__ = ['read_phonopy_fc2',
'read_phonopy_fc3',
'write_phonopy_fc2',
'write_phonopy_fc3',
'read_shengBTE_fc3',
'write_shengBTE_fc3']
to hiphive/io/__init__.py
.
As a further refinement we could add generic read
/write
functions that recognize the format based on filename and possibly a read attempt akin to ASE.
Edited by Paul Erhart