Skip to content
Snippets Groups Projects
Commit dd98f845 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Fixed an issue that caused by the DOS values being scaled twice with the unit cell volume.

parent 0ed98bdd
No related branches found
No related tags found
No related merge requests found
...@@ -803,16 +803,11 @@ class VasprunContext(object): ...@@ -803,16 +803,11 @@ class VasprunContext(object):
dosV = dosA[:, :, 1] dosV = dosA[:, :, 1]
# Convert the DOS values to SI. VASP uses the # Convert the DOS values to SI. VASP uses the
# following units in the output: states/eV/cell # following units in the output: states/eV/angstrom^3
# volume in angstrom^3
ev_per_joule = convert_unit(1, "eV", "J") ev_per_joule = convert_unit(1, "eV", "J")
a = self.angstrom_cell[0, :] a_cube_to_m_cube = convert_unit(1, "angstrom^3", "m^3")
b = self.angstrom_cell[1, :] dosV = dosV * ev_per_joule * a_cube_to_m_cube
c = self.angstrom_cell[2, :] dosI = dosI * ev_per_joule * a_cube_to_m_cube
cell_volume = np.dot(a, np.cross(b, c))
cell_volume_per_m_cubed = convert_unit(cell_volume, "angstrom^3", "m^3")
dosV = dosV * ev_per_joule * cell_volume_per_m_cubed
dosI = dosI * ev_per_joule * cell_volume_per_m_cubed
if self.vbTopE: if self.vbTopE:
eRef = max(self.vbTopE) eRef = max(self.vbTopE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment