script_maker2000.template

This module is intended to be used as a template class and provides necessary functions for another module to be properly useful in the scope of this program.

class script_maker2000.template.TemplateModule(main_config: dict, config_key: str)

Bases: object

Initializes the TemplateModule object.

Args:

main_config (dict): The main config file. config_key (str): The loop_config key this object is handling.

Raises:

NotImplementedError: This is just a template.

classmethod check_job_status(job) bool

Provide some method to verify if a single calculation was successful. This should be handled independently from the existence of this class object.

classmethod collect_results(job, key, results_dir='finished') dict

Collect the results of the calculation and save in a {mol_id}_calc_result.json file in each subfolder.

Raises:

NotImplementedError: _description_

create_internal_config(main_config, config_key) dict

Extracts the necessary information from the main config and stores them. The main config stores all the information for the entire program, this function filters out the config for this specific calculation step. Returns:

dict: A dict of the sub config.

abstractmethod create_slurm_scripts(slurm_config=None) str | Path

Create the slurm script that is used to submit this calculation run to the server.

abstractmethod prepare_jobs(input_dirs, **kwargs) dict

Prepare the job files for submission.

Args:

input_files (list): List of input files.

Returns:

dict: A dict of the sub config.

abstractmethod restart_jobs(job_list, key)

Restart a job that failed.

Args:

job_list (list): List of jobs that failed. key (str): The key of the job that failed.

abstractmethod run_job(job) None

Interface to send the job to the server.

Raises:

NotImplementedError: _description_