File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 */
1212#pragma once
1313
14+ #include < gauxc/exceptions.hpp>
1415#include < gauxc/shell.h>
1516#include < gauxc/shell.hpp>
1617#include < gauxc/basisset.h>
@@ -20,11 +21,15 @@ namespace GauXC::detail {
2021static inline BasisSet<double >* get_basisset_ptr (C::GauXCBasisSet basis) noexcept {
2122 return static_cast <BasisSet<double >*>(basis.ptr );
2223}
23- static inline Shell<double > convert_shell (C::GauXCShell shell, bool normalize) noexcept {
24+ static inline Shell<double > convert_shell (C::GauXCShell shell, bool normalize) {
2425 Shell<double >::prim_array alpha{};
2526 Shell<double >::prim_array coeff{};
2627 Shell<double >::cart_array O{0.0 , 0.0 , 0.0 };
2728
29+ if (shell.nprim > detail::shell_nprim_max) {
30+ GAUXC_GENERIC_EXCEPTION (" Number of primitives in shell exceeds maximum allowed" );
31+ }
32+
2833 for ( int32_t i = 0 ; i < shell.nprim ; ++i ) {
2934 alpha[i] = shell.exponents [i];
3035 coeff[i] = shell.coefficients [i];
You can’t perform that action at this time.
0 commit comments