diff --git a/include/gauxc/shell.hpp b/include/gauxc/shell.hpp index 7f27170c..01d35f42 100644 --- a/include/gauxc/shell.hpp +++ b/include/gauxc/shell.hpp @@ -138,6 +138,12 @@ class alignas(256) Shell { alpha_( alpha ), coeff_( coeff ), O_( O ), nprim_( nprim.get() ), l_( l.get() ), pure_( pure.get() ) { + if(nprim_ > detail::shell_nprim_max) { + std::ostringstream oss; + oss << "Shell has too many primitives! expected <= " << detail::shell_nprim_max << " actual value " << nprim_ << "!\n"; + throw std::out_of_range(oss.str()); + } + if( _normalize ) normalize(); compute_shell_cutoff();