Open Computational Chemistry (OCC) - A portable software library and program for quantum chemistry and crystallography
Open Computational Chemistry (OCC) - A portable software library and program for quantum chemistry and crystallography - Published in JOSS (2026)
Science Score: 87.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 2 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Repository
Open Computational Chemistry in C++
Basic Info
- Host: GitHub
- Owner: peterspackman
- License: other
- Language: C++
- Default Branch: main
- Homepage: https://peterspackman.github.io/occ/
- Size: 53.8 MB
Statistics
- Stars: 21
- Watchers: 4
- Forks: 6
- Open Issues: 8
- Releases: 45
Topics
Metadata Files
README.md
Open Computational Chemistry (OCC)

A next-generation quantum chemistry and crystallography program and library, designed for modern computational workflows.
Note: OCC is in active development and undergoes frequent changes. The API and features are not yet stable.
Installation
From PyPI
The easiest way to install OCC is via pip:
bash
pip install occpy
Supported Python versions: - Python 3.10, 3.11, 3.12, 3.13
Pre-built wheels are available for: - Linux (x8664) - macOS (x8664 and ARM64/Apple Silicon via universal2 wheels)
Features
Quantum Chemistry
OCC provides comprehensive functionality for ground-state single-point calculations:
Electronic Structure Methods
- Hartree-Fock (Restricted, Unrestricted, and General Spinorbitals)
- Density-Functional Theory (Restricted & Unrestricted)
- Supported approximations: LDA, GGA, meta-GGA
- Global hybrid functionals (range-separated support planned)
- Density fitting (RI-JK) with auxiliary basis sets
- Implicit solvation via SMD
- XDM dispersion model
Property Calculations
- Molecular and atomic multipole moments (up to hexadecapole)
- Electron density, Electrostatic potential
- CHELPG charges
- Isosurfaces, generation of volumetric data and more...
Crystal Structure Analysis
- CIF file processing (via gemmi)
- Advanced periodic analysis:
- Fast periodic bond detection
- Symmetry-unique molecule generation
- Dimer identification
- Energy calculations:
- CrystalExplorer model energies
- Automatic direct space lattice energy summation
- Wolf summation for neutral molecular crystals
- Surface analysis:
- Hirshfeld surfaces
- Promolecule surfaces
Additional Features
- Spherical harmonic transforms (FFT-based)
- Molecular point group detection
- File format support:
- Gaussian fchk files (read/write)
- Molden files
- NumPy
.npyarrays (write) - QCSchema JSON
- Basic Gaussian input files
- Geometric algorithms:
- Marching cubes
- Morton codes for linear-hashed octrees
- Electronegativity equilibration method for charges
- Python bindings via nanobind
Python API Examples
```python import occpy from occpy import Crystal, Molecule, AOBasis, HartreeFock, DFT from occpy import SpinorbitalKind
Set up basic configuration
occpy.setloglevel(occpy.LogLevel.WARN) # Configure logging level
occpy.setdatadirectory("/path/to/basis/sets") # Optional: Set basis set path
Load molecule from XYZ file
mol = Molecule.fromxyzfile("h2o.xyz")
Basic Restricted Hartree-Fock calculation
basis = AOBasis.load(mol.atoms(), "6-31G") hf = HartreeFock(basis) scf = hf.scf() energy = scf.run() wfn = scf.wavefunction()
DFT calculation
dft = DFT("B3LYP", basis) ks = dft.scf(SpinorbitalKind.Unrestricted) ks.setchargemultiplicity(0, 1) energy = ks.run()
Crystal structure analysis
crystal = Crystal.fromciffile("structure.cif") dimers = crystal.symmetryuniquedimers(10.0) # Get unique dimers within 10 Å ```
For more examples and detailed API documentation, please refer to the documentation.
Build from Source
Prerequisites
- C++17 compliant compiler (GCC 10+ recommended)
- CMake 3.15+
- Ninja (recommended) or Make
Dependencies
OCC uses modern C++ libraries to provide its functionality:
| Library | Version | Description | |---------|---------|-------------| | CLI11 | 2.4.2 | Command line parser | | Eigen3 | 3.4.0+ | Linear algebra | | fmt | 11.0.2 | String formatting | | gemmi | 0.6.5 | Crystallographic file handling | | LBFGS++ | master | Optimization algorithms | | libcint | 6.1.2 | Gaussian integrals | | libxc | 6.2.2 | Exchange-correlation functionals | | nlohmann/json | 3.11.3 | JSON handling | | scnlib | 4.0.1 | String parsing | | spdlog | 1.15.0 | Logging | | unordered_dense | 4.5.0 | Hash containers |
Optional dependencies: - nanobind (2.4.0) - For Python bindings
Most dependencies are automatically handled through CPM. System-installed versions of Eigen3 and libxc can be used if available.
OCC's geometry optimization implementation for molecules made significant use of the code and documentation from pyberny - the files in the opt submodule are therefore subject to the MPL license.
Build Instructions
Clone the repository:
bash git clone https://github.com/peterspackman/occ.git cd occConfigure dependency caching (recommended):
bash export CPM_SOURCE_CACHE="$HOME/.cache/cpm"Build with CMake: ```bash mkdir build && cd build
# Using system dependencies (if available) cmake .. -GNinja
# OR download all dependencies cmake .. -GNinja -DUSESYSTEMLIBXC=OFF -DUSESYSTEMEIGEN=OFF
# Build the executable ninja occ ```
CMake Options
USE_SYSTEM_LIBXC: Use system-installed libxc (default: ON)USE_SYSTEM_EIGEN: Use system-installed Eigen3 (default: ON)WITH_PYTHON_BINDINGS: Build Python bindings (default: OFF)USE_MLX: Enable MLX integration (default: OFF)USE_QCINT: Use QCInt instead of libcint (default: OFF)ENABLE_HOST_OPT: Enable host-specific optimizations (default: OFF)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Citation
If you use OCC in your research, please cite the appropriate papers for all functionals, methods etc. you use, along with the citations for the core dependencies here.
Owner
- Name: Peter Spackman
- Login: peterspackman
- Kind: user
- Location: Perth, Western Australia
- Company: Curtin University
- Website: prs.wiki
- Twitter: prspackman
- Repositories: 3
- Profile: https://github.com/peterspackman
Research Fellow in the Computational Materials and Minerals group @ Curtin University
JOSS Publication
Open Computational Chemistry (OCC) - A portable software library and program for quantum chemistry and crystallography
Authors
Tags
Python WebAssembly quantum chemistry crystallography density functional theory crystal growthGitHub Events
Total
- Release event: 19
- Delete event: 3
- Member event: 1
- Pull request event: 12
- Fork event: 2
- Issues event: 24
- Watch event: 7
- Issue comment event: 49
- Push event: 174
- Create event: 25
Last Year
- Release event: 12
- Delete event: 2
- Member event: 1
- Pull request event: 10
- Fork event: 2
- Issues event: 16
- Watch event: 6
- Issue comment event: 43
- Push event: 97
- Create event: 15
Issues and Pull Requests
Last synced: 2 months ago
All Time
- Total issues: 32
- Total pull requests: 13
- Average time to close issues: 26 days
- Average time to close pull requests: about 9 hours
- Total issue authors: 8
- Total pull request authors: 3
- Average comments per issue: 0.94
- Average comments per pull request: 2.23
- Merged pull requests: 13
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 17
- Pull requests: 10
- Average time to close issues: 6 days
- Average time to close pull requests: about 12 hours
- Issue authors: 6
- Pull request authors: 3
- Average comments per issue: 1.18
- Average comments per pull request: 2.9
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- peterspackman (12)
- MilitaoLucas (8)
- alanliska (3)
- CrystalGrower (3)
- FlorianKleemiss (3)
- Luke2Sky (1)
- NathandB94 (1)
- aleksandrdubok (1)
Pull Request Authors
- peterspackman (8)
- MilitaoLucas (4)
- blake-armstrong (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- npm 24 last-month
- pypi 874 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 33
- Total maintainers: 1
npmjs.org: @peterspackman/occjs
JavaScript/WebAssembly bindings for OCC - a quantum chemistry and crystallography library
- Homepage: https://github.com/peterspackman/occ#readme
- License: GPL-3.0
-
Latest release: 0.8.8
published 3 months ago
Rankings
Maintainers (1)
pypi.org: occpy
A library for quantum chemistry
- Homepage: https://github.com/peterspackman/occ
- Documentation: https://occpy.readthedocs.io/
- License: GNU General Public License v3 or later (GPLv3+)
-
Latest release: 0.8.8
published 3 months ago
Rankings
Maintainers (1)
Dependencies
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- peaceiris/actions-gh-pages v3 composite
