vasprun package¶
- vasprun.smear_data(data, sigma)[source]¶
Apply Gaussian smearing to spectrum y value.
- Parameters:
sigma – Std dev for Gaussian smear function
- class vasprun.units[source]¶
Bases:
object- a2bohr = 0.529¶
- am2kg = 1.6605402e-27¶
- c = 29979245800.0¶
- ev2cm = 8065.6¶
- ev2hartree = 27.211386245988¶
- ev2j = 1.60217733e-19¶
- pi = 3.1415926¶
- plank = 6.626075e-34¶
- proton_mass = 1836¶
- class vasprun.vasprun(vasp_file='vasprun.xml', verbosity=0)[source]¶
Bases:
objectparse vasprun.xml and return all useful info to self.values
- Parameters:
vasp_file – the path of vasprun.xml
verbosity – output error msgs or not
- static dict_clean(dict_del)[source]¶
Delete the keys that is {} and None Loops recursively over nested dictionaries.
- get_bands()[source]¶
Function for computing the valence band index from the count of electrons
- Parameters:
None
- Returns:
an integer number occupy: bool number
- Return type:
bands
- get_potcar(child)[source]¶
parse the potcar information
{‘labels’: [‘O’, ‘Sr_sv’], ‘pot_type’: ‘paw’, ‘functional’: ‘pbe’}
[‘PAW_PBE’, ‘N’, ‘08Apr2002’]
- parse_vaspxml(xml_object)[source]¶
parse the following tags
incar
kpoints
atominfo - composition, elements, formula
calculation - eigenvalues, energy, dos, fermi energy, stress, force
finalpos - lattice, rec_lat, positions
- plot_band(ax=None, filename=None, style='normal', ylim=[-20, 3], plim=[0.0, 0.5], labels=None, saveBands=False, dpi=300)[source]¶
plot the bandstructure
- Parameters:
filename – string
styles – string (normal or projected)
ylim – list, the range of energy values on the y-axis, e.g. [-5, 3]
plim – float (the ratio of color plot in the projected mode)
- Returns:
A figure with band structure
- plot_band_dos(filename=None, band_style='normal', dos_style='t+a', smear=None, e_range=[-10, 3], dos_max=None, plim=[0.0, 0.5], band_labels=None, figsize=(6, 4), dpi=300)[source]¶
- Parameters:
filename (string) – the path of figure
smear (float) – the width of smearing, defult: None
styles (string) – (t or s or t+spd or ele)
e_range (list) – the range of energy values on the x-axis, e.g. [-5, 3]
- Returns:
A figure with band structure
- plot_dos(ax=None, filename=None, smear=None, flip=False, style='t', xlim=[-3, 3], dos_range=[0, None], dpi=300)[source]¶
plot the DOS
- Parameters:
ax – default None
filename – string
styles – string (t or s or t+spd)
xlim – list, the range of energy values on the x-axis, e.g. [-5, 3]
smear – float (the width of smearing, defult: None)
flip – whether or not flip the x/y
- Returns:
A figure with band structure