Skip to content


Repository files navigation

CI Documentation Status Language grade: C/C++

Conda PyPI

CPPE is an open-source, light-weight C++ and Python library for Polarizable Embedding (PE)1,2 calculations. It provides an easy-to-use API to implement PE for ground-state self-consistent field (SCF) calculations and post-SCF methods. A convenient Python interface is also available.

CPPE enables PE calculations in the following programs:

Linear scaling electric field computations in CPPE are achieved through autogenerated code by the fmmgen library.3

Examples for the open-source Python-driven programs can be found here.



The easiest way to install CPPE is via conda:

conda install cppe -c conda-forge

Build from Source

Manual builds can be done using CMake by running

git clone
cd cppe; mkdir build; cd build
cmake ..


Another way to install CPPE is via pip:

pip install cppe

Note that CPPE will be built from source and a C++14 compatible compiler is required (see below), and OpenMP parallelization is disabled in the installation. Alternatively, CPPE can be built from source using the script with

git clone
cd cppe
python install

Python interface

If the Python interface should be built, specify the CMake option -DENABLE_PYTHON_INTERFACE=ON. If pybind11 is not installed, CMake will automatically download pybind11 and install it locally. Installing through will always build the Python interface.


  • C++ 14 compiler
  • Python >= 3.6 (interpreter and development packages)


The tests can be run with

python build_ext -i; python test

for the build, or

source; py.test

for the CMake build.


Code: DOI

CPPE: An Open-Source C++ and Python Library for Polarizable Embedding
Maximilian Scheurer, Peter Reinholdt, Erik Rosendahl Kjellgren, Jógvan Magnus Haugaard Olsen, Andreas Dreuw, and Jacob Kongsted; Journal of Chemical Theory and Computation 2019 15 (11), 6154-6163, DOI: 10.1021/acs.jctc.9b00758

If you use the linear-scaling FMM implementation, please also cite:

Efficient Open-Source Implementations of Linear-Scaling Polarizable Embedding: Use Octrees to Save the Trees
Maximilian Scheurer, Peter Reinholdt, Jógvan Magnus Haugaard Olsen, Andreas Dreuw, and Jacob Kongsted; Journal of Chemical Theory and Computation 2021, DOI: 10.1021/acs.jctc.1c00225


1 Olsen, J. M. H.; Aidas, K.; Kongsted, J. (2010). Excited States in Solution through Polarizable Embedding. J. Chem. Theory Comput., 6 (12), 3721–3734.

2 Olsen, J. M. H.; Kongsted, J. (2011). Molecular Properties through Polarizable Embedding. Advances in Quantum Chemistry (Vol. 61).

3 Pepper, R.; Fangohr, H. (2020). fmmgen: Automatic Code Generation of Operators for Cartesian Fast Multipole and Barnes-Hut Methods. arXiv:2005.12351