auto_fileclient

atomate2.utils.file_client.auto_fileclient(method=None)[source]

Automatically pass a FileClient to the function if not already present in kwargs.

This decorator should only be applied to functions with a file_client keyword argument. If a custom file client is not supplied when the function is called, it will automatically create a new FileClient, add it to the function arguments and close the file client connects at the end of the function.

Parameters:

method (callable or None) – A function to wrap. This should not be specified directly and is implied by the decorator.

Return type:

Callable