deepmd.pd.model.model.frozen#
Classes#
Load model from a frozen model, which cannot be trained. |
Module Contents#
- class deepmd.pd.model.model.frozen.FrozenModel(model_file: str, **kwargs)[source]#
Bases:
deepmd.pd.model.model.model.BaseModelLoad model from a frozen model, which cannot be trained.
- Parameters:
- model_file
str The path to the frozen model
- model_file
- fitting_output_def() deepmd.dpmodel.output_def.FittingOutputDef[source]#
Get the output def of developer implemented atomic models.
- get_sel_type() list[int][source]#
Get the selected atom types of this model.
Only atoms with selected atom types have atomic contribution to the result of the model. If returning an empty list, all atom types are selected.
- is_aparam_nall() bool[source]#
Check whether the shape of atomic parameters is (nframes, nall, ndim).
If False, the shape is (nframes, nloc, ndim).
- mixed_types() bool[source]#
If true, the model 1. assumes total number of atoms aligned across frames; 2. uses a neighbor list that does not distinguish different atomic types.
If false, the model 1. assumes total number of atoms of each atom type aligned across frames; 2. uses a neighbor list that distinguishes different atomic types.
- need_sorted_nlist_for_lower() bool[source]#
Returns whether the model needs sorted nlist when using forward_lower.
- forward(coord, atype, box: paddle.Tensor | None = None, fparam: paddle.Tensor | None = None, aparam: paddle.Tensor | None = None, do_atomic_virial: bool = False) dict[str, paddle.Tensor][source]#
- classmethod deserialize(data: dict)[source]#
Deserialize the model.
- Parameters:
- data
dict The serialized data
- data
- Returns:
BaseModelThe deserialized model
- get_nnei() int[source]#
Returns the total number of selected neighboring atoms in the cut-off radius.
- get_nsel() int[source]#
Returns the total number of selected neighboring atoms in the cut-off radius.