hylight.phonopy package¶
Submodules¶
hylight.phonopy.loader module¶
Module to load phonons frequencies and eigenvectors from phonopy output files.
It always uses PyYAML, but it may also need h5py to read hdf5 files.
- class hylight.phonopy.loader.PPStruct(pops: list[int], lattice: ndarray, masses: list[float], atoms: list[str], ref: ndarray)¶
Bases:
object
Crystal structure as described by phonopy.
- atoms: list[str]¶
- classmethod from_yaml_cell(cell: dict) PPStruct ¶
Create a PPStruct from a cell dictionary found in phonopy files.
- lattice: ndarray¶
- masses: list[float]¶
- pops: list[int]¶
- ref: ndarray¶
- hylight.phonopy.loader.get_struct(phyaml: str) PPStruct ¶
Get a structure from the phonopy.yaml file.
- hylight.phonopy.loader.load_phonons(dir_: str) tuple[list[Mode], list[int], list[float]] ¶
Load vibrational modes from phonopy output files.
This function takes the directory where the files are stored and tries to detect the right file to process.
See also
- Parameters:
dir – directory containing phonopy output files
- Returns:
(modes, frequencies, eigenvectors) tuple
- hylight.phonopy.loader.load_phonons_bandsh5(bandh5: str, phyaml: str, op=<built-in function open>) tuple[list[Mode], list[int], list[float]] ¶
Load vibrational modes from phonopy HDF5 output files.
- Parameters:
bandh5 – path to band.hdf5 or band.hdf5.gz file
op – (optional, open) open function, pass
gzip.open()
when dealing with compressed file.
- Returns:
(modes, frequencies, eigenvectors) tuple
- hylight.phonopy.loader.load_phonons_bandyaml(bandy: str) tuple[list[Mode], list[int], list[float]] ¶
Load vibrational modes from phonopy YAML output files.
- Parameters:
bandy – path to band.yaml file
- Returns:
(modes, frequencies, eigenvectors) tuple
- hylight.phonopy.loader.load_phonons_qpointsh5(qph5: str, phyaml: str, op=<built-in function open>) tuple[list[Mode], list[int], list[float]] ¶
Load vibrational modes from phonopy HDF5 output files.
- Parameters:
qph5 – path to qpoints.hdf5 or qpoints.hdf5.gz file
phyaml – path to phonopy.yaml file
op – (optional, open) open function, pass
gzip.open()
when dealing with compressed file.
- Returns:
(modes, frequencies, eigenvectors) tuple
- hylight.phonopy.loader.load_phonons_qpointsyaml(qpyaml: str, phyaml: str) tuple[list[Mode], list[int], list[float]] ¶
Load vibrational modes from phonopy YAML output files.
- Parameters:
qpyaml – path to qpoints.yaml file
phyaml – path to phonopy.yaml file
- Returns:
(modes, frequencies, eigenvectors) tuple
Module contents¶
phonopy related utils.