Modify vasp.py for fixing issue #1021
Fix #1021 (closed)
When calling the function Vasp.get_dos()
, it adds the prefix of the directory argument twice (at Vasp.get_k_point_weights()
and Vasp.read_k_point_weights()
), so it cannot find the IBZKPT file in the correct prefix/directory
but in the prefix/prefix/directory
and will raise a error message.
def get_k_point_weights(self):
# First time adding prefix
filename = self._indir('IBZKPT')
return self.read_k_point_weights(filename)
and
def read_k_point_weights(self, filename):
"""Read k-point weighting. Normally named IBZKPT."""
...
# Second time adding prefix
lines = self.load_file(filename)
...
To fix this issue, get_k_point_weights
is modified as:
def get_k_point_weights(self):
filename = 'IBZKPT'
return self.read_k_point_weights(filename)