openmmtools.utils.find_subclass

openmmtools.utils.find_subclass(parent_cls, subcls_name)[source]

Return the class called subcls_name inheriting from parent_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 called subcls_name.

Raises:
ValueError

If there is no class or there are multiple classes called subcls_name that inherit from parent_cls.