pydft_qmmm.utils.descriptor¶
Helpful descriptors for caching and plugin loading.
Functions
|
Create a pluggable method that applies plugins in reverse order. |
|
Create a cached method that resets when the system changes. |
- pydft_qmmm.utils.descriptor.pluggable_method(func)[source]¶
Create a pluggable method that applies plugins in reverse order.
- Parameters:
func (
Callable
[[Concatenate
[TypeVar
(Class
),ParamSpec
(P
, bound=None
)]],TypeVar
(R
)]) – The method to wrap.- Return type:
_PluggableMethod
- Returns:
A descriptor class that can be updated with additional wrapper functions, which are applied in reverse order to ensure that the first wrapper may apply the outermost changes.
- pydft_qmmm.utils.descriptor.system_cache(*attributes, obj_is_system=False)[source]¶
Create a cached method that resets when the system changes.