# HardSphere¶

class HardSphere : public feasst::ModelTwoBody

The potential energy for a hard sphere model of radius $$\sigma$$ and separation distance $$r$$ is as follows

$$U_{HS} = \left\{ \begin{array}{lr} \infty & r \le \sigma \\ 0 & r > \sigma \end{array} \right.$$

The cutoff model parameter must also be specified, or essentially equated to sigma in order to not skip this HardSphere interaction. For this reason, HardSphere-only models are often used in conjunction with the Configuration argument “set_cutoff_min_to_sigma”.

Public Functions

void serialize(std::ostream &ostr) const

Output a serialized version of the existing model.