1+ ! GauXC Copyright (c) 2020-2024, The Regents of the University of California,
2+ ! through Lawrence Berkeley National Laboratory (subject to receipt of
3+ ! any required approvals from the U.S. Dept. of Energy).
4+ !
5+ ! (c) 2024-2025, Microsoft Corporation
6+ !
7+ ! All rights reserved.
8+ !
9+ ! See LICENSE.txt for details
10+
11+ ! > @brief Module defining basis set functionality for GauXC
12+ module gauxc_basisset
13+ use iso_c_binding, only : c_ptr, c_null_ptr, c_size_t
14+ use gauxc_status, only : gauxc_status_type
15+ use gauxc_types, only : gauxc_header_type, gauxc_type_basisset
16+ use gauxc_shell, only : gauxc_shell_type
17+ implicit none
18+ private
19+
20+ public :: &
21+ & gauxc_basisset_new, &
22+ & gauxc_basisset_new_from_shells, &
23+ & gauxc_basisset_delete
24+
25+ ! > @brief C interoperable basis set type
26+ type, bind(c), public :: gauxc_basisset_type
27+ ! > Header containing type information
28+ type (gauxc_header_type) :: header = gauxc_header_type(gauxc_type_basisset)
29+ ! > Pointer to the internal basis set object
30+ type (c_ptr) :: ptr = c_null_ptr
31+ end type gauxc_basisset_type
32+
33+ interface
34+ ! > @brief Create new basis set object
35+ function gauxc_basisset_new (status ) result(basis) bind(c)
36+ import :: gauxc_basisset_type, gauxc_status_type
37+ implicit none
38+ ! > @param status Status of the operation
39+ type (gauxc_status_type), intent (out ) :: status
40+ ! > @return Pointer to the newly created basis set object
41+ type (gauxc_basisset_type) :: basis
42+ end function gauxc_basisset_new
43+
44+ ! > @brief Create a new BasisSet instance from an array of Shells
45+ function gauxc_basisset_new_from_shells (status , shells , nshells ) result(basis) bind(c)
46+ import :: c_size_t, gauxc_status_type, gauxc_shell_type, gauxc_basisset_type
47+ implicit none
48+ ! > @param status Status of the operation
49+ type (gauxc_status_type), intent (out ) :: status
50+ ! > @param shells Pointer to an array of Shell objects
51+ type (gauxc_shell_type), intent (in ) :: shells(* )
52+ ! > @param nshells Number of shells in the array
53+ integer (c_size_t), value :: nshells
54+ ! > @return Pointer to the newly created basis set object
55+ type (gauxc_basisset_type) :: basis
56+ end function gauxc_basisset_new_from_shells
57+
58+ ! > @brief Delete a GauXC basis set object
59+ subroutine gauxc_basisset_delete (status , basis ) bind(c)
60+ import :: gauxc_status_type, gauxc_basisset_type
61+ implicit none
62+ ! > @param status Status of the operation
63+ type (gauxc_status_type), intent (out ) :: status
64+ ! > @param basis Pointer to the basis set object to delete
65+ type (gauxc_basisset_type), intent (inout ) :: basis
66+ end subroutine gauxc_basisset_delete
67+ end interface
68+
69+ contains
70+
71+ end module gauxc_basisset
0 commit comments