deepmd.pt.model.model.dp_model#

Classes#

DPModelCommon

A base class to implement common methods for all the Models.

Module Contents#

class deepmd.pt.model.model.dp_model.DPModelCommon[source]#

A base class to implement common methods for all the Models.

classmethod update_sel(train_data: deepmd.utils.data_system.DeepmdDataSystem, type_map: list[str] | None, local_jdata: dict) tuple[dict, float | None][source]#

Update the selection and perform neighbor statistics.

Parameters:
train_dataDeepmdDataSystem

data used to do neighbor statistics

type_maplist[str], optional

The name of each type of atoms

local_jdatadict

The local data refer to the current class

Returns:
dict

The updated local data

float

The minimum distance between two atoms

get_fitting_net()[source]#

Get the fitting network.

get_descriptor()[source]#

Get the descriptor.

set_eval_descriptor_hook(enable: bool) None[source]#

Set the hook for evaluating descriptor and clear the cache for descriptor list.

eval_descriptor() torch.Tensor[source]#

Evaluate the descriptor.

set_eval_fitting_last_layer_hook(enable: bool) None[source]#

Set the hook for evaluating fitting_last_layer and clear the cache for fitting_last_layer list.

eval_fitting_last_layer() torch.Tensor[source]#

Evaluate the fitting_last_layer.