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:
object
parse 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
(filename=None, styles='normal', ylim=[-20, 3], plim=[0.0, 0.5], 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]
- p_max – float (the ratio of color plot in the projected mode)
Returns: A figure with band structure
-
plot_dos
(filename=None, smear=None, styles='t', xlim=[-3, 3], dpi=300)[source]¶ plot the DOS
Parameters: - 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)
Returns: A figure with band structure