From d17ba7c9b97a5b95a37c94c6933b615c91a95b60 Mon Sep 17 00:00:00 2001 From: Fanchen Meng Date: Sat, 16 Dec 2023 12:50:38 -0500 Subject: [PATCH] vasp scf nbands --- lightshow/parameters/vasp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightshow/parameters/vasp.py b/lightshow/parameters/vasp.py index 2686b87e..47d47349 100644 --- a/lightshow/parameters/vasp.py +++ b/lightshow/parameters/vasp.py @@ -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() @@ -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