deepmd.pt.model.descriptor.hybrid
Module Contents
Classes
Concate a list of descriptors to form a new descriptor. |
- class deepmd.pt.model.descriptor.hybrid.DescrptHybrid(list: List[deepmd.pt.model.descriptor.base_descriptor.BaseDescriptor | Dict[str, Any]], **kwargs)[source]
Bases:
deepmd.pt.model.descriptor.base_descriptor.BaseDescriptor
,torch.nn.Module
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.
- 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 seperated parameters (e.g. mean and stddev) will be re-calculated across different classes.
- compute_input_stats(merged: List[dict], path: deepmd.utils.path.DPPath | None = None)[source]
Update mean and stddev for descriptor elements.
- forward(coord_ext: torch.Tensor, atype_ext: torch.Tensor, nlist: torch.Tensor, mapping: torch.Tensor | None = None, comm_dict: Dict[str, torch.Tensor] | 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.
- comm_dict
The data needed for communication for parallel inference.
- 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. This descriptor returns None
g2
The rotationally invariant pair-partical representation. this descriptor returns None
h2
The rotationally equivariant pair-partical representation. this descriptor returns None
sw
The smooth switch function. this descriptor returns None
- classmethod update_sel(global_jdata: dict, local_jdata: dict) dict [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