Let structure container crash when initialized with something other than a ClusterSpace
As a user, I sometimes do stupid things and one such thing I do particularly often is to try to read files such as structure containers in the following non-functional way:
sc = StructureContainer('my_structure_container.sc')
The above code executes without warnings but it does of course not read the specified file. As a user I am left trying to figure why my structure container is empty before I finally realize I can't read a structure container like that. To circumvent this frustration, I suggest icet crashes when the argument given is not a ClusterSpace
object.
Action
- Raise TypeError.
Edited by Paul Erhart