In this section we document the various classes defined within the koopmans python package.

The workflow module

The central objects in koopmans are Workflow objects. We use these to define and run workflows, as described here. The workflow that runs most calculations is the SinglepointWorkflow, defined as follows.

class koopmans.workflows.SinglepointWorkflow(atoms, pseudopotentials={}, kpoints=None, projections=None, name='koopmans_workflow', parameters={}, calculator_parameters=None, plotting={}, ml={}, autogenerate_settings=True, **kwargs)

Abstract base class that defines a Koopmans workflow


an ASE Atoms object defining the atomic positions, cell, etc

pseudopotentialsDict[str, str]

a dictionary mapping atom labels to pseudopotential filenames


a dataclass defining the k-point sampling and paths


The projections to be used in the Wannierization


a name for the workflow

parametersDict[str, Any] | koopmans.settings.WorkflowSettingsDict

a dictionary specifying any workflow settings to use; note that a simpler alternative is to provide workflow settings as keyword arguments

calculator_parametersDict[str, koopmans.settings.SettingsDict]

a dictionary containing calculator-specific settings; as for the parameters, it is usually simpler to specify these individually as keyword arguments


a dictionary containing settings specific to plotting; again, it is usually simpler to specify these individually as keyword arguments


if True (the default), autogenerate various calculator settings; the only scenario where you do not want to do this is when creating a new workflow from a .kwf file


any valid workflow, calculator, or plotting settings e.g. {"functional": "ki", "ecutwfc": 50.0}


Running a Koopmans calculation on ozone

>>> from import molecule
>>> from koopmans.workflows import SinglepointWorkflow
>>> ozone = molecule('O3', vacuum=5.0, pbc=False)
>>> wf = SinglepointWorkflow(ozone, ecutwfc = 20.0)

Running a Koopmans calculation on GaAs

>>> from import bulk
>>> from koopmans.projections import ProjectionBlocks
>>> from koopmans.kpoints import Kpoints
>>> from koopmans.workflows import SinglepointWorkflow
>>> gaas = bulk('GaAs', crystalstructure='zincblende', a=5.6536)
>>> projs = ProjectionBlocks.fromlist([["Ga: d"], ["As: sp3"], ["Ga: sp3"]],
>>>                                           spins=[None, None, None],
>>>                                           atoms=gaas)
>>> kpoints = Kpoints(grid=[2, 2, 2])
>>> wf = SinglepointWorkflow(gaas, kpoints=kpoints, projections=projs, init_orbitals='mlwfs',
>>>                          pseudo_library='sg15_v1.0', ecutwfc=40.0,
>>>                          calculator_parameters={'pw': {'nbnd': 45},
>>>                          'w90_emp': {'dis_froz_max': 14.6, 'dis_win_max': 18.6}})