utils
- class almos.utils.Logger(filein, append, suffix='dat', verbose=True)
Class that wraps a file object to abstract the logging.
- finalize()
Closes the file
- almos.utils.check_dependencies(self, module)
Checks if the required Python packages are installed for the specified module.
- For module "cluster":
- Only required for the aqme workflow.
Requires 'obabel', version: "3.1.1"
Requires 'aqme', version: "1.7.2"
For module "el": - Requires 'robert' on all platforms. - Requires 'scikit-learn-intelex' on Windows and Linux; optional on macOS (with a warning message).
Parameters:
- modulestr
The name of the module for which dependencies are being checked.
- almos.utils.command_line_args()
Parse and process command-line arguments.
This function reads and processes arguments provided via the command line. It validates the arguments against a predefined set of valid options, converts them to their expected data types, and combines them with default values. The final configuration is returned as an object in args using the set_options function.
Returns:
- argsobject
An object containing all configuration options, including default values and user-provided overrides.
- almos.utils.format_lists(value)
Transforms strings into a list
- almos.utils.load_variables(kwargs, almos_module, create_dat=True)
Combine user-defined arguments with default variables and set up the environment.
This function merges default values from 'var_dict' with user-provided arguments using 'set_options'. It also initializes additional variables, such as the working directory, sets up the logger and print command line used for depending on the module.
Parameters:
- kwargsdict
Dictionary of user-provided arguments to override default values.
Returns:
- selfobject
An object containing all configuration options and additional setup attributes.