ModelExample

class ModelExample : public feasst::ModelTwoBody

This is an example template for implementing your own custom Model.

Public Functions

double energy(const double squared_distance, const int type1, const int type2, const ModelParams &model_params)

The energy between two site types depends upon the distance between them and the model parameters. See existing Models, such as ModelLJ or ModelLJCutShift for inspiration.

void serialize(std::ostream &ostr) const

Serialization is the flatening of an object into a stream of characters which may be saved to file and later deserialized back into the object.

std::shared_ptr<Model> create(std::istream &istr) const

Deserialization is the reverse process of the above.