{"id":21128853,"url":"https://github.com/peterspackman/occ","last_synced_at":"2025-07-09T00:31:32.729Z","repository":{"id":83435442,"uuid":"292276139","full_name":"peterspackman/occ","owner":"peterspackman","description":"Open Computational Chemistry in C++","archived":false,"fork":false,"pushed_at":"2025-07-07T06:01:03.000Z","size":32161,"stargazers_count":20,"open_issues_count":11,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-07T07:19:47.973Z","etag":null,"topics":["chemistry","cpp17","library","quantum-chemistry"],"latest_commit_sha":null,"homepage":"https://peterspackman.github.io/occ/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterspackman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-02T12:26:03.000Z","updated_at":"2025-07-07T06:01:06.000Z","dependencies_parsed_at":"2023-11-13T01:32:44.068Z","dependency_job_id":"42c4eea7-77a1-4d92-ac65-98049b94e80a","html_url":"https://github.com/peterspackman/occ","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/peterspackman/occ","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterspackman%2Focc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterspackman%2Focc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterspackman%2Focc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterspackman%2Focc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterspackman","download_url":"https://codeload.github.com/peterspackman/occ/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterspackman%2Focc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264032770,"owners_count":23546859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chemistry","cpp17","library","quantum-chemistry"],"created_at":"2024-11-20T05:10:47.061Z","updated_at":"2025-07-09T00:31:32.720Z","avatar_url":"https://github.com/peterspackman.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open Computational Chemistry (OCC)\n\u003cimg src=\"https://github.com/peterspackman/occ/raw/main/docs/static/occ.png\" width=640/\u003e\n\n[![Build \u0026 Test](https://github.com/peterspackman/occ/actions/workflows/build_test.yml/badge.svg)](https://github.com/peterspackman/occ/actions/workflows/build_test.yml)\n[![PyPI version](https://badge.fury.io/py/occpy.svg)](https://badge.fury.io/py/occpy)\n[![PyPI Downloads](https://img.shields.io/pypi/dm/occpy)](https://pypi.org/project/occpy/)\n[![DOI](https://zenodo.org/badge/292276139.svg)](https://zenodo.org/doi/10.5281/zenodo.10703204)\n\nA next-generation quantum chemistry and crystallography program and library, designed for modern computational workflows.\n\n\u003e **Note**: OCC is in active development and undergoes frequent changes. The API and features are not yet stable.\n\n## Installation\n\n### From PyPI\n\nThe easiest way to install OCC is via pip:\n\n```bash\npip install occpy\n```\n\nSupported Python versions:\n- Python 3.10, 3.11, 3.12, 3.13\n\nPre-built wheels are available for:\n- Linux (x86_64)\n- macOS (x86_64 and ARM64/Apple Silicon via universal2 wheels)\n\n## Features\n\n### Quantum Chemistry\n\nOCC provides comprehensive functionality for ground-state single-point calculations:\n\n- **Electronic Structure Methods**\n  - Hartree-Fock (Restricted, Unrestricted, and General Spinorbitals)\n  - Density-Functional Theory (Restricted \u0026 Unrestricted)\n    - Supported approximations: LDA, GGA, meta-GGA\n    - Global hybrid functionals (range-separated support planned)\n  - Density fitting (RI-JK) with auxiliary basis sets\n  - Implicit solvation via SMD\n  - XDM dispersion model\n\n- **Property Calculations**\n  - Molecular and atomic multipole moments (up to hexadecapole)\n  - Electron density, Electrostatic potential\n  - CHELPG charges\n  - Isosurfaces, generation of volumetric data and more...\n\n### Crystal Structure Analysis\n\n- CIF file processing (via gemmi)\n- Advanced periodic analysis:\n  - Fast periodic bond detection\n  - Symmetry-unique molecule generation\n  - Dimer identification\n- Energy calculations:\n  - CrystalExplorer model energies\n  - Automatic direct space lattice energy summation\n  - Wolf summation for neutral molecular crystals\n- Surface analysis:\n  - Hirshfeld surfaces\n  - Promolecule surfaces\n\n### Additional Features\n\n- Spherical harmonic transforms (FFT-based)\n- Molecular point group detection\n- File format support:\n  - Gaussian fchk files (read/write)\n  - Molden files\n  - NumPy `.npy` arrays (write)\n  - QCSchema JSON\n  - Basic Gaussian input files\n- Geometric algorithms:\n  - Marching cubes\n  - Morton codes for linear-hashed octrees\n- Electronegativity equilibration method for charges\n- Python bindings via nanobind\n\n## Python API Examples\n\n```python\nimport occpy\nfrom occpy import Crystal, Molecule, AOBasis, HartreeFock, DFT\nfrom occpy import SpinorbitalKind\n\n# Set up basic configuration\noccpy.set_log_level(occpy.LogLevel.WARN)  # Configure logging level\n# occpy.set_data_directory(\"/path/to/basis/sets\")  # Optional: Set basis set path\n\n# Load molecule from XYZ file\nmol = Molecule.from_xyz_file(\"h2o.xyz\")\n\n# Basic Restricted Hartree-Fock calculation\nbasis = AOBasis.load(mol.atoms(), \"6-31G\")\nhf = HartreeFock(basis)\nscf = hf.scf()\nenergy = scf.run()\nwfn = scf.wavefunction()\n\n# DFT calculation\ndft = DFT(\"B3LYP\", basis)\nks = dft.scf(SpinorbitalKind.Unrestricted)\nks.set_charge_multiplicity(0, 1)\nenergy = ks.run()\n\n# Crystal structure analysis\ncrystal = Crystal.from_cif_file(\"structure.cif\")\ndimers = crystal.symmetry_unique_dimers(10.0)  # Get unique dimers within 10 Å\n```\n\nFor more examples and detailed API documentation, please refer to the [documentation](docs_url_here).\n\n## Build from Source\n\n### Prerequisites\n\n- C++17 compliant compiler (GCC 10+ recommended)\n- CMake 3.15+\n- Ninja (recommended) or Make\n\n### Dependencies\n\nOCC uses modern C++ libraries to provide its functionality:\n\n| Library | Version | Description |\n|---------|---------|-------------|\n| [CLI11](https://github.com/CLIUtils/CLI11) | 2.4.2 | Command line parser |\n| [Eigen3](https://eigen.tuxfamily.org/) | 3.4.0+ | Linear algebra |\n| [fmt](https://github.com/fmtlib/fmt) | 11.0.2 | String formatting |\n| [gemmi](https://gemmi.readthedocs.io/) | 0.6.5 | Crystallographic file handling |\n| [LBFGS++](https://lbfgspp.statr.me/) | master | Optimization algorithms |\n| [libcint](https://github.com/sunqm/libcint) | 6.1.2 | Gaussian integrals |\n| [libxc](http://www.tddft.org/programs/libxc/) | 6.2.2 | Exchange-correlation functionals |\n| [nlohmann/json](https://github.com/nlohmann/json) | 3.11.3 | JSON handling |\n| [scnlib](https://github.com/eliaskosunen/scnlib) | 4.0.1 | String parsing |\n| [spdlog](https://github.com/gabime/spdlog) | 1.15.0 | Logging |\n| [unordered_dense](https://github.com/martinus/unordered_dense) | 4.5.0 | Hash containers |\n\nOptional dependencies:\n- [nanobind](https://github.com/wjakob/nanobind) (2.4.0) - For Python bindings\n\nMost dependencies are automatically handled through [CPM](https://github.com/cpm-cmake/CPM.cmake). System-installed versions of Eigen3 and libxc can be used if available.\n\n### Build Instructions\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/peterspackman/occ.git\n   cd occ\n   ```\n\n2. Configure dependency caching (recommended):\n   ```bash\n   export CPM_SOURCE_CACHE=\"$HOME/.cache/cpm\"\n   ```\n\n3. Build with CMake:\n   ```bash\n   mkdir build \u0026\u0026 cd build\n   \n   # Using system dependencies (if available)\n   cmake .. -GNinja\n\n   # OR download all dependencies\n   cmake .. -GNinja -DUSE_SYSTEM_LIBXC=OFF -DUSE_SYSTEM_EIGEN=OFF\n\n   # Build the executable\n   ninja occ\n   ```\n\n### CMake Options\n\n- `USE_SYSTEM_LIBXC`: Use system-installed libxc (default: ON)\n- `USE_SYSTEM_EIGEN`: Use system-installed Eigen3 (default: ON)\n- `WITH_PYTHON_BINDINGS`: Build Python bindings (default: OFF)\n- `USE_MLX`: Enable MLX integration (default: OFF)\n- `USE_QCINT`: Use QCInt instead of libcint (default: OFF)\n- `ENABLE_HOST_OPT`: Enable host-specific optimizations (default: OFF)\n\n## Contributing\n\nContributions 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.\n\n## Citation\n\nIf 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterspackman%2Focc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterspackman%2Focc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterspackman%2Focc/lists"}