Class DeepBaseModel#
Defined in File DeepBaseModel.h
Inheritance Relationships#
Derived Types#
public deepmd::DeepPot
(Class DeepPot)public deepmd::DeepSpin
(Class DeepSpin)
Class Documentation#
- class DeepBaseModel#
Deep Potential Base Model to automatically switch backends.
Subclassed by deepmd::DeepPot, deepmd::DeepSpin
Public Functions
- DeepBaseModel()#
DP constructor without initialization.
- virtual ~DeepBaseModel()#
- DeepBaseModel(const std::string &model, const int &gpu_rank = 0, const std::string &file_content = "")#
DP constructor with initialization.
- Parameters:
model – [in] The name of the frozen model file.
gpu_rank – [in] The GPU rank. Default is 0.
file_content – [in] The content of the model file. If it is not empty, DP will read from the string instead of the file.
- void print_summary(const std::string &pre) const#
Print the DP summary to the screen.
- Parameters:
pre – [in] The prefix to each line.
- double cutoff() const#
Get the cutoff radius.
- Returns:
The cutoff radius.
- int numb_types() const#
Get the number of types.
- Returns:
The number of types.
- int numb_types_spin() const#
Get the number of types with spin.
- Returns:
The number of types with spin.
- int dim_fparam() const#
Get the dimension of the frame parameter.
- Returns:
The dimension of the frame parameter.
- int dim_aparam() const#
Get the dimension of the atomic parameter.
- Returns:
The dimension of the atomic parameter.
- void get_type_map(std::string &type_map)#
Get the type map (element name of the atom types) of this model.
- Parameters:
type_map – [out] The type map of this model.
- bool is_aparam_nall() const#
Get whether the atom dimension of aparam is nall instead of fparam.
- Parameters:
aparam_nall – [out] whether the atom dimension of aparam is nall instead of fparam.
- DeepBaseModel()#