aimmd.tools

aimmd.tools#

This file contains functions and classes (re)used internally in aimmd.

These functions and classes are not (thought to be) exposed to the users but instead intended to be (re)used in newly added asyncmd code.

Currently in here are:

  • attach_kwargs_to_object: a function to attach kwargs to an object as properties or attributes. This does type checking and warns when previously unset things are set. It is used, e.g., in the distributed.CommittorSimulation class.

  • is_documented_by: a decorator to copy the docstring of a method to the decorated one

Functions

attach_kwargs_to_object(obj, *, logger, **kwargs)

Set all kwargs as object attributes/properties, error on mismatching type.

is_documented_by(original)

Decorator to copy the docstring of a given method to the decorated method.

is_documented_by_docstring(docstring, ...)

Decorator to add the given docstring to the decorated method.