ModelParam
-
class ModelParam
Model parameters depend upon site types, such as epsilon, sigma, etc. These parameters may also be mixed between two different site types. Each model parameter has an assumed mixing behavior.
Subclassed by feasst::Anisotropic, feasst::Charge, feasst::CosPatchAngle, feasst::CutOff, feasst::CutoffOuter, feasst::DeltaSigma, feasst::Director, feasst::EnergyAtCutOff, feasst::EnergyDerivAtCutOff, feasst::Epsilon, feasst::Gamma, feasst::Lambda, feasst::MieLambdaA, feasst::MieLambdaR, feasst::MiePrefactor, feasst::ModelLJShapeEnergyAtCutoff, feasst::PatchAngle, feasst::Sigma, feasst::SpherocylinderLength
Public Functions
-
void add(const double value)
Add a new site type.
-
void set(const int site_type, const double value)
Set the value of the site type.
-
void add(const Site &site, const double default_value = 0)
Add a new site type. If the site does not contain the model parameter, then add the default value.
-
void mix()
Compute the mixed values.
-
void set_mixed(const int site_type1, const int site_type2, const double value)
Set the mixed value of the site types.
-
void set_max_and_mixed()
Compute and store the maximum mixed value.
-
double value(const int type) const
Return the value.
-
const std::vector<double> &values() const
Return the values.
-
double mixed_value(const int type1, const int type2) const
Return the mixed value.
-
const std::vector<std::vector<double>> &mixed_values() const
Return the mixed values.
-
int size() const
Return the number of values.
-
double max() const
Return the maximum.
-
double mixed_max() const
Return the mixed maximum.
-
virtual void set_param(const ModelParams &existing)
Define new parameters modeled after the existing ones.
-
std::string str() const
Return as a human readable string.
-
void add(const double value)
-
class Epsilon : public feasst::ModelParam
The epsilon parameter is named “epsilon” in LMP-like data file Site Properties. The epsilon parameter has the default mixing rule: \( \epsilon_{ij} = \sqrt{\epsilon_i \epsilon_j} \)
-
class Sigma : public feasst::ModelParam
The sigma parameter is named “sigma” in LMP-like data file Site Properties. The sigma parameter has the default mixing rule:
\( \sigma_{ij} = \left\{ \begin{array}{lr} 0 & : \sigma_i \sigma_j = 0 \\ 0.5(\sigma_i + \sigma_j) & : \sigma_i\sigma_j \neq 0 \end{array} \right. \)
-
class CutOff : public feasst::ModelParam
The cut off parameter is named “cutoff” in LMP-like data file Site Properties. The cut off parameter has the default mixing rule:
\( r^c_{ij} = \left\{ \begin{array}{lr} 0 & : r^c_i r^c_j = 0 \\ 0.5(r^c_i + r^c_j) & : r^c_ir^c_j \neq 0 \end{array} \right. \)
-
class Charge : public feasst::ModelParam
The charge parameter is named “charge” in LMP-like data file Site Properties. The charge parameter, q, has the default mixing rule: \( q_{ij} = q_i q_j \)
-
class ModelParams : public feasst::PropertiedEntity
Container for all model parameters.
Public Functions
-
void mix()
Compute the mixed values.
-
int size() const
Return the number of values.
-
void set(const std::string &name, const int site_type, const double value)
Modify model parameter of a given site type and name to value.
-
void set(const std::string &name, const int site_type1, const int site_type2, const double value)
Modify the mixed model parameter of a pair of given site types and name to value.
-
void set(const std::string &name, const std::string &filename)
Set mixed model parameters by file.
Add a custom model parameter.
-
const ModelParam &select(const int index) const
Return the model parameter with the corresponding index.
-
int index(const std::string &name) const
Return the index of the model parameter with the corresponding name. Return -1 if name is not found.
-
const ModelParam &select(const std::string &name) const
Return the model parameter with the corresponding name.
-
void set_cutoff_min_to_sigma()
Set the minimum cutoff to sigma. This is used for HardSphere potentials that don’t assign cutoff.
Set the physical constants.
-
void set_physical_constants()
Set the physical constants to their default values CODATA2018.
-
const PhysicalConstants &physical_constants() const
Return the physical constants.
-
const PhysicalConstants &constants() const
Return the physical constants.
-
std::string str() const
Return as a human readable string.
-
ModelParams deep_copy() const
Return a deep copy of self.
-
void mix()