Skip to content

Conversation

@awvwgk
Copy link
Collaborator

@awvwgk awvwgk commented Jan 19, 2026

  • GauXC::Molecule in gauxc/molecule.hpp
  • GauXC::Atom in gauxc/atom.hpp
  • GauXC::BasisSet in gauxc/basisset.hpp (double only)
  • GauXC::Shell in gauxc/shell.hpp
    • set_shell_tolerance method
  • GauXC::RuntimeEnvironment and GauXC::DeviceRuntimeEnvironment
    • set_buffer, comm_rank, comm_size
  • GauXC::AtomicGridSizeDefault, GauXC::PruningScheme, GauXC::RadialQuad in gauxc/enum.hpp
  • GauXC::MolGridFactory
    • create_default_molgrid
  • GauXC::MolGrid
  • GauXC::ExecutionSpace in gauxc/enum.hpp
  • GauXC::LoadBalancerFactory
    • get_shared_instance method
  • GauXC::MolecularWeightsFactory
    • get_instance method
  • GauXC::MolecularWeightsSettings
  • GauXC::functional_type (from ExchCXX)
  • GauXC::XCIntegratorFactory
    • get_instance method
    • provide default matrix type implementation for C
  • GauXC::XCIntegrator
    • eval_exc, eval_exc_vxc, etc. methods

Closes #171

@awvwgk awvwgk self-assigned this Jan 19, 2026
@awvwgk awvwgk force-pushed the c-api branch 3 times, most recently from dd396c2 to 5881a76 Compare January 26, 2026 09:54
@awvwgk awvwgk force-pushed the c-api branch 3 times, most recently from 1d61b38 to 83841ad Compare January 27, 2026 10:05
@awvwgk awvwgk changed the title [WIP] Basic C API for GauXC Basic C API for GauXC Jan 27, 2026
@awvwgk awvwgk added the enhancement New feature or request label Jan 27, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a comprehensive C API for the GauXC library, enabling integration with C codebases and other languages that interface with C. The implementation wraps core GauXC C++ functionality including molecular structures, basis sets, integration grids, load balancing, and XC integrators.

Changes:

  • Added C API bindings for core classes (Molecule, Atom, BasisSet, Shell, etc.)
  • Implemented factory patterns for runtime environments, load balancers, molecular weights, and XC integrators
  • Created C/C++ compatible enum definitions with mappings between C and C++ versions
  • Added HDF5 I/O support for C API
  • Refactored configuration headers to separate C and C++ concerns

Reviewed changes

Copilot reviewed 47 out of 47 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
include/gauxc/*.h New C API header files defining opaque handles and functions for core types
include/gauxc/util/c_*.hpp Helper headers for casting between C handles and C++ objects
src/c_*.cxx C API implementation files wrapping C++ functionality
include/gauxc/enum.h C-compatible enum definitions
include/gauxc/enums.hpp C++ enum class definitions mapped to C enums
include/gauxc/gauxc_config.h.in C-compatible configuration header
include/gauxc/gauxc_config.hpp C++ configuration header including C header
tests/moltypes_test.cxx Basic C API interoperability test
src/CMakeLists.txt CMake integration for conditional C API compilation
src/external/c_hdf5_*.cxx HDF5 I/O functions for C API

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- provide C enums
- add atom and molecule types
- add basis set and shell definitions
- add molecule grid and runtime environment
- add load balancer to C API
- add molecular weights for C API
- add functional class wrapping ExchCXX
- add xc integrator and matrix type
- add references for functionals
- add support for reading and writing from HDF5 in C
@awvwgk awvwgk added the C API Related to the C API label Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C API Related to the C API enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Basic C API

1 participant