Basis Functions

BF_Linear

struct BF_Linear : public virtual BF_Base

Linear basis function for modeling linear relationships.

This structure provides methods for predicting energy and forces using a linear basis function.

Subclassed by DM_BF_Linear

Public Functions

BF_Linear()

Default constructor.

BF_Linear(const Config &c)

Constructor with configuration.

Parameters:

c – Configuration object reference.

virtual std::string get_label() const override

Retrieve the label of the basis function.

Returns:

String label of the basis function.

virtual double epredict(const t_type &weights, const aed_type &aed) const override

Predicts energy using the linear basis function.

Parameters:
  • weights – Weights vector.

  • aed – Atomic descriptors.

Returns:

Predicted energy.

virtual double fpredict(const t_type &weights, const fd_type &fdij, const aed_type &aedi, const size_t k) const override

Predicts force for a specific dimension using the linear basis function.

Parameters:
  • weights – Weights vector.

  • fdij – Force descriptor between atoms.

  • aedi – Atomic descriptors for an individual atom.

  • k – Dimension index.

Returns:

Predicted force component.

virtual force_type fpredict(const t_type &weights, const fd_type &fdij, const aed_type &aedi) const override

Predicts forces using the linear basis function.

Parameters:
  • weights – Weights vector.

  • fdij – Force descriptor between atoms.

  • aedi – Atomic descriptors for an individual atom.

Returns:

Predicted forces.

Public Members

std::string label = "BF_Linear"

Label identifying the basis function.

BF_Polynomial2

struct BF_Polynomial2 : public virtual BF_Base

Polynomial order 2 basis function with coefficient c=0.

This structure provides methods for predicting energy and forces using a second-order polynomial basis function.

Subclassed by DM_BF_Polynomial2

Public Functions

BF_Polynomial2()

Default constructor.

BF_Polynomial2(const Config &c)

Constructor with configuration.

Parameters:

c – Configuration object reference.

virtual std::string get_label() const override

Retrieve the label of the basis function.

Returns:

String label of the basis function.

virtual double epredict(const t_type &weights, const aed_type &aed) const override

Predicts energy using the polynomial basis function.

Parameters:
  • weights – Weights vector.

  • aed – Atomic descriptors.

Returns:

Predicted energy.

virtual double fpredict(const t_type &weights, const fd_type &fdij, const aed_type &aedi, const size_t k) const override

Predicts force for a specific dimension using the polynomial basis function.

Parameters:
  • weights – Weights vector.

  • fdij – Force descriptor between atoms.

  • aedi – Atomic descriptors for an individual atom.

  • k – Dimension index.

Returns:

Predicted force component.

virtual force_type fpredict(const t_type &weights, const fd_type &fdij, const aed_type &aedi) const override

Predicts forces using the polynomial basis function.

Parameters:
  • weights – Weights vector.

  • fdij – Force descriptor between atoms.

  • aedi – Atomic descriptors for an individual atom.

Returns:

Predicted forces.

Public Members

std::string label = "BF_Polynomial2"

Label identifying the basis function.

BF_Base

struct BF_Base : public virtual Function_Base

Base class to be used by all basis functions.

Subclassed by BF_Linear, BF_Polynomial2, DM_BF_Base