Class DeepBaseModelDevi#

Inheritance Relationships#

Derived Types#

Class Documentation#

class DeepBaseModelDevi#

Deep Potential base model deviation.

Subclassed by deepmd::hpp::DeepPotModelDevi, deepmd::hpp::DeepSpinModelDevi

Public Functions

inline DeepBaseModelDevi()#

DP model deviation constructor without initialization.

inline virtual ~DeepBaseModelDevi()#
inline double cutoff() const#

Get the cutoff radius.

Returns:

The cutoff radius.

inline int numb_types() const#

Get the number of types.

Returns:

The number of types.

inline int numb_types_spin() const#

Get the number of types with spin.

Returns:

The number of types with spin.

inline int dim_fparam() const#

Get the dimension of the frame parameter.

Returns:

The dimension of the frame parameter.

inline int dim_aparam() const#

Get the dimension of the atomic parameter.

Returns:

The dimension of the atomic parameter.

template<typename VALUETYPE>
inline void compute_avg(std::vector<VALUETYPE> &avg, const std::vector<std::vector<VALUETYPE>> &xx)#

Compute the average of vectors.

Parameters:
  • avg[out] The average of vectors.

  • xx[in] The vectors of all models.

template<typename VALUETYPE>
inline void compute_std(std::vector<VALUETYPE> &std, const std::vector<VALUETYPE> &avg, const std::vector<std::vector<VALUETYPE>> &xx, const int &stride)#

Compute the standard deviation of vectors.

Parameters:
  • std[out] The standard deviation of vectors.

  • avg[in] The average of vectors.

  • xx[in] The vectors of all models.

  • stride[in] The stride to compute the deviation.

template<typename VALUETYPE>
inline void compute_relative_std(std::vector<VALUETYPE> &std, const std::vector<VALUETYPE> &avg, const VALUETYPE eps, const int &stride)#

Compute the relative standard deviation of vectors.

Parameters:
  • std[out] The standard deviation of vectors.

  • avg[in] The average of vectors.

  • eps[in] The level parameter for computing the deviation.

  • stride[in] The stride to compute the deviation.

template<typename VALUETYPE>
inline void compute_std_f(std::vector<VALUETYPE> &std, const std::vector<VALUETYPE> &avg, const std::vector<std::vector<VALUETYPE>> &xx)#

Compute the standard deviation of forces.

Parameters:
  • std[out] The standard deviation of forces.

  • avg[in] The average of forces.

  • xx[in] The vectors of all forces.

template<typename VALUETYPE>
inline void compute_relative_std_f(std::vector<VALUETYPE> &std, const std::vector<VALUETYPE> &avg, const VALUETYPE eps)#

Compute the relative standard deviation of forces.

Parameters:
  • std[out] The relative standard deviation of forces.

  • avg[in] The relative average of forces.

  • eps[in] The level parameter for computing the deviation.

Protected Functions

template<typename VALUETYPE>
inline void validate_fparam_aparam(const int &nframes, const int &nloc, const std::vector<VALUETYPE> &fparam, const std::vector<VALUETYPE> &aparam) const#
template<typename VALUETYPE>
inline void tile_fparam_aparam(std::vector<VALUETYPE> &out_param, const int &nframes, const int &dparam, const std::vector<VALUETYPE> &param) const#

Protected Attributes

DP_DeepBaseModelDevi *dpbase#
int numb_models#
int dfparam#
int daparam#
bool aparam_nall#