[docs]@dataclassclassLobsterMaker(Maker):""" LOBSTER job maker. The maker copies DFT output files necessary for the LOBSTER run. It will create all lobsterin files, run LOBSTER, zip the outputs and parse the LOBSTER outputs. Parameters ---------- name : str Name of jobs produced by this maker. task_document_kwargs : dict Keyword arguments passed to :obj:`.LobsterTaskDocument.from_directory`. user_lobsterin_settings : dict Dict including additional information on the Lobster settings. run_lobster_kwargs : dict Keyword arguments that will get passed to :obj:`.run_lobster`. calculation_type : str Type of calculation for the Lobster run that will get passed to :obj:`.Lobsterin.standard_calculations_from_vasp_files`. """name:str="lobster"task_document_kwargs:dict=field(default_factory=dict)user_lobsterin_settings:dict|None=Nonerun_lobster_kwargs:dict=field(default_factory=dict)calculation_type:str="standard"
[docs]@job(output_schema=LobsterTaskDocument,data=[CompleteCohp,LobsterCompleteDos,Bandoverlaps,Icohplist,],)defmake(self,wavefunction_dir:str|Path=None,basis_dict:dict|None=None,)->LobsterTaskDocument:"""Run a LOBSTER calculation. Parameters ---------- wavefunction_dir : str or Path A directory containing a WAVEFUNCTION and other outputs needed for Lobster basis_dict: dict A dict including information on the basis set """# copy previous inputs # VASP for examplecopy_lobster_files(wavefunction_dir)# write lobster settingslobsterin=Lobsterin.standard_calculations_from_vasp_files("POSCAR","INCAR",dict_for_basis=basis_dict,option=self.calculation_type)ifself.user_lobsterin_settings:forkey,parameterinself.user_lobsterin_settings.items():# basis function can only be changed with the help of a yaml fileifkey!="basisfunctions":lobsterin[key]=parameterlobsterin.write_lobsterin("lobsterin")# run lobsterlogger.info("Running LOBSTER")run_lobster(**self.run_lobster_kwargs)# gzip foldergzip_output_folder(directory=Path.cwd(),setting=SETTINGS.LOBSTER_ZIP_FILES,files_list=_FILES_TO_ZIP,)# parse lobster outputsreturnLobsterTaskDocument.from_directory(Path.cwd(),**self.task_document_kwargs,)