STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::energy::LayeredPotential< T, T4 > Class Template Reference

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>

Public Member Functions

const LayeredPotentialMetricsgetParameters () 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.
 
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.
 
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.
 
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.
 
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 &parameters_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
 
LayeredPotentialoperator= (const LayeredPotential &other)=default
 
LayeredPotentialoperator= (LayeredPotential &&other)=default
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ LayeredPotential()

template<typename T, typename T4>
stormm::energy::LayeredPotential< T, T4 >::LayeredPotential ( const LayeredPotential< T, T4 > & 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.

Parameters
originalThe existing object to copy or move
otherAnother object to place on the right hand side of the assignment statement

Member Function Documentation

◆ data()

template<typename T, typename T4>
const NrgLayerKit< T4 > stormm::energy::LayeredPotential< T, 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.

Parameters
layer_indexIndex of the layer for which to prepare the abstract
tierAssign pointers to target memory on the CPU host or GPU device

◆ getSmoothingCoefficients()

template<typename T, typename T4>
double4 stormm::energy::LayeredPotential< T, T4 >::getSmoothingCoefficients ( int layer) const

Obtain the quartet of coefficients for one of the layers.

Parameters
layerIndex of the layer of interest

◆ getSplinedDerivative()

template<typename T, typename T4>
T stormm::energy::LayeredPotential< T, T4 >::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.

Parameters
layerIndex of the layer of interest
rDistance at which to evaluate the interaction (specifying a value beyond the particular layer's cutoff will return zero)
orderThe order of the derivative (default 1, the first derivative–specifying zero will return the function value)

◆ getSplinedValue()

template<typename T, typename T4>
T stormm::energy::LayeredPotential< T, T4 >::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.

Parameters
layerIndex of the layer of interest
rDistance 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: