openmmtools.utils.find_subclass¶
- openmmtools.utils.find_subclass(parent_cls, subcls_name)[source]¶
Return the class called
subcls_nameinheriting 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_clscalledsubcls_name.
- Raises:
- ValueError
If there is no class or there are multiple classes called
subcls_namethat inherit fromparent_cls.