pfd.entrypoint package

Submodules

pfd.entrypoint.args module

pfd.entrypoint.args.ase_args()[source]
pfd.entrypoint.args.bohrium_conf_args()[source]
pfd.entrypoint.args.caly_args()[source]
pfd.entrypoint.args.conf_args()[source]
pfd.entrypoint.args.default_step_config_args()[source]
pfd.entrypoint.args.dflow_conf_args()[source]
pfd.entrypoint.args.evaluate_args()[source]
pfd.entrypoint.args.explore_args()[source]
pfd.entrypoint.args.fp_args(inputs, run)[source]
pfd.entrypoint.args.gen_doc(*, make_anchor=True, make_link=True, **kwargs)[source]

[Modified from DPGEN2]Generate the doc string of the submit args

Parameters:
  • make_anchor (bool, optional) – _description_. Defaults to True.

  • make_link (bool, optional) – _description_. Defaults to True.

Returns:

_description_

Return type:

_type_

pfd.entrypoint.args.h_filter_args()[source]
pfd.entrypoint.args.inputs_args()[source]

The input parameters and artifacts of PFD workflow

pfd.entrypoint.args.label_args()[source]
pfd.entrypoint.args.normalize(data)[source]
pfd.entrypoint.args.pfd_step_config_args(default_config)[source]
pfd.entrypoint.args.select_confs_args()[source]
pfd.entrypoint.args.submit_args(default_step_config={'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}})[source]

Normalize the full input arguments of the submit script

Parameters:

default_step_config (_type_, optional) – _description_. Defaults to normalize_step_dict({}).

Returns:

_description_

Return type:

_type_

pfd.entrypoint.args.task_args()[source]
pfd.entrypoint.args.train_args(run_train)[source]

[Modified from DPGEN2] General train config

pfd.entrypoint.args.training_args()[source]
pfd.entrypoint.args.variant_conv()[source]
pfd.entrypoint.args.variant_explore()[source]
pfd.entrypoint.args.variant_fp()[source]
pfd.entrypoint.args.variant_frame_selector()[source]
pfd.entrypoint.args.variant_train()[source]
pfd.entrypoint.args.wf_args(default_step_config={'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}})[source]

pfd.entrypoint.common module

pfd.entrypoint.common.expand_idx(in_list) List[int][source]
pfd.entrypoint.common.expand_sys_str(root_dir: str | Path) List[str][source]
pfd.entrypoint.common.global_config_workflow(wf_config)[source]
pfd.entrypoint.common.perturb_cli(atoms_path_ls: List[str | Path], pert_num: int, cell_pert_fraction: float, atom_pert_distance: float, atom_pert_style: str, atom_pert_prob: float, supercell: int | Tuple[int, int, int] | None = None)[source]

A CLI function to perturb structures from file paths.

pfd.entrypoint.download module

pfd.entrypoint.download.download(workflow_id, wf_config: Dict | None = {}, wf_keys: List | None = None, prefix: str | None = None, chk_pnt: bool = False)[source]
pfd.entrypoint.download.download_by_def(workflow_id, wf_config: Dict = {}, iterations: List[int] | None = None, step_defs: List[str] | None = None, prefix: str | None = None, chk_pnt: bool = False)[source]
pfd.entrypoint.download.download_end_result(workflow_id, wf_config: Dict = {}, prefix: str | None = None)[source]

[Modified from DPGEN2]Download the final data and dataset of a workflow.

Parameters:
  • workflow_id (_type_) – The ID of the workflow to download from.

  • wf_config (Dict, optional) – The configuration of the workflow. Defaults to {}.

  • prefix (Optional[str], optional) – The prefix for the download path. Defaults to None.

Raises:

RuntimeError – If the workflow fails.

pfd.entrypoint.main module

pfd.entrypoint.main.main()[source]
pfd.entrypoint.main.main_parser() ArgumentParser[source]

PFD-kit commandline options argument parser.

Notes

This function is used by documentation.

Returns:

the argument parser

Return type:

argparse.ArgumentParser

pfd.entrypoint.main.parse_args(args: List[str] | None = None)[source]

PFD-kit commandline options argument parsing.

Parameters:

args (List[str]) – list of command line arguments, main purpose is testing default option None takes arguments from sys.argv

pfd.entrypoint.submit module

class pfd.entrypoint.submit.FlowGen(config: Dict, debug: bool = False, download_path: Path | str = PosixPath('.'))[source]

Bases: object

property download_path
submit(reuse_step: List[ArgoStep] | None = None, no_submission: bool = False, only_submit: bool = True)[source]
property wf_type
pfd.entrypoint.submit.fold_keys(all_step_keys)[source]
pfd.entrypoint.submit.get_conf_filters(config)[source]
pfd.entrypoint.submit.get_conf_filters_conv(config)[source]
pfd.entrypoint.submit.get_resubmit_keys(wf, unsuccessful_step_keys: bool = False)[source]

[From DPGEN2] Get the keys of all steps in the workflow for resubmission.

pfd.entrypoint.submit.get_superop(key)[source]

[From DPGEN2] Get the super operation key for a given step key.

Parameters:

key (str) – The step key.

Returns:

The super operation key, or None if not found.

Return type:

str

pfd.entrypoint.submit.get_systems_from_data(data, data_prefix=None)[source]
pfd.entrypoint.submit.make_pfd_op(fp_style: str = 'vasp', train_style: str = 'dp', explore_style: str = 'ase', wf_style: str = 'finetune', prep_fp_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, run_fp_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, train_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, prep_explore_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, run_explore_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, scheduler_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, collect_data_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, select_confs_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, evaluate_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, upload_python_packages: List[PathLike] | None = None, init_train: bool = False, init_fp: bool = False)[source]
pfd.entrypoint.submit.resubmit_workflow(wf_config, wfid, list_steps=False, reuse=None, fold=False, unsuccessful_step_keys: bool = False, **kwargs)[source]
pfd.entrypoint.submit.successful_step_keys(wf, unsuccessful_step_keys: bool = False)[source]

[From DPGEN2] Get the keys of all successful steps in the workflow.

Parameters:
  • wf (_type_) – The workflow object.

  • unsuccessful_step_keys (bool, optional) – If True, include keys of unsuccessful steps. Defaults to False.

Returns:

A list of successful step keys.

Return type:

list

Module contents