diff --git a/pymatgen/phonon/__init__.py b/pymatgen/phonon/__init__.py index 67fb5e25781..30f466d0917 100644 --- a/pymatgen/phonon/__init__.py +++ b/pymatgen/phonon/__init__.py @@ -1 +1,21 @@ -"""Phonon DOS and bandstructure analysis package.""" +"""pymatgen phonon package with functionality for phonon DOS + bandstructure analysis and more.""" + +from __future__ import annotations + +from pymatgen.phonon.bandstructure import PhononBandStructure, PhononBandStructureSymmLine +from pymatgen.phonon.dos import CompletePhononDos, PhononDos +from pymatgen.phonon.gruneisen import ( + GruneisenParameter, + GruneisenPhononBandStructure, + GruneisenPhononBandStructureSymmLine, +) +from pymatgen.phonon.ir_spectra import IRDielectricTensor +from pymatgen.phonon.plotter import ( + GruneisenPhononBSPlotter, + GruneisenPlotter, + PhononBSPlotter, + PhononDosPlotter, + ThermoPlotter, + plot_brillouin_zone, +) +from pymatgen.phonon.thermal_displacements import ThermalDisplacementMatrices diff --git a/tests/phonon/__init__.py b/tests/phonon/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/phonon/test_init.py b/tests/phonon/test_init.py new file mode 100644 index 00000000000..f454409568d --- /dev/null +++ b/tests/phonon/test_init.py @@ -0,0 +1,21 @@ +from __future__ import annotations + +import pymatgen.phonon as ph +import pymatgen.phonon.bandstructure as bs +import pymatgen.phonon.dos as dos +import pymatgen.phonon.gruneisen as gru +import pymatgen.phonon.plotter as plotter + + +def test_convenience_imports(): + assert ph.PhononBandStructure == bs.PhononBandStructure + assert ph.PhononBandStructureSymmLine == bs.PhononBandStructureSymmLine + assert ph.PhononDos == dos.PhononDos + assert ph.CompletePhononDos == dos.CompletePhononDos + assert ph.GruneisenParameter == gru.GruneisenParameter + assert ph.GruneisenPhononBandStructure == gru.GruneisenPhononBandStructure + assert ph.GruneisenPhononBandStructureSymmLine == gru.GruneisenPhononBandStructureSymmLine + assert ph.PhononDosPlotter == plotter.PhononDosPlotter + assert ph.PhononBSPlotter == plotter.PhononBSPlotter + assert ph.GruneisenPlotter == plotter.GruneisenPlotter + assert ph.GruneisenPhononBSPlotter == plotter.GruneisenPhononBSPlotter