deepmd.dpmodel.atomic_model.dp_atomic_model
Module Contents
Classes
Model give atomic prediction of some physical property. |
- class deepmd.dpmodel.atomic_model.dp_atomic_model.DPAtomicModel(descriptor, fitting, type_map: List[str], **kwargs)[source]
Bases:
deepmd.dpmodel.atomic_model.base_atomic_model.BaseAtomicModel
Model give atomic prediction of some physical property.
- Parameters:
- descriptor
Descriptor
- fitting_net
Fitting net
- type_map
Mapping atom type to the name (str) of the type. For example type_map[1] gives the name of the type 1.
- fitting_output_def() deepmd.dpmodel.output_def.FittingOutputDef [source]
Get the output def of the fitting net.
- 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.
- forward_atomic(extended_coord: numpy.ndarray, extended_atype: numpy.ndarray, nlist: numpy.ndarray, mapping: numpy.ndarray | None = None, fparam: numpy.ndarray | None = None, aparam: numpy.ndarray | None = None) Dict[str, numpy.ndarray] [source]
Models’ atomic predictions.
- Parameters:
- extended_coord
coodinates in extended region
- extended_atype
atomic type in extended region
- nlist
neighbor list. nf x nloc x nsel
- mapping
mapps the extended indices to local indices. nf x nall
- fparam
frame parameter. nf x ndf
- aparam
atomic parameter. nf x nloc x nda
- Returns:
result_dict
the result dict, defined by the FittingOutputDef.
- classmethod deserialize(data) DPAtomicModel [source]
- get_dim_aparam() int [source]
Get the number (dimension) of atomic parameters of this atomic model.