deepmd.dpmodel.descriptor.hybrid#
Classes#
Concate a list of descriptors to form a new descriptor. |
Module Contents#
- class deepmd.dpmodel.descriptor.hybrid.DescrptHybrid(list: DescrptHybrid.__init__.list[deepmd.dpmodel.descriptor.base_descriptor.BaseDescriptor | dict[str, Any]], type_map: DescrptHybrid.__init__.list[str] | None = None, ntypes: int | None = None)[source]#
Bases:
deepmd.dpmodel.descriptor.base_descriptor.BaseDescriptor
,deepmd.dpmodel.common.NativeOP
Concate a list of descriptors to form a new descriptor.
- Parameters:
- get_rcut_smth() float [source]#
Returns the radius where the neighbor information starts to smoothly decay to 0.
- mixed_types()[source]#
Returns if the descriptor requires a neighbor list that distinguish different atomic types or not.
- need_sorted_nlist_for_lower() bool [source]#
Returns whether the descriptor needs sorted nlist when using forward_lower.
- get_env_protection() float [source]#
Returns the protection of building environment matrix. All descriptors should be the same.
Share the parameters of self to the base_class with shared_level during multitask training. If not start from checkpoint (resume is False), some separated parameters (e.g. mean and stddev) will be re-calculated across different classes.
- change_type_map(type_map: list[str], model_with_new_type_stat=None) None [source]#
Change the type related params to new ones, according to type_map and the original one in the model. If there are new types in type_map, statistics will be updated accordingly to model_with_new_type_stat for these new types.
- compute_input_stats(merged: list[dict], path: deepmd.utils.path.DPPath | None = None) None [source]#
Update mean and stddev for descriptor elements.
- set_stat_mean_and_stddev(mean: list[numpy.ndarray | list[numpy.ndarray]], stddev: list[numpy.ndarray | list[numpy.ndarray]]) None [source]#
Update mean and stddev for descriptor.
- get_stat_mean_and_stddev() tuple[list[numpy.ndarray | list[numpy.ndarray]], list[numpy.ndarray | list[numpy.ndarray]]] [source]#
Get mean and stddev for descriptor.
- enable_compression(min_nbor_dist: float, table_extrapolate: float = 5, table_stride_1: float = 0.01, table_stride_2: float = 0.1, check_frequency: int = -1) None [source]#
Receive the statisitcs (distance, max_nbor_size and env_mat_range) of the training data.
- Parameters:
- min_nbor_dist
The nearest distance between atoms
- table_extrapolate
The scale of model extrapolation
- table_stride_1
The uniform stride of the first table
- table_stride_2
The uniform stride of the second table
- check_frequency
The overflow check frequency
- call(coord_ext, atype_ext, nlist, mapping: numpy.ndarray | None = None)[source]#
Compute the descriptor.
- Parameters:
- coord_ext
The extended coordinates of atoms. shape: nf x (nallx3)
- atype_ext
The extended aotm types. shape: nf x nall
- nlist
The neighbor list. shape: nf x nloc x nnei
- mapping
The index mapping, not required by this descriptor.
- Returns:
descriptor
The descriptor. shape: nf x nloc x (ng x axis_neuron)
gr
The rotationally equivariant and permutationally invariant single particle representation. shape: nf x nloc x ng x 3.
g2
The rotationally invariant pair-partical representation.
h2
The rotationally equivariant pair-partical representation.
sw
The smooth switch function.
- 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.
- classmethod deserialize(data: dict) DescrptHybrid [source]#
Deserialize the model.
- Parameters:
- data
dict
The serialized data
- data
- Returns:
BD
The deserialized descriptor