peterspackman / occ

Open Computational Chemistry in C++
https://peterspackman.github.io/occ/
Other
13 stars 2 forks source link
chemistry cpp17 library quantum-chemistry

Open Computational Chemistry (OCC)

Build & Test DOI

A next generation quantum chemistry and crystallography program and library.

Note: occ is in early development, and is undergoing substantial changes regularly - it is not stable, and features are being added & developed rapidly.

Features

Quantum chemistry

Occ is already a fairly fully featured program for ground-state single point calculations in quantum chemistry, including:

Seminumerical exchange (i.e. chain of spheres/COSX) has been implemented, but the performance is not yet good enough to be useful.

Property calculations that are currently available

I've recently added an implementation of the XDM dispersion model, which will be properly interfaced and made convenient to use in the future.

Not yet implemented:

Crystal structures

Misc

First steps have been taken, with a proof of concept python interface for convenience & scripting using pybind11.

Compilation

occ requires a compliant C++17 compiler e.g. GCC-10 or newer.

Dependencies

occ makes use of the the following open source libraries:

And for the library tests/benchmarks:

Getting the source code

First clone the repository:

git clone https://github.com/peterspackman/occ.git

Getting dependencies

Most of the dependencies can be downloaded and compiled via CPM, but you may wish to use system installed dependencies for libxc and eigen3 which will be searched for by default. Note occ requires eigen version 3.4 or newer, which most operating systems do not package by default.

Caching dependency downloads

If you wish to download and compile all dependencies, but you're a developer or want to avoid downloading the dependencies every new build, I'd recommend setting up a source cache for CPM via the environment variable CPM_SOURCE_CACHE e.g. adding the following to your environment.

export CPM_SOURCE_CACHE="$HOME/.cache/cpm"

For building the repository I highly recommend using ninja rather than make.

Once the dependencies are installed, start an out-of-source build e.g.

mkdir build && cd build
cmake .. -GNinja

OR, if you'd rather download all dependencies you could call cmake with:

cmake .. -GNinja \
    -DUSE_SYSTEM_LIBXC=OFF \
    -DUSE_SYSTEM_EIGEN=OFF

Generally, speedups can be achieved by allowing the compiler to optimize for your platform using -march=native or similar flags.

Finally, to build the binary occ, running

ninja occ

will result in the binary being built under the bin directory wherever your build directory is located

Usage

All following usage is a work in progress, expect significant changes constantly for the time-being while the exact input format is decided.

occ

By default occ -h will print out its usage options, but basic usage given a geometry e.g. h2o.xyz format would be:

occ scf h2o.xyz b3lyp 6-31g

Basis set locations

note The path the occ will use to search for basis sets can be configured with the OCC_DATA_PATH environment variable, or you can simply make the basis set available in your working directory.