deepmd.tf.model.pairtab
Module Contents
Classes
Pairwise tabulation energy model. |
- class deepmd.tf.model.pairtab.PairTabModel(tab_file: str, rcut: float, sel: int | List[int], **kwargs)[source]
Bases:
deepmd.tf.model.model.Model
Pairwise tabulation energy model.
This model can be used to tabulate the pairwise energy between atoms for either short-range or long-range interactions, such as D3, LJ, ZBL, etc. It should not be used alone, but rather as one submodel of a linear (sum) model, such as DP+D3.
Do not put the model on the first model of a linear model, since the linear model fetches the type map from the first model.
At this moment, the model does not smooth the energy at the cutoff radius, so one needs to make sure the energy has been smoothed to zero.
- Parameters:
- build(coord_: deepmd.tf.env.tf.Tensor, atype_: deepmd.tf.env.tf.Tensor, natoms: deepmd.tf.env.tf.Tensor, box: deepmd.tf.env.tf.Tensor, mesh: deepmd.tf.env.tf.Tensor, input_dict: dict, frz_model: str | None = None, ckpt_meta: str | None = None, suffix: str = '', reuse: bool | enum.Enum | None = None)[source]
Build the model.
- Parameters:
- coord_
tf.Tensor
The coordinates of atoms
- atype_
tf.Tensor
The atom types of atoms
- natoms
tf.Tensor
The number of atoms
- box
tf.Tensor
The box vectors
- mesh
tf.Tensor
The mesh vectors
- input_dict
dict
The input dict
- frz_model
str
,optional
The path to the frozen model
- ckpt_meta
str
,optional
The path prefix of the checkpoint and meta files
- suffix
str
,optional
The suffix of the scope
- reusebool or
tf.AUTO_REUSE
,optional
Whether to reuse the variables
- coord_
- Returns:
dict
The output dict
- init_variables(graph: deepmd.tf.env.tf.Graph, graph_def: deepmd.tf.env.tf.GraphDef, model_type: str = 'original_model', suffix: str = '') None [source]
Init the embedding net variables with the given frozen model.
- get_fitting() deepmd.tf.fit.fitting.Fitting | dict [source]
Get the fitting(s).
- enable_compression(suffix: str = '') None [source]
Enable compression.
- Parameters:
- suffix
str
suffix to name scope
- suffix