diff --git a/pyiron_contrib/jobfactories/__init__.py b/pyiron_contrib/jobfactories/__init__.py index eccc6d110..8ecc2c18a 100644 --- a/pyiron_contrib/jobfactories/__init__.py +++ b/pyiron_contrib/jobfactories/__init__.py @@ -304,10 +304,14 @@ class VaspFactory(DftFactory): def __init__(self): super().__init__() self.storage.incar = {} + self.storage.potential = {} self.storage.nband_nelec_map = None @property def incar(self): + """ + Values are set on job.input.incar on job creation. + """ return self.storage.incar def enable_nband_hack(self, nelec: Dict[str, int]): @@ -320,6 +324,13 @@ def enable_nband_hack(self, nelec: Dict[str, int]): """ self.storage.nband_nelec_map = nelec + @property + def potential(self): + """ + Values are set as job.potential. = + """ + return self.storage.potential + def _get_hamilton(self): return "Vasp" @@ -340,6 +351,11 @@ def _prepare_job(self, job, structure): job = super()._prepare_job(job, structure) for k, v in self.incar.items(): job.input.incar[k] = v + for k, v in self.potential.items(): + try: + job.potential[k] = v + except AttributeError: + pass # element k does not exist in the current structure if self.storage.nband_nelec_map is not None: # ensure we apply the hack only for structures where we know an NBAND estimate for all elements elems = set(self.storage.nband_nelec_map.keys())