ModelTwoBodyTable
-
class ModelTwoBodyTable : public feasst::ModelTwoBody
Tabulate two-body models and interpolate their interactions during the simulation. Scale distances,r, by the parameter z, which has more resolution at lower r. \(z=[(1/r^2 - 1/r_h2)/(1/r_c^2 - 1/r_h^2)]\) Because there is a higher resolution at lower r, it is best if the hard_sphere_threshold parameter is tuned well for the specific model.
Public Functions
-
ModelTwoBodyTable(argtype args = argtype())
args:
hard_sphere_threshold: when r < threshold*sigma, return NEAR_INFINITY (default: 0.85).
-
void precompute(const ModelParams &existing)
Precompute model parameters based on existing model parameters.
-
void resize(const int num_site_types)
Resize the table based on the number of site types.
Set a table potential between sites of type1 and type2. Table distances are normalized between 0 and 1, inclusive, where z = (r^-2-rh^-2)/(rc^-2-rh^-2), rh is the hard_sphere_threshold and rc is the cutoff. Thus, the first element of the table is for a distance of rh, and the last element of the table is for a distance of rc.
-
void set(const ModelParams &model_params, const int size, const int num_types, Model *model)
Tabulate an existing model.
- param num_types:
size of table
Same as above, but with a shared_ptr model.
- param num_types:
size of table
-
void serialize(std::ostream &ostr) const
Output a serialized version of the existing model.
-
ModelTwoBodyTable(argtype args = argtype())