pfd.exploration.selector package

Submodules

pfd.exploration.selector.conf_filter module

class pfd.exploration.selector.conf_filter.ConfFilter[source]

Bases: ABC

abstractmethod check(frame: System) bool[source]

Check if the configuration is valid.

Parameters:

frame (dpdata.System) – A dpdata.System containing a single frame

Returns:

validTrue if the configuration is a valid configuration, else False.

Return type:

bool

class pfd.exploration.selector.conf_filter.ConfFilters[source]

Bases: object

A list of ConfFilters

add(conf_filter: ConfFilter) ConfFilters[source]
check(conf: System) System[source]

pfd.exploration.selector.conf_selector module

class pfd.exploration.selector.conf_selector.ConfSelector[source]

Bases: ABC

Select configurations from trajectory and model deviation files.

abstractmethod select(type_map: List[str] | None = None, optional_outputs: List[Path] | None = None) List[Path][source]

pfd.exploration.selector.conf_selector_frame module

class pfd.exploration.selector.conf_selector_frame.ConfSelectorFrames(traj_render: TrajRender, max_numb_sel: int | None = None, conf_filters: ConfFilters | None = None)[source]

Bases: ConfSelector

Select frames from trajectories as confs.

Parameters: trust_level: TrustLevel

The trust level

conf_filter: ConfFilters

The configuration filter

select(trajs: List[Path], type_map: List[str] | None = None, optional_outputs: List[Path] | None = None) List[Path][source]

Select configurations

Parameters:
  • trajs (List[Path]) – A list of Path to trajectory files generated by LAMMPS

  • model_devis (List[Path]) – A list of Path to model deviation files generated by LAMMPS. Format: each line has 7 numbers they are used as # frame_id md_v_max md_v_min md_v_mean md_f_max md_f_min md_f_mean where md stands for model deviation, v for virial and f for force

  • type_map (List[str]) – The type_map of the systems

  • optional_outputs (List[Path]) – Optional outputs of the exploration

Returns:

  • confs (List[Path]) – The selected confgurations, stored in a folder in deepmd/npy format, can be parsed as dpdata.MultiSystems. The list only has one item.

  • report (ExplorationReport) – The exploration report recoding the status of the exploration.

pfd.exploration.selector.distance_conf_filter module

class pfd.exploration.selector.distance_conf_filter.BoxLengthFilter(length_ratio=5.0)[source]

Bases: ConfFilter

static args() List[Argument][source]

The argument definition of the ConfFilter.

Returns:

arguments – List of dargs.Argument defines the arguments of the ConfFilter.

Return type:

List[dargs.Argument]

check(frame: System)[source]

Check if the configuration is valid.

Parameters:

frame (dpdata.System) – A dpdata.System containing a single frame

Returns:

validTrue if the configuration is a valid configuration, else False.

Return type:

bool

static doc() str[source]
class pfd.exploration.selector.distance_conf_filter.BoxSkewnessConfFilter(theta=60.0)[source]

Bases: ConfFilter

static args() List[Argument][source]

The argument definition of the ConfFilter.

Returns:

arguments – List of dargs.Argument defines the arguments of the ConfFilter.

Return type:

List[dargs.Argument]

check(frame: System)[source]

Check if the configuration is valid.

Parameters:

frame (dpdata.System) – A dpdata.System containing a single frame

Returns:

validTrue if the configuration is a valid configuration, else False.

Return type:

bool

static doc() str[source]
class pfd.exploration.selector.distance_conf_filter.DistanceConfFilter(custom_safe_dist=None, safe_dist_ratio=1.0)[source]

Bases: ConfFilter

static args() List[Argument][source]

The argument definition of the ConfFilter.

Returns:

arguments – List of dargs.Argument defines the arguments of the ConfFilter.

Return type:

List[dargs.Argument]

check(frame: System)[source]

Check if the configuration is valid.

Parameters:

frame (dpdata.System) – A dpdata.System containing a single frame

Returns:

validTrue if the configuration is a valid configuration, else False.

Return type:

bool

static doc() str[source]
pfd.exploration.selector.distance_conf_filter.check_multiples(a, b, c, multiple)[source]

pfd.exploration.selector.energy_select module

class pfd.exploration.selector.energy_select.EnergySelect[source]

Bases: ConfSelector

select(system: Path | str, test_res: dict, type_map=None, **config)[source]

Module contents