asyncmd.tools#
This file contains functions and classes (re)used internally in asyncmd.
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. This is also not the place for MD-related utility functions, for this see utils.py
Currently in here are:
ensure_executable_available
remove_file_if_exist and remove_file_if_exist_async
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 GmxEngine and SlurmProcess classes.
DescriptorWithDefaultOnInstanceAndClass and DescriptorOutputTrajType: two descriptor classes to make default values accessible on the class level but still enable checks when setting on the instance level (like a property), used in the GmxEngine classes but could/should be useful for any MDEngine class
FlagChangeList (and its typed sibling): lists with some sugar to remember if their content has changed
Functions
|
Set all kwargs as object attributes/properties, error on mismatching type. |
|
Ensure the given executable is available and executable. |
|
Remove a given file if it exists. |
|
Remove a given file if it exists asynchronously. |
Classes
|
Check the value given is in the set of allowed values before setting. |
|
A descriptor that makes the (default) value of the private attribute |
|
A list that knows if it has been changed after initializing. |
|
A |