dpgen2.exploration.selector package#

Submodules#

dpgen2.exploration.selector.conf_filter module#

class dpgen2.exploration.selector.conf_filter.ConfFilter[source]#

Bases: ABC

Methods

batched_check(frames)

Check if a list of configurations are valid.

check(frame)

Check if the configuration is valid.

batched_check(frames: List[System]) List[bool][source]#

Check if a list of configurations are valid.

Parameters:
framesList[dpdata.System]

A list of dpdata.System each containing a single frame

Returns:
validList[bool]

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

abstract check(frame: System) bool[source]#

Check if the configuration is valid.

Parameters:
framedpdata.System

A dpdata.System containing a single frame

Returns:
validbool

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

class dpgen2.exploration.selector.conf_filter.ConfFilters[source]#

Bases: object

Methods

add

check

add(conf_filter: ConfFilter) ConfFilters[source]#
check(ms: MultiSystems) MultiSystems[source]#

dpgen2.exploration.selector.conf_selector module#

class dpgen2.exploration.selector.conf_selector.ConfSelector[source]#

Bases: ABC

Select configurations from trajectory and model deviation files.

Methods

select

abstract select(trajs: List[Path] | List[HDF5Dataset], model_devis: List[Path] | List[HDF5Dataset], type_map: List[str] | None = None, optional_outputs: List[Path] | None = None) Tuple[List[Path], ExplorationReport][source]#

dpgen2.exploration.selector.conf_selector_frame module#

class dpgen2.exploration.selector.conf_selector_frame.ConfSelectorFrames(traj_render: TrajRender, report: ExplorationReport, 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

Methods

select(trajs, model_devis[, type_map, ...])

Select configurations

select(trajs: List[Path] | List[HDF5Dataset], model_devis: List[Path] | List[HDF5Dataset], type_map: List[str] | None = None, optional_outputs: List[Path] | None = None) Tuple[List[Path], ExplorationReport][source]#

Select configurations

Parameters:
trajsList[Path]

A list of Path to trajectory files generated by LAMMPS

model_devisList[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_mapList[str]

The type_map of the systems

optional_outputsList[Path]

Optional outputs of the exploration

Returns:
confsList[Path]

The selected confgurations, stored in a folder in deepmd/npy format, can be parsed as dpdata.MultiSystems. The list only has one item.

reportExplorationReport

The exploration report recoding the status of the exploration.

dpgen2.exploration.selector.distance_conf_filter module#

class dpgen2.exploration.selector.distance_conf_filter.BoxLengthFilter(max_workers=None, length_ratio=5.0)[source]#

Bases: ConfFilter

Methods

args()

The argument definition of the ConfFilter.

batched_check(frames)

Check if a list of configurations are valid.

check(frame)

Check if the configuration is valid.

static args() List[Argument][source]#

The argument definition of the ConfFilter.

Returns:
arguments: List[dargs.Argument]

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

batched_check(frames: List[System])[source]#

Check if a list of configurations are valid.

Parameters:
framesList[dpdata.System]

A list of dpdata.System each containing a single frame

Returns:
validList[bool]

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

check(frame: System)[source]#

Check if the configuration is valid.

Parameters:
framedpdata.System

A dpdata.System containing a single frame

Returns:
validbool

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

class dpgen2.exploration.selector.distance_conf_filter.BoxSkewnessConfFilter(max_workers=None, theta=60.0)[source]#

Bases: ConfFilter

Methods

args()

The argument definition of the ConfFilter.

batched_check(frames)

Check if a list of configurations are valid.

check(frame)

Check if the configuration is valid.

static args() List[Argument][source]#

The argument definition of the ConfFilter.

Returns:
arguments: List[dargs.Argument]

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

batched_check(frames: List[System])[source]#

Check if a list of configurations are valid.

Parameters:
framesList[dpdata.System]

A list of dpdata.System each containing a single frame

Returns:
validList[bool]

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

check(frame: System)[source]#

Check if the configuration is valid.

Parameters:
framedpdata.System

A dpdata.System containing a single frame

Returns:
validbool

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

class dpgen2.exploration.selector.distance_conf_filter.DistanceConfFilter(max_workers=None, custom_safe_dist=None, safe_dist_ratio=1.0)[source]#

Bases: ConfFilter

Methods

args()

The argument definition of the ConfFilter.

batched_check(frames)

Check if a list of configurations are valid.

check(frame)

Check if the configuration is valid.

static args() List[Argument][source]#

The argument definition of the ConfFilter.

Returns:
arguments: List[dargs.Argument]

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

batched_check(frames: List[System])[source]#

Check if a list of configurations are valid.

Parameters:
framesList[dpdata.System]

A list of dpdata.System each containing a single frame

Returns:
validList[bool]

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

check(frame: System)[source]#

Check if the configuration is valid.

Parameters:
framedpdata.System

A dpdata.System containing a single frame

Returns:
validbool

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

dpgen2.exploration.selector.distance_conf_filter.check_multiples(a, b, c, multiple)[source]#