Skip to content

Latest commit

 

History

History
197 lines (123 loc) · 7.85 KB

README.md

File metadata and controls

197 lines (123 loc) · 7.85 KB

OpenCAP: An open-source program for studying resonances in molecules.

Documentation
Build Status
Releases

OpenCAP is an open-source application aimed at extending the capabilities of electronic structure packages to describe metastable electronic states. We currently support an interface with the OpenMolcas, Pyscf, Q-Chem, Columbus, and PSI4 packages to compute resonance positions and widths using the complex absorbing potential method (CAP).

Please see the examples directory or our Getting Started Page to help get started on using the software.

For questions or support, please open an issue on GitHub, or contact us directly at gayverjr@bu.edu.

Documentation

We have separate documentation for the command line version (which is aimed more at developers) and the Python API (which is aimed more at users).

Installation

PyOpenCAP (Python module)

Install with pip (recommended)

pip install pyopencap
# or
pip3 install pyopencap

Precompiled Python wheels are available on Pypi for almost all Linux systems, and most MacOS systems, for Python versions 3.6 and later.

Build from source

Compiling PyOpenCAP from source requires first installing all of our dependencies.

For Mac/Linux users, any compiler which fully supports the C++17 standard should work (e.g GCC 7.x or later). If you are unsure, try updating to the latest version of your compiler.

If your operating system/Python environment is not covered by any of our pre-built wheels, the command pip install pyopencap will download the tarball from Pypi and try to compile from source. You can also clone the repository and install a local version:

git clone https://github.com/gayverjr/opencap.git

cd opencap

pip install .

Compiling from source will take several minutes. To monitor your progress, you can run pip with the --verbose flag.

Verify installation

To ensure that the installation was successful, return to your home directory, start a Python shell, and type:

import pyopencap

See the examples directory and our tutorial to help get you started.

OpenCAP (command line version)

Compiling OpenCAP requires installing all of our dependencies. Assuming these are all installed in locations visible to CMake, installation can proceed as follows:

Basic steps

These steps have been tested on MacOS 12.3, and on Centos7.

First clone the git repo


git clone https://github.com/gayverjr/opencap.git

cd opencap/opencap

Then generate the Makefile using CMake


mkdir build

cd build

cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/dir ..

Once the Makefile is generated, build and install the executable.

make

make install

MacOS/Linux

Any compiler which fully supports the C++17 standard should work (e.g GCC 7.x or later). If you are unsure, try updating to the latest version of your compiler.

For Linux users, depending on your distribution, you may also need to install Python3 development libraries e.g. sudo apt-get install python3.x-dev.

Verify installation

To verify your installation, run the tests in the build directory

make test

To run OpenCAP, specify an input file from the command line

/path/to/opencap input_file.in 

See the examples directory and our documentation to help get you started.

Dependencies

Building OpenCAP/PyOpenCAP from source requires working installations of the following:

  • C++ compiler with full C++17 language support and standard libraries (Warning: Default Apple Clang on MacOS is not fully supported)

  • Python3 interpreter and development libraries: version >= 3.6

  • CMake: version >= 3.12

  • HDF5: hierarchical data format, version >= 1.10

  • Eigen: linear algebra library, version >= 3.3

All of these dependencies are available through standard package managers such as Homebrew, Conda, and yum/apt-get on Linux.

The following packages are automatically built at the CMake step (no action required):

  • Numgrid: numerical integration library

  • h5pp: C++17 wrapper for HDF5

  • pybind11: C++ Python bindings

The following is included as part of the source distribution (no action required):

  • Date: Howard Hinnant's date and time library based on the C++11/14/17 header

  • asa239 C++ library which evaluates incomplete Gamma function from John Burkardt. Distributed under GNU LGPL license.

License

OpenCAP and PyOpenCAP are distributed under the MIT license.

Numgrid is distributed under the Mozilla Public License 2.0. The source code is available on GitHub.

Acknowledgements

This project is funded by the Molecular Sciences Software Institute.

MolSSI logo

We would like to thank Professor Thomas Sommerfeld for his generous contribution of C++ code for analytic box-CAP integrals. Please visit his repository for many implementations of L^2 methods for resonances!

We would like to thank Mushir Thodika from Temple University for his help in developing the interface with Columbus.

We would like to thank Prof. John Burkardt for his implementation of the Incomplete Gamma function. Many of his wonderful open source codes can be found at his website.