pfd.exploration.task package
Subpackages
Submodules
pfd.exploration.task.caly_task_group module
pfd.exploration.task.conf_sampling_task_group module
- class pfd.exploration.task.conf_sampling_task_group.ConfSamplingTaskGroup[source]
Bases:
ExplorationTaskGroup- set_conf(conf_list: List[str], n_sample: int | None = None, random_sample: bool = False)[source]
Set the configurations of exploration
- Parameters:
str (conf_list) – A list of file contents
int (n_sample) – Number of samples drawn from the conf list each time make_task is called. If set to None, n_sample is set to length of the conf_list.
bool (random_sample) – If true the confs are randomly sampled, otherwise are consecutively sampled from the conf_list
pfd.exploration.task.customized_lmp_template_task_group module
pfd.exploration.task.gen_task_group module
pfd.exploration.task.lmp_template_task_group module
pfd.exploration.task.make_task_group_from_config module
pfd.exploration.task.npt_task_group module
pfd.exploration.task.stage module
- class pfd.exploration.task.stage.ExplorationStage[source]
Bases:
objectThe exploration stage.
- add_task_group(grp: ExplorationTaskGroup | List[ExplorationTaskGroup])[source]
Add an exploration group
- Parameters:
grp (ExplorationTaskGroup) – The added exploration task group
- make_task() BaseExplorationTaskGroup[source]
Make the LAMMPS task group.
- Returns:
task_grp – The returned lammps task group. The number of tasks is equal to the summation of task groups defined by all the exploration groups added to the stage.
- Return type:
pfd.exploration.task.task module
- class pfd.exploration.task.task.ExplorationTask[source]
Bases:
objectDefine the files needed by an exploration task.
Examples
>>> # this example dumps all files needed by the task. >>> files = exploration_task.files() ... for file_name, file_content in files.items(): ... with open(file_name, 'w') as fp: ... fp.write(file_content)
pfd.exploration.task.task_group module
- class pfd.exploration.task.task_group.BaseExplorationTaskGroup[source]
Bases:
SequenceA group of exploration tasks. Implemented as a list of ExplorationTask.
- add_group(group: ExplorationTaskGroup)[source]
Add another group to the group.
- add_task(task: ExplorationTask)[source]
Add one task to the group.
- property task_list: List[ExplorationTask]
Get the list of ExplorationTask
- class pfd.exploration.task.task_group.ExplorationTaskGroup[source]
Bases:
ABC,BaseExplorationTaskGroup- abstractmethod make_task() ExplorationTaskGroup[source]
Make the task group.
- class pfd.exploration.task.task_group.FooTask(conf_name='conf.lmp', conf_cont='', inpu_name='in.lammps', inpu_cont='')[source]
Bases:
ExplorationTask
- class pfd.exploration.task.task_group.FooTaskGroup(numb_task)[source]
Bases:
BaseExplorationTaskGroup- property task_list
Get the list of ExplorationTask