From 28a63815e971ecc0e02ff1a13132112e9576d54a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Wed, 13 May 2026 13:36:36 +0200 Subject: [PATCH 1/3] Add bindings and CMake variable for OneDFT --- include/gauxc/gauxc_config.f.in | 1 + src/CMakeLists.txt | 5 ++++- src/fortran-api/xc_integrator.f90 | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/gauxc/gauxc_config.f.in b/include/gauxc/gauxc_config.f.in index df1dd76b..292d8462 100644 --- a/include/gauxc/gauxc_config.f.in +++ b/include/gauxc/gauxc_config.f.in @@ -10,6 +10,7 @@ #cmakedefine GAUXC_HAS_CUTLASS #cmakedefine GAUXC_HAS_GAU2GRID #cmakedefine GAUXC_HAS_HDF5 +#cmakedefine GAUXC_HAS_ONEDFT #cmakedefine GAUXC_USE_FAST_RSQRT #ifdef GAUXC_HAS_HOST diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a9e60fd8..29b0949d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -119,7 +119,10 @@ if( GAUXC_HAS_MPI ) endif() if ( GAUXC_HAS_ONEDFT ) - target_link_libraries( gauxc PUBLIC "${TORCH_LIBRARIES}" nlohmann_json::nlohmann_json) + get_target_property(GAUXC_NLOHMANN_JSON_INCLUDE_DIRS + nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES) + target_include_directories(gauxc PRIVATE ${GAUXC_NLOHMANN_JSON_INCLUDE_DIRS}) + target_link_libraries( gauxc PUBLIC "${TORCH_LIBRARIES}") endif() add_subdirectory( runtime_environment ) diff --git a/src/fortran-api/xc_integrator.f90 b/src/fortran-api/xc_integrator.f90 index 8d792b34..9d186580 100644 --- a/src/fortran-api/xc_integrator.f90 +++ b/src/fortran-api/xc_integrator.f90 @@ -27,9 +27,11 @@ module gauxc_integrator & gauxc_integrator_eval_exc_gks, & & gauxc_integrator_eval_exc_vxc_rks, & & gauxc_integrator_eval_exc_vxc_uks, & + & gauxc_integrator_eval_exc_vxc_onedft_uks, & & gauxc_integrator_eval_exc_vxc_gks, & & gauxc_integrator_eval_exc_grad_rks, & & gauxc_integrator_eval_exc_grad_uks, & + & gauxc_integrator_eval_exc_grad_onedft_uks, & & gauxc_integrator_eval_exx_rks, & & gauxc_integrator_eval_fxc_contraction_rks, & & gauxc_integrator_eval_fxc_contraction_uks From 1b9b4e93603cd76ee342804dd0dffb10da513701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Wed, 13 May 2026 14:42:38 +0200 Subject: [PATCH 2/3] Revert "Add bindings and CMake variable for OneDFT" This reverts commit 28a63815e971ecc0e02ff1a13132112e9576d54a. --- include/gauxc/gauxc_config.f.in | 1 - src/CMakeLists.txt | 5 +---- src/fortran-api/xc_integrator.f90 | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/include/gauxc/gauxc_config.f.in b/include/gauxc/gauxc_config.f.in index 292d8462..df1dd76b 100644 --- a/include/gauxc/gauxc_config.f.in +++ b/include/gauxc/gauxc_config.f.in @@ -10,7 +10,6 @@ #cmakedefine GAUXC_HAS_CUTLASS #cmakedefine GAUXC_HAS_GAU2GRID #cmakedefine GAUXC_HAS_HDF5 -#cmakedefine GAUXC_HAS_ONEDFT #cmakedefine GAUXC_USE_FAST_RSQRT #ifdef GAUXC_HAS_HOST diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 29b0949d..a9e60fd8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -119,10 +119,7 @@ if( GAUXC_HAS_MPI ) endif() if ( GAUXC_HAS_ONEDFT ) - get_target_property(GAUXC_NLOHMANN_JSON_INCLUDE_DIRS - nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES) - target_include_directories(gauxc PRIVATE ${GAUXC_NLOHMANN_JSON_INCLUDE_DIRS}) - target_link_libraries( gauxc PUBLIC "${TORCH_LIBRARIES}") + target_link_libraries( gauxc PUBLIC "${TORCH_LIBRARIES}" nlohmann_json::nlohmann_json) endif() add_subdirectory( runtime_environment ) diff --git a/src/fortran-api/xc_integrator.f90 b/src/fortran-api/xc_integrator.f90 index 9d186580..8d792b34 100644 --- a/src/fortran-api/xc_integrator.f90 +++ b/src/fortran-api/xc_integrator.f90 @@ -27,11 +27,9 @@ module gauxc_integrator & gauxc_integrator_eval_exc_gks, & & gauxc_integrator_eval_exc_vxc_rks, & & gauxc_integrator_eval_exc_vxc_uks, & - & gauxc_integrator_eval_exc_vxc_onedft_uks, & & gauxc_integrator_eval_exc_vxc_gks, & & gauxc_integrator_eval_exc_grad_rks, & & gauxc_integrator_eval_exc_grad_uks, & - & gauxc_integrator_eval_exc_grad_onedft_uks, & & gauxc_integrator_eval_exx_rks, & & gauxc_integrator_eval_fxc_contraction_rks, & & gauxc_integrator_eval_fxc_contraction_uks From e22da3bc97bbad67a8437193959de4c80d559ddd Mon Sep 17 00:00:00 2001 From: "Thomas D. Kuehne" Date: Wed, 13 May 2026 14:44:38 +0200 Subject: [PATCH 3/3] Export a CMake flag for OneDFT, export OneDFT Fortran bindings --- include/gauxc/gauxc_config.f.in | 1 + src/fortran-api/xc_integrator.f90 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/gauxc/gauxc_config.f.in b/include/gauxc/gauxc_config.f.in index df1dd76b..292d8462 100644 --- a/include/gauxc/gauxc_config.f.in +++ b/include/gauxc/gauxc_config.f.in @@ -10,6 +10,7 @@ #cmakedefine GAUXC_HAS_CUTLASS #cmakedefine GAUXC_HAS_GAU2GRID #cmakedefine GAUXC_HAS_HDF5 +#cmakedefine GAUXC_HAS_ONEDFT #cmakedefine GAUXC_USE_FAST_RSQRT #ifdef GAUXC_HAS_HOST diff --git a/src/fortran-api/xc_integrator.f90 b/src/fortran-api/xc_integrator.f90 index 8d792b34..9d186580 100644 --- a/src/fortran-api/xc_integrator.f90 +++ b/src/fortran-api/xc_integrator.f90 @@ -27,9 +27,11 @@ module gauxc_integrator & gauxc_integrator_eval_exc_gks, & & gauxc_integrator_eval_exc_vxc_rks, & & gauxc_integrator_eval_exc_vxc_uks, & + & gauxc_integrator_eval_exc_vxc_onedft_uks, & & gauxc_integrator_eval_exc_vxc_gks, & & gauxc_integrator_eval_exc_grad_rks, & & gauxc_integrator_eval_exc_grad_uks, & + & gauxc_integrator_eval_exc_grad_onedft_uks, & & gauxc_integrator_eval_exx_rks, & & gauxc_integrator_eval_fxc_contraction_rks, & & gauxc_integrator_eval_fxc_contraction_uks