dpgen2.exploration.selector package

Submodules

dpgen2.exploration.selector.conf_filter module

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

Bases: ABC

Methods

check(coords, cell, atom_types, nopbc)

Check if the configuration is valid.

abstract check(coords: ndarray, cell: ndarray, atom_types: ndarray, nopbc: bool) bool[source]

Check if the configuration is valid.

Parameters
coordsnumpy.array

The coordinates, numpy array of shape natoms x 3

cellnumpy.array

The cell tensor. numpy array of shape 3 x 3

atom_typesnumpy.array

The atom types. numpy array of shape natoms

nopbcbool

If no periodic boundary condition.

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(conf: System) bool[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], model_devis: List[Path], type_map: Optional[List[str]] = 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: Optional[int] = None, conf_filters: Optional[ConfFilters] = 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], model_devis: List[Path], type_map: Optional[List[str]] = 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

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.trust_level module

class dpgen2.exploration.selector.trust_level.TrustLevel(level_f_lo, level_f_hi, level_v_lo=None, level_v_hi=None)[source]

Bases: object

Attributes
level_f_hi
level_f_lo
level_v_hi
level_v_lo
property level_f_hi
property level_f_lo
property level_v_hi
property level_v_lo