Giter Site home page Giter Site logo

cppe's Introduction

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.

Installation

Conda

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 https://github.com/maxscheurer/cppe
cd cppe; mkdir build; cd build
cmake ..
make

pip/setuptools

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 setup.py/pip installation. Alternatively, CPPE can be built from source using the setup.py script with

git clone https://github.com/maxscheurer/cppe
cd cppe
python setup.py 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 setup.py will always build the Python interface.

Dependencies

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

Tests

The tests can be run with

python setup.py build_ext -i; python setup.py test

for the setup.py build, or

source setup_environment.sh; py.test

for the CMake build.

Citation

Papers:
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

Literature

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. https://doi.org/10.1021/ct1003803

2 Olsen, J. M. H.; Kongsted, J. (2011). Molecular Properties through Polarizable Embedding. Advances in Quantum Chemistry (Vol. 61). https://doi.org/10.1016/B978-0-12-386013-2.00003-6

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

cppe's People

Contributors

erikkjellgren avatar loriab avatar maxscheurer avatar mfherbst avatar peter-reinholdt avatar robertodr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cppe's Issues

PeOptions type caster

For a more pythonic experience, it would be nice to expose the PeOption class
as a plain python dictionary. This could be done with a custom type caster in pybind11.

Refactor CMake

  • build only one library, currently libcppe and pycppe are built
  • cleanup required

PElib Integration

In the branches for Q-Chem and Psi4, I have disabled the PElib integration
because it is not as easy to expose to host programs (matrix elements need to be ordered
as in gen1int, for example). However, it should still be possible to compile the library including PElib and gen1int for test purposes and experimentation.

Make CPPE pip-installable

The compiled Python interface should be installable via pip, making integration in Python packages easier (e.g., pyscf).

  • minimal setup.py to trigger build via cmake
  • install the resulting cppe.cpython-37m*.so library
  • run tests via python3 setup.py test

Build system problems

The build system is a mess at the moment...
Problems arise with ExternalProjects (pybind11 and armadillo), if these are not system-installed.
One option would be to build the main cppe as an external project, too (as done in PSI4).

release v0.3.2

I was wondering why v0.3.2 is not on PyPI yet and why it was not tagged as a release?

Code cleanup

  • use <algorithm> when possible...
  • remove unused code
  • make a header for each source file
  • refactor libcppe.hh (Related to #3)
  • more pythonic handling of PE Options (#16)
  • multiply pre-factors with moments?
  • more pythonic handling of PE Energies (dictionary)
  • more pythonic exposure of properties (get_site_position(), get_values())
  • clang-format on all files

Expand test suite

  • tests against downloaded reference data (Dalton?)
  • consistency tests (pyscf)
  • ...

More options

  • isotropic polarizabilities (iso_pol)
  • disable polarization
  • disable electrostatics
  • tests

Update README

The README file is rather sparse at the moment...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.