openmmtools.utils.find_subclass¶
- openmmtools.utils.find_subclass(parent_cls, subcls_name)[source]¶
Return the class called
subcls_name
inheriting fromparent_cls
.- Parameters:
- parent_clstype
The parent class.
- subcls_namestr
The name of the class inheriting from
parent_cls
.
- Returns:
- subclstype
The class inheriting from
parent_cls
calledsubcls_name
.
- Raises:
- ValueError
If there is no class or there are multiple classes called
subcls_name
that inherit fromparent_cls
.