dpgen2.exploration.render package

Submodules

dpgen2.exploration.render.traj_render module

class dpgen2.exploration.render.traj_render.TrajRender[source]

Bases: ABC

Methods

get_confs(traj, id_selected[, type_map, ...])

Get configurations from trajectory by selection.

get_model_devi(files)

Get model deviations from recording files.

abstract get_confs(traj: List[Path], id_selected: List[List[int]], type_map: Optional[List[str]] = None, conf_filters: Optional[ConfFilters] = None) MultiSystems[source]

Get configurations from trajectory by selection.

Parameters
traj: List[Path]

Trajectory files

id_selected: List[List[int]]

The selected frames. id_selected[ii][jj] is the jj-th selected frame from the ii-th trajectory. id_selected[ii] may be an empty list.

type_map: List[str]

The type map.

Returns
ms: dpdata.MultiSystems

The configurations in dpdata.MultiSystems format

abstract get_model_devi(files: List[Path]) Tuple[List[ndarray], Optional[List[ndarray]]][source]

Get model deviations from recording files.

Parameters
files: List[Path]

The paths to the model deviation recording files

Returns
model_devis: Tuple[List[np.array], Union[List[np.array],None]]

A tuple. model_devis[0] is the force model deviations, model_devis[1] is the virial model deviations. The model_devis[1] can be None. If not None, model_devis[i] is List[np.array], where np.array is a one-dimensional array. The first dimension of model_devis[i] is the trajectory (same size as len(files)), while the second dimension is the frame.

dpgen2.exploration.render.traj_render_lammps module

class dpgen2.exploration.render.traj_render_lammps.TrajRenderLammps(nopbc: bool = False)[source]

Bases: TrajRender

Methods

get_confs(trajs, id_selected[, type_map, ...])

Get configurations from trajectory by selection.

get_model_devi(files)

Get model deviations from recording files.

get_confs(trajs: List[Path], id_selected: List[List[int]], type_map: Optional[List[str]] = None, conf_filters: Optional[ConfFilters] = None) MultiSystems[source]

Get configurations from trajectory by selection.

Parameters
traj: List[Path]

Trajectory files

id_selected: List[List[int]]

The selected frames. id_selected[ii][jj] is the jj-th selected frame from the ii-th trajectory. id_selected[ii] may be an empty list.

type_map: List[str]

The type map.

Returns
ms: dpdata.MultiSystems

The configurations in dpdata.MultiSystems format

get_model_devi(files: List[Path]) Tuple[List[ndarray], Optional[List[ndarray]]][source]

Get model deviations from recording files.

Parameters
files: List[Path]

The paths to the model deviation recording files

Returns
model_devis: Tuple[List[np.array], Union[List[np.array],None]]

A tuple. model_devis[0] is the force model deviations, model_devis[1] is the virial model deviations. The model_devis[1] can be None. If not None, model_devis[i] is List[np.array], where np.array is a one-dimensional array. The first dimension of model_devis[i] is the trajectory (same size as len(files)), while the second dimension is the frame.