deepmd.tf.infer.deep_polar#
Classes#
Old tensor models from v1, which has no gradient output. | |
Deep polar model. |
Module Contents#
- class deepmd.tf.infer.deep_polar.DeepGlobalPolar(model_file: str, *args: Any, auto_batch_size: bool | int | deepmd.utils.batch_size.AutoBatchSize = True, neighbor_list: ase.neighborlist.NewPrimitiveNeighborList | None = None, **kwargs: Any)[source]#
Bases:
deepmd.infer.deep_tensor.OldDeepTensor
Old tensor models from v1, which has no gradient output.
- eval(coords: numpy.ndarray, cells: numpy.ndarray | None, atom_types: list[int] | numpy.ndarray, atomic: bool = False, fparam: numpy.ndarray | None = None, aparam: numpy.ndarray | None = None, mixed_type: bool = False, **kwargs) numpy.ndarray [source]#
Evaluate the model.
- Parameters:
- coords
The coordinates of atoms. The array should be of size nframes x natoms x 3
- cells
The cell of the region. If None then non-PBC is assumed, otherwise using PBC. The array should be of size nframes x 9
- atom_types
list
[int
]or
np.ndarray
The atom types The list should contain natoms ints
- atomic
If True (default), return the atomic tensor Otherwise return the global tensor
- fparam
Not used in this model
- aparam
Not used in this model
- mixed_type
Whether to perform the mixed_type mode. If True, the input data has the mixed_type format (see doc/model/train_se_atten.md), in which frames in a system may have different natoms_vec(s), with the same nloc.
- Returns:
tensor
The returned tensor If atomic == False then of size nframes x output_dim else of size nframes x natoms x output_dim
- property output_def: deepmd.dpmodel.output_def.ModelOutputDef#
Get the output definition of this model.
- class deepmd.tf.infer.deep_polar.DeepPolar(model_file: str, *args: Any, auto_batch_size: bool | int | deepmd.utils.batch_size.AutoBatchSize = True, neighbor_list: ase.neighborlist.NewPrimitiveNeighborList | None = None, **kwargs: Any)[source]#
Bases:
deepmd.infer.deep_tensor.DeepTensor
Deep polar model.
- Parameters:
- model_file
Path
The name of the frozen model file.
- *args
list
Positional arguments.
- auto_batch_sizebool or
int
orAutoBatchSize
, default:True
If True, automatic batch size will be used. If int, it will be used as the initial batch size.
- neighbor_list
ase.neighborlist.NewPrimitiveNeighborList
,optional
The ASE neighbor list class to produce the neighbor list. If None, the neighbor list will be built natively in the model.
- **kwargs
dict
Keyword arguments.
- model_file