How to run

To run a calculation from the command line, all that is required is

$ koopmans <seed>.json

where <seed>.json is a koopmans input file. The format of the input file is documented here.

Running via python

It is possible to run koopmans workflows from within python, bypassing the need for an input file entirely. To do this, all you need to do is create a SinglepointWorkflow object

wf = SinglepointWorkflow(...)

and then simply call

For details of how to initialize a workflow object, see the workflow class documentation. After a calculation has finished, you can access the individual calculations e.g.

final_calc = wf.calculations[-1]

and fetch their results e.g.

total_energy = final_calc.results['energy']


In order to run the code in parallel, define the environment variables PARA_PREFIX and PARA_POSTFIX. These are defined in the same way as in Quantum ESPRESSO, e.g.

export PARA_PREFIX="srun"
export PARA_POSTFIX="-npool 4"


Currently, Koopmans functionals only works with norm-conserving pseudopotentials. We suggest you use optimized norm-conserving Vanderbilt pseudopotentials, such as

For convenience, koopmans already ships with both of these pseudopotential libraries and you can simply select the one you want to use using the pseudo_library keyword.

If you prefer to use your own pseudopotentials, add them to src/koopmans/pseudopotentials/<my_pseudos>/<functional>, where <my_pseudos> is a name of your choosing and <functional> is the functional used to generate your pseudopotentials. You can then direct koopmans to use these pseudopotentials by setting the keywords pseudo_library and base_functional to <my_pseudos> and <functional> respectively.

Alternatively, you can direct the code to always use your personal pseudopotentials directory by defining the variable

export ESPRESSO_PSEUDO="/path/to/pseudopotential/folder/"