forked from materialsproject/pymatgen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Phonon convenience imports (materialsproject#3544)
* add pymatgen/phonon/__init__.py convenience imports * test_convenience_imports()
- Loading branch information
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |