A long-ranged potential can be broken down into a series of successively smoother potentials applicable over longer and longer ranges. This object will manage a process whereby each potential and its first three derivatives decay exactly to zero at the specified boundary. The process generates some very complicated forms, particularly in the shortest-range potential where the effects assigned to all longer-ranged potentials must be subtracted off, but use of logarithmic adaptive splines can absorb the complexity.
More...
#include <layered_potential.h>
|
const LayeredPotentialMetrics & | getParameters () const |
| Get a const reference to the underlying metrics, to view specifications such as the cutoff at a particular level, one of the exponential scaling factors, etc. All accessors in the nested class can then be utilized without copying the code.
|
|
double4 | getSmoothingCoefficients (int layer) const |
| Obtain the quartet of coefficients for one of the layers.
|
|
T | getSplinedValue (int layer, T r, T r2=-1.0) const |
| Get the value of one of the potential functions at a specified layer and distance, using the appropriate internal spline table.
|
|
T | getAnalyticValue (int layer, T r, T r2=-1.0) const |
| Compute the value of one of the potential functions, using analytic expressions, at a specified layer and distance. Descriptions of input parameters follow from getSplinedValue() above.
|
|
T | getSplinedDerivative (int layer, T r, T r2=-1.0, int order=1) const |
| Get the value of the potential derivative at a specified layer and distance, making use of an internal table for the derivative.
|
|
T | getAnalyticDerivative (int layer, T r, T r2=-1.0, int order=1) const |
| Get the value of the potential derivative at a specified layer and distance, using analytic calculations. Descriptions of input parameters follow from getSplinedDerivative() above.
|
|
const NrgLayerKit< T4 > | data (int layer_index, HybridTargetLevel tier=HybridTargetLevel::HOST) const |
| Get a read-only abstract for the object, gear towards a specific layer of the potential. The abstract for the appropriate spline table, plus limits of the layer's range, will be included. Because the final spline segment might not terminate at precisely the layer's cutoff, it is essential to check whether any particular interaction is in the applicable range, rather than relying on spline table entries to be zero past the applicable range.
|
|
|
| LayeredPotential (const LayeredPotentialMetrics ¶meters_in=LayeredPotentialMetrics()) |
| The constructor requires an enumeration to specify a particular potential form as well as a rough understanding of the box size. The CLASH form corresponds to an empty object. For van-der Waals potentials, the type of mixing rule can also be significant: the shortest-ranged potentials will turn on the 1/r^6 potential with a sigmoidal switching function to allow NBFIX and Lorentz-Berthelot style mixing rules to apply their unique interactions at close range, pushing back the transition to a geometric combining rule to a longer range where the difference between mixing rules is trivial.
|
|
|
| LayeredPotential (const LayeredPotential &original)=default |
| So long as the nested parameters manager and LogScaleSpline objects copy and move correctly, the copy and move constructors, as well as the copy and move assignment operators will be valid.
|
|
| LayeredPotential (LayeredPotential &&original)=default |
|
LayeredPotential & | operator= (const LayeredPotential &other)=default |
|
LayeredPotential & | operator= (LayeredPotential &&other)=default |
|
template<typename T, typename T4>
class stormm::energy::LayeredPotential< T, T4 >
A long-ranged potential can be broken down into a series of successively smoother potentials applicable over longer and longer ranges. This object will manage a process whereby each potential and its first three derivatives decay exactly to zero at the specified boundary. The process generates some very complicated forms, particularly in the shortest-range potential where the effects assigned to all longer-ranged potentials must be subtracted off, but use of logarithmic adaptive splines can absorb the complexity.
◆ LayeredPotential()
template<typename T, typename T4>
So long as the nested parameters manager and LogScaleSpline objects copy and move correctly, the copy and move constructors, as well as the copy and move assignment operators will be valid.
- Parameters
-
original | The existing object to copy or move |
other | Another object to place on the right hand side of the assignment statement |
◆ data()
template<typename T, typename T4>
Get a read-only abstract for the object, gear towards a specific layer of the potential. The abstract for the appropriate spline table, plus limits of the layer's range, will be included. Because the final spline segment might not terminate at precisely the layer's cutoff, it is essential to check whether any particular interaction is in the applicable range, rather than relying on spline table entries to be zero past the applicable range.
- Parameters
-
layer_index | Index of the layer for which to prepare the abstract |
tier | Assign pointers to target memory on the CPU host or GPU device |
◆ getSmoothingCoefficients()
template<typename T, typename T4>
Obtain the quartet of coefficients for one of the layers.
- Parameters
-
layer | Index of the layer of interest |
◆ getSplinedDerivative()
template<typename T, typename T4>
Get the value of the potential derivative at a specified layer and distance, making use of an internal table for the derivative.
- Parameters
-
layer | Index of the layer of interest |
r | Distance at which to evaluate the interaction (specifying a value beyond the particular layer's cutoff will return zero) |
order | The order of the derivative (default 1, the first derivative–specifying zero will return the function value) |
◆ getSplinedValue()
template<typename T, typename T4>
Get the value of one of the potential functions at a specified layer and distance, using the appropriate internal spline table.
- Parameters
-
layer | Index of the layer of interest |
r | Distance at which to evaluate the interaction (specifying a value beyond the particular layer's cutoff will return zero) |
The documentation for this class was generated from the following file: