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::Charge, feasst::CosPatchAngle, feasst::CutOff, feasst::EnergyAtCutoff, feasst::EnergyDerivAtCutoff, feasst::Epsilon, feasst::PatchAngle, feasst::Sigma
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.
-
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.
-
std::string
name
() const¶ Return the name of the model parameter (e.g., epsilon, cutoff)
-
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.
-
ModelParam &
set_name
(const std::string name)¶ Set the name of the model parameter.
-
std::string
str
() const¶ Return as a human readable string.
-
void
-
class
Epsilon
: public feasst::ModelParam¶ The epsilon parameter is named “epsilon” in LMP-like data file Pair Coeffs. The epsilon parameter has the 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 Pair Coeffs. The sigma parameter has the mixing rule: \( \sigma_{ij} = 0.5*(\sigma_i + \sigma_j) \)
-
class
CutOff
: public feasst::ModelParam¶ The cut off parameter is named “cutoff” in LMP-like data file Pair Coeffs. The cut off parameter has the mixing rule: \( r^c_{ij} = min(r^c_i, r^c_j)\)
-
class
Charge
: public feasst::ModelParam¶ The charge parameter is named “charge” in LMP-like data file Pair Coeffs. The charge parameter, q, has the mixing rule: \( q_{ij} = q_i q_j \)
-
class
ModelParams
: public feasst::PropertiedEntity¶ Container for all model parameters.
Public Functions
-
ModelParams
(const ModelParams ¶ms)¶ Deep copy constructor.
-
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.
-
const std::vector<std::vector<double>> &
mixed_epsilon
() const¶ Return constant pointers for optimized model inner loops.
Add a custom model parameter.
-
const std::shared_ptr<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.
-
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.
-