# Path: pyDFTutils/ase_utils/kpoints.py
# def kpath(cell, path=None, npoints=None, supercell_matrix=np.eye(3), eps=1e-3):
#     mycell=Cell(cell)
#     bpath=mycell.bandpath(path=path, npoints=npoints, eps=eps )
#     kpts=bpath.kpts
#     kpts=[np.dot(kpt, supercell_matrix) for kpt in kpts]
#     x,X, knames= bpath.get_linear_kpoint_axis()
#     return kpts, x, X, knames


import pickle
import copy
import os
import numpy as np
import matplotlib.pyplot as plt
from pyDFTutils.ase_utils.kpoints import kpath
from phonopy import load
from ase.atoms import Atoms
from ase.io import write
from spglib import spglib
#!/usr/bin/env python3

def plot_phonon(kpath,path='./', yaml_fname='phonopy_params.yaml', color='blue', unit="cm^-1"):
    phonon=load(phonopy_yaml=os.path.join(path,))
    cell=phonon._primitive.cell

# Path: pyDFTutils/ase_utils/kpoints.py
# def kpath(cell, path=None, npoints=None, supercell_matrix=np.eye(3), eps=1e-3):
#     mycell=Cell(cell)
#     bpath=mycell.bandpath(path=path, npoints=npoints, eps=eps )
#     kpts=bpath.kpts
#     kpts=[np.dot(kpt, supercell_matrix) for kpt in kpts]
#     x,X, knames= bpath.get_linear_kpoint_axis()
#     return kpts, x, X, knames


# Path: pyDFTutils/phonon/plotphonopy.py
import pickle
import copy
import os
import numpy as np
import matplotlib.pyplot as plt
from pyDFTutils.ase_utils.kpoints import kpath
from phonopy import load
from ase.atoms import Atoms
from ase.io import write
from spglib import spglib

#!/usr/bin/env python3

def plot_phonon(kpath,path='./', yaml_fname='phonopy_params.yaml', color='blue', unit="cm^-1"):
    phonon=load(phonopy_yaml=os.path.join(path,))
    cell=phonon._primitive.cell

    kpts,xs,xs_special,names=kpath(cell,npoints=300, path=kpath)