pfd.op package

Submodules

pfd.op.collect module

class pfd.op.collect.CollectData(*args, **kwargs)[source]

Bases: OP

Collect data for further operations, return dpdata.Multisystems

Parameters:

OP (_type_) – _description_

Raises:

NotImplementedError – _description_

Returns:

_description_

Return type:

_type_

execute(ip: OPIO) OPIO[source]

Execute the OP.

Parameters:

ip (dict) – Input dict with components: - lmp_task_grp : (BigParameter(Path)) Can be pickle loaded as a ExplorationTaskGroup. Definitions for LAMMPS tasks

Returns:

op – Output dict with components: - task_names: (List[str]) The name of tasks. Will be used as the identities of the tasks. The names of different tasks are different. - task_paths: (Artifact(List[Path])) The parepared working paths of the tasks. Contains all input files needed to start the LAMMPS simulation. The order fo the Paths should be consistent with op[“task_names”]

Return type:

dict

classmethod get_input_sign()[source]

Get the signature of the inputs

classmethod get_output_sign()[source]

Get the signature of the outputs

pfd.op.collect.get_sys_fmt(sys_path: Path | str)[source]

return dpdata format

pfd.op.collect.sample_sys(sys: System, n_sample: int = 1)[source]

pfd.op.converge module

class pfd.op.converge.EvalConv[source]

Bases: OP

Parameters:
  • converged – boolean, whether the workflow has already converged.

  • systems – dpdata system, a list of systems

execute(ip: OPIO) OPIO[source]

Run the OP

classmethod get_input_sign()[source]

Get the signature of the inputs

classmethod get_output_sign()[source]

Get the signature of the outputs

pfd.op.inference module

class pfd.op.inference.InferenceOP(*args, **kwargs)[source]

Bases: OP

execute(ip: OPIO) OPIO[source]

Run the OP

classmethod get_input_sign()[source]

Get the signature of the inputs

classmethod get_output_sign()[source]

Get the signature of the outputs

pfd.op.model_test module

class pfd.op.model_test.ModelTestOP(*args, **kwargs)[source]

Bases: OP

execute(ip: OPIO) OPIO[source]

Run the OP

classmethod get_input_sign()[source]

Get the signature of the inputs

classmethod get_output_sign()[source]

Get the signature of the outputs

pfd.op.pert_gen module

class pfd.op.pert_gen.PertGen(*args, **kwargs)[source]

Bases: OP

Perturb the input configurations

A list of working directories (defined by ip[“task”]) containing all files needed to start LAMMPS tasks will be created. The paths of the directories will be returned as op[“task_paths”]. The identities of the tasks are returned as op[“task_names”].

execute(ip: OPIO) OPIO[source]

Execute the OP.

Parameters:

ip (dict) – Input dict with components: - init_confs : (Artifact(List[Path])) The paths to the input files of initial structure configurations. - config : (BigParameter(dict)) The input parameters for generating perturbed configurations.

Returns:

op – Output dict with components: - pert_sys: (Artifact(List[Path])) The paths of perturbed systems. A list of dpdata.System. - confs: (Artifact(List[Path])) The prepared paths of perturbed systems. A list of dpdata.MultiSystems.

Return type:

dict

classmethod get_input_sign()[source]

Get the signature of the inputs

classmethod get_output_sign()[source]

Get the signature of the outputs

pfd.op.select_confs module

class pfd.op.select_confs.SelectConfs(*args, **kwargs)[source]

Bases: OP

Select configurations from exploration trajectories for labeling.

execute(ip: OPIO) OPIO[source]

Execute the OP.

Parameters:

ip (dict) –

Input dict with components:

  • conf_selector: (ConfSelector) Configuration selector.

  • type_map: (List[str]) The type map.

  • trajs: (Artifact(List[Path])) The trajectories generated in the exploration.

  • model_devis: (Artifact(List[Path])) The file storing the model deviation of the trajectory. The order of model deviation storage is consistent with that of the trajectories. The order of frames of one model deviation storage is also consistent with tat of the corresponding trajectory.

Returns:

Output dict with components: - report: (ExplorationReport) The report on the exploration. - conf: (Artifact(List[Path])) The selected configurations.

Return type:

Any

classmethod get_input_sign()[source]

Get the signature of the inputs

classmethod get_output_sign()[source]

Get the signature of the outputs

static validate_trajs(trajs, model_devis)[source]

pfd.op.stage module

class pfd.op.stage.StageScheduler[source]

Bases: OP

execute(ip: OPIO) OPIO[source]

Generate exploration tasks based on model and exploration styles

classmethod get_input_sign()[source]

Get the signature of the inputs

classmethod get_output_sign()[source]

Get the signature of the outputs

pfd.op.task_gen module

class pfd.op.task_gen.TaskGen(*args, **kwargs)[source]

Bases: OP

Generate tasks for exploration

A list of working directories (defined by ip[“task”]) containing all files needed to start LAMMPS tasks will be created. The paths of the directories will be returned as op[“task_paths”]. The identities of the tasks are returned as op[“task_names”].

execute(ip: OPIO) OPIO[source]

Execute the OP.

Parameters:

ip (dict) – Input dict with components: - lmp_task_grp : (BigParameter(Path)) Can be pickle loaded as a ExplorationTaskGroup. Definitions for LAMMPS tasks

Returns:

op – Output dict with components:

  • task_names: (List[str]) The name of tasks. Will be used as the identities of the tasks. The names of different tasks are different.

  • task_paths: (Artifact(List[Path])) The parepared working paths of the tasks. Contains all input files needed to start the LAMMPS simulation. The order fo the Paths should be consistent with op[“task_names”]

Return type:

dict

classmethod get_input_sign()[source]

Get the signature of the inputs

classmethod get_output_sign()[source]

Get the signature of the outputs

pfd.op.task_gen.gen_expl_grp(systems, type_map: List, mass_map: List, task)[source]

Module contents