Skip to content

divide by zero encountered in true_divide error #2317

@ghost

Description

I'm trying to use boltztrap2 module to plot conductivity, seeback etc but I get following error

---/lib/python3.6/site-packages/pymatgen/electronic_structure/boltztrap2.py:810: RuntimeWarning:

divide by zero encountered in true_divide

Could you help me to solve this issue?

script I use:

from pymatgen.electronic_structure.boltztrap2 import *
from monty.serialization import loadfn
from pymatgen.electronic_structure.plotter import BSPlotter
import matplotlib.pyplot as plt

vrun = Vasprun('vasprun.xml',parse_projected_eigen=True)
data = VasprunBSLoader(vrun)
bs = vrun.get_band_structure()
nele = vrun.parameters['NELECT']
st = vrun.final_structure
data = VasprunBSLoader(bs,structure=st,nelect=nele)



bztInterp = BztInterpolator(data,lpfac=10,energy_range=1.5,curvature=True,
                            save_bztInterp=True,fname='bztInterp.json.gz')

bztTransp = BztTransportProperties(bztInterp,temp_r = np.arange(300,1300,300), doping=10.**np.arange(16,23),
                                   save_bztTranspProps=True,fname='bztTranspProps.json.gz')

bztPlotter = BztPlotter(bztTransp,bztInterp)

bztPlotter.plot_props('C','mu','temp',temps=[300,600,900], xlim=[-2, 7]).show()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions