-
Notifications
You must be signed in to change notification settings - Fork 37
Add Fortran API #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
awvwgk
wants to merge
34
commits into
wavefunction91:master
Choose a base branch
from
awvwgk:fortran-api
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Fortran API #174
Changes from 10 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
1c87794
Add C API for GauXC
awvwgk bb7b43f
Add Fortran API
awvwgk 6440889
Fix defaults for GAUXC_ENABLE_FORTRAN values
awvwgk 65d3ab7
Pass runtime environment by value
awvwgk 407efcc
Fix typo in symbol
awvwgk 9819ba4
Remove default error message
awvwgk 3722de2
Pass by value
awvwgk ff16199
Fix check for number of primitives
awvwgk 9b2d9da
Merge branch 'c-api' into fortran-api
awvwgk 12a44b4
Minor fixes
awvwgk a7d430e
Move C API to separate directory
awvwgk 07b1eb1
Restructure C API
awvwgk 3b177b3
Merge branch 'c-api' into fortran-api
awvwgk b020748
Update Fortran API
awvwgk 407ff08
Merge remote-tracking branch 'upstream/master' into c-api
awvwgk 0ee7227
Merge branch 'c-api' into fortran-api
awvwgk 8dada20
Add Fortran specific rt routines for using MPI_Comm_f2c converter
awvwgk 7e26660
Fix type declaration for OpenMPI
awvwgk 30267be
Move C headers
awvwgk 1d8ee57
Merge branch 'c-api' into fortran-api
awvwgk 4119222
Add convenience interface for molecule and basis set construction
awvwgk ace8c7e
Fix Fortran API
awvwgk ecf4a9c
Address review comments
awvwgk 46c63ea
Merge branch 'c-api' into fortran-api
awvwgk e725c2d
Add additional integrator interfaces
awvwgk dbf4b1c
Fix signature for exc grad
awvwgk 5f784ae
Fix test suite
awvwgk bc5eeee
Merge branch 'c-api' into fortran-api
awvwgk cacb3ef
More fixes
awvwgk 2fe0d66
Merge branch 'c-api' into fortran-api
awvwgk aa4b650
Fix intent for status handler
awvwgk 08e7a70
Merge branch 'master' into fortran-api
awvwgk 5f632fd
Add normalize to basisset construction API
awvwgk 7b09f66
Fix tests
awvwgk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| /** | ||
| * GauXC Copyright (c) 2020-2024, The Regents of the University of California, | ||
| * through Lawrence Berkeley National Laboratory (subject to receipt of | ||
| * any required approvals from the U.S. Dept. of Energy). | ||
| * | ||
| * (c) 2024-2025, Microsoft Corporation | ||
| * | ||
| * All rights reserved. | ||
| * | ||
| * See LICENSE.txt for details | ||
| */ | ||
| #pragma once | ||
|
|
||
| #ifdef __cplusplus | ||
| #include <cstdint> | ||
| #include <cstdbool> | ||
| #include <cstddef> | ||
| #else | ||
| #include <stdint.h> | ||
| #include <stdbool.h> | ||
| #include <stddef.h> | ||
| #endif | ||
|
|
||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| namespace GauXC::C { | ||
| #endif | ||
|
|
||
| /** | ||
| * @brief GauXC C API Atom representation. | ||
| */ | ||
| typedef struct GauXCAtom { | ||
| int64_t Z; ///< Atomic number. | ||
| double x; ///< X coordinate (Bohr). | ||
| double y; ///< Y coordinate (Bohr). | ||
| double z; ///< Z coordinate (Bohr). | ||
| } GauXCAtom; | ||
|
|
||
| #ifdef __cplusplus | ||
| } // namespace GauXC::C | ||
| } // extern "C" | ||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| /** | ||
| * GauXC Copyright (c) 2020-2024, The Regents of the University of California, | ||
| * through Lawrence Berkeley National Laboratory (subject to receipt of | ||
| * any required approvals from the U.S. Dept. of Energy). | ||
| * | ||
| * (c) 2024-2025, Microsoft Corporation | ||
| * | ||
| * All rights reserved. | ||
| * | ||
| * See LICENSE.txt for details | ||
| */ | ||
| #pragma once | ||
|
|
||
| #ifdef __cplusplus | ||
| #include <cstdint> | ||
| #include <cstdbool> | ||
| #include <cstddef> | ||
| #else | ||
| #include <stdint.h> | ||
| #include <stdbool.h> | ||
| #include <stddef.h> | ||
| #endif | ||
| #include <gauxc/types.h> | ||
| #include <gauxc/status.h> | ||
| #include <gauxc/shell.h> | ||
|
|
||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| namespace GauXC::C { | ||
| #endif | ||
|
|
||
| /** | ||
| * @brief GauXC C API BasisSet handle. | ||
| */ | ||
| typedef struct GauXCBasisSet { | ||
| GauXCHeader hdr; ///< Header for internal use. | ||
| void* ptr; ///< Pointer to the BasisSet instance. | ||
| } GauXCBasisSet; | ||
|
|
||
| /** | ||
| * @brief Create a new BasisSet instance. | ||
| * @param status Status object to capture any errors. | ||
| * @return Handle to the created BasisSet. | ||
| */ | ||
| extern GauXCBasisSet gauxc_basisset_new( GauXCStatus* status ); | ||
|
|
||
| /** | ||
| * @brief Create a new BasisSet instance from arrays of shells. | ||
| * @param status Status object to capture any errors. | ||
| * @param shells Pointer to an array of GauXCShell. | ||
| * @param nshells Number of shells in the array. | ||
| * @param normalize Whether to normalize the basis functions. | ||
| * @return Handle to the created BasisSet. | ||
| */ | ||
| extern GauXCBasisSet gauxc_basisset_new_from_shells( | ||
| GauXCStatus* status, | ||
| GauXCShell* shells, | ||
| size_t nshells, | ||
| bool normalize | ||
| ); | ||
|
|
||
| /** | ||
| * @brief Delete a BasisSet instance. | ||
| * @param status Status object to capture any errors. | ||
| * @param basis Handle to the BasisSet to delete. | ||
| */ | ||
| extern void gauxc_basisset_delete( GauXCStatus* status, GauXCBasisSet* basis ); | ||
|
|
||
| #ifdef __cplusplus | ||
| } // namespace GauXC::C | ||
| } // extern "C" | ||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| /** | ||
| * GauXC Copyright (c) 2020-2024, The Regents of the University of California, | ||
| * through Lawrence Berkeley National Laboratory (subject to receipt of | ||
| * any required approvals from the U.S. Dept. of Energy). | ||
| * | ||
| * (c) 2024-2025, Microsoft Corporation | ||
| * | ||
| * All rights reserved. | ||
| * | ||
| * See LICENSE.txt for details | ||
| */ | ||
| #pragma once | ||
|
|
||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| namespace GauXC::C { | ||
| #endif | ||
|
|
||
| /** | ||
| * @brief GauXC specific enums for the specification of radial quadratures | ||
| * | ||
| * Generally mapped to equivalent enums in IntegratorXX | ||
| */ | ||
| enum GauXC_RadialQuad { | ||
| GauXC_RadialQuad_Becke, ///< Becke radial quadrature | ||
| GauXC_RadialQuad_MuraKnowles, ///< Mura-Knowles radial quadrature | ||
| GauXC_RadialQuad_MurrayHandyLaming, ///< Murray-Handy-Laming radial quadrature | ||
| GauXC_RadialQuad_TreutlerAhlrichs ///< Treutler-Ahlrichs radial quadrature | ||
| }; | ||
|
|
||
| /** | ||
| * @brief Specifications of grid defaults for atomic integration | ||
| * | ||
| * See https://gaussian.com/integral for specification | ||
| */ | ||
| enum GauXC_AtomicGridSizeDefault { | ||
| GauXC_AtomicGridSizeDefault_FineGrid, ///< Fine grid (least accurate) | ||
| GauXC_AtomicGridSizeDefault_UltraFineGrid, ///< Ultrafine grid (appropriate accuracy) | ||
| GauXC_AtomicGridSizeDefault_SuperFineGrid, ///< Superfine grid (most accurate) | ||
| GauXC_AtomicGridSizeDefault_GM3, ///< Treutler-Ahlrichs GM3 | ||
| GauXC_AtomicGridSizeDefault_GM5 ///< Treutlet-Ahlrichs GM5 | ||
| }; | ||
|
|
||
| /** | ||
| * @brief Specifications of atomic partitioning scheme for the | ||
| * molecular integration | ||
| */ | ||
| enum GauXC_XCWeightAlg { | ||
| GauXC_XCWeightAlg_NOTPARTITIONED, ///< Not partitioned | ||
| GauXC_XCWeightAlg_Becke, ///< The original Becke weighting scheme | ||
| GauXC_XCWeightAlg_SSF, ///< The Stratmann-Scuseria-Frisch weighting scheme | ||
| GauXC_XCWeightAlg_LKO ///< The Lauqua-Kuessman-Ochsenfeld weighting scheme | ||
| }; | ||
|
|
||
| /** | ||
| * @brief Specification of the execution space for various operations | ||
| */ | ||
| enum GauXC_ExecutionSpace { | ||
| GauXC_ExecutionSpace_Host, ///< Execute task on the host | ||
| GauXC_ExecutionSpace_Device ///< Execute task on the device (e.g. GPU) | ||
| }; | ||
|
|
||
| /// Supported Algorithms / Integrands | ||
| enum GauXC_SupportedAlg { | ||
| GauXC_SupportedAlg_XC, | ||
| GauXC_SupportedAlg_DEN, | ||
| GauXC_SupportedAlg_SNLINK | ||
| }; | ||
|
|
||
| /// High-level specification of pruning schemes for atomic quadratures | ||
| enum GauXC_PruningScheme { | ||
| GauXC_PruningScheme_Unpruned, ///< Unpruned atomic quadrature | ||
| GauXC_PruningScheme_Robust, ///< The "Robust" scheme of Psi4 | ||
| GauXC_PruningScheme_Treutler ///< The Treutler-Ahlrichs scheme | ||
| }; | ||
|
|
||
|
|
||
| #ifdef __cplusplus | ||
| } // namespace GauXC::C | ||
| } // extern "C" | ||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.