Skip to content

Commit

Permalink
vasp scf nbands
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanchen Meng authored and matthewcarbone committed Dec 20, 2023
1 parent 81a0dab commit d17ba7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lightshow/parameters/vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def check_params(self):
If "NBANDS" is not in the INCAR ``keys``.
"""

if "NBANDS" not in self.keys():
if "NBANDS" not in self.keys() and "CH_LSPEC" in self.keys():
raise ValueError("NBANDS not present in INCAR parameters")
super().check_params()

Expand Down Expand Up @@ -900,7 +900,7 @@ def write(self, target_directory, **kwargs):

# Set the number of bands if the number of bands is not explicitly
# provided
if incar.get("NBANDS") is None:
if incar.get("NBANDS") is None and ch_lspec:
cb = self._nbands(structure)
vb = self._vbands(structure)
nb = cb + vb
Expand Down

0 comments on commit d17ba7c

Please sign in to comment.