How to use the gpaw.MethfesselPaxton function in gpaw

To help you get started, we’ve selected a few gpaw examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pyiron / pyiron / pyiron / gpaw / gpaw.py View on Github external
def run_if_interactive(self):
        if self.structure.calc is None:
            kpoints = self.input["kpoints"]
            if isinstance(kpoints, str):
                kpoints = (
                    self.input["kpoints"].replace("[", "").replace("]", "").split()
                )
            self._create_working_directory()
            calc = GPAW(
                mode=PW(float(self.input["encut"])),
                xc=self.input["potential"],
                occupations=MethfesselPaxton(width=float(self.input["sigma"])),
                kpts=kpoints,
                txt=self.working_directory + "/" + self.job_name + ".txt",
            )
            self.structure.set_calculator(calc)
        self.status.running = True
        self.structure.calc.calculate(self.structure)
        self.interactive_collect()