check_class_name¶
- atomate2.common.utils.check_class_name(obj, class_names)[source]¶
Check if an object’s class name matches an allowed list.
This allows us to check if an object is an instance of a class (eg a Maker) without importing the class itself. Useful to replace isinstance(obj, Maker) in common workflows or jobs where we should avoid introducing other dependencies.