openmmtools.utils.find_all_subclasses¶
- openmmtools.utils.find_all_subclasses(parent_cls, discard_abstract=False, include_parent=True)[source]¶
Return a set of all the classes inheriting from
parent_cls
.The functions handle multiple inheritance and discard the same classes.
- Parameters:
- parent_clstype
The parent class.
- discard_abstractbool, optional
If True, abstract classes are not returned (default is False).
- include_parentbool, optional
If True, the parent class will be included, unless it is abstract and
discard_abstract
isTrue
.
- Returns:
- subclassesset of type
The set of all the classes inheriting from
parent_cls
.