Class DeepBaseModelBackend#
Defined in File DeepBaseModel.h
Inheritance Relationships#
Derived Types#
public deepmd::DeepPotBackend
(Class DeepPotBackend)public deepmd::DeepSpinBackend
(Class DeepSpinBackend)
Class Documentation#
- class DeepBaseModelBackend#
Deep Potential Base Model.
Subclassed by deepmd::DeepPotBackend, deepmd::DeepSpinBackend
Public Functions
- inline DeepBaseModelBackend()#
DP constructor without initialization.
- inline virtual ~DeepBaseModelBackend()#
- DeepBaseModelBackend(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.
- virtual void init(const std::string &model, const int &gpu_rank = 0, const std::string &file_content = "") = 0#
Initialize the DP.
- 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.
- virtual double cutoff() const = 0#
Get the cutoff radius.
- Returns:
The cutoff radius.
- virtual int numb_types() const = 0#
Get the number of types.
- Returns:
The number of types.
- virtual int numb_types_spin() const = 0#
Get the number of types with spin.
- Returns:
The number of types with spin.
- virtual int dim_fparam() const = 0#
Get the dimension of the frame parameter.
- Returns:
The dimension of the frame parameter.
- virtual int dim_aparam() const = 0#
Get the dimension of the atomic parameter.
- Returns:
The dimension of the atomic parameter.
- virtual void get_type_map(std::string &type_map) = 0#
Get the type map (element name of the atom types) of this model.
- Parameters:
type_map – [out] The type map of this model.
- virtual bool is_aparam_nall() const = 0#
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.
- inline DeepBaseModelBackend()#