Open
Description
Another discovery by @bananenpampe. The following code segfaults:
from rascal.representations import SphericalInvariants
hypers = {
"soap_type": "PowerSpectrum",
"interaction_cutoff": 3,
"radial_basis": "GTO",
"max_radial": 0,
"max_angular": 9,
"gaussian_sigma_constant": 0.3,
"gaussian_sigma_type": "Constant",
"cutoff_function_type": "ShiftedCosine",
"cutoff_smooth_width": 0.5,
"normalize": True,
}
soap = SphericalInvariants(**hypers)
I think this should throw an error instead!
Other invalid combinations:
max_radial | max_angular | expected | actual |
---|---|---|---|
1 | 0 | OK | OK |
0 | 1 | Error | segfault |
0 | 0 | Error | segfault |
0 | -1 | Error | segfault |
1 | -1 | Error | segfault |
1 | -3 | Error | std::bad_alloc |
-1 | 1 | Error | std::bad_alloc |