Model

class Model

Subclassed by feasst::ModelOneBody, feasst::ModelThreeBody, feasst::ModelTwoBody

Public Functions

virtual double compute(const ModelParams &model_params, const int group_index, Configuration *config, VisitModel *visitor) = 0

Visit the model over the entire configuration.

virtual double compute(const ModelParams &model_params, Configuration *config, VisitModel *visitor) = 0

Same as above, except the group index is assumed to be zero (which is all particles and sites in the configuration).

virtual double compute(const ModelParams &model_params, const Select &selection, const int group_index, Configuration *config, VisitModel *visitor) = 0

Visit the model over a selection of the configuration. Optionally, restrict to groups of given index, which is only relevant for multibody models (e.g., two body and not one body).

virtual double compute(const ModelParams &model_params, const Select &selection, Configuration *config, VisitModel *visitor) = 0

Same as above, except the group index is assumed to be zero (which is all particles and sites in the configuration)

virtual void precompute(const ModelParams &existing)

Precompute model parameters based on existing model parameters.

virtual void serialize(std::ostream &ostr) const

Output a serialized version of the existing model.

std::shared_ptr<Model> deserialize(std::istream &istr)

Return a model given a serialization.