n2p2 - A neural network potential package
|
A screening functions for use with electrostatics. More...
#include <ScreeningFunction.h>
Public Member Functions | |
ScreeningFunction () | |
Constructor, initializes to #CoreFunction::Type::POLY2. More... | |
void | setCoreFunction (CoreFunction::Type const type) |
Set functional form of transition region. More... | |
void | setCoreFunction (std::string const type) |
Set functional form of transition region. More... | |
void | setInnerOuter (double inner, double outer) |
Set inner and outer limit of transition region. More... | |
CoreFunction::Type | getCoreFunctionType () const |
Getter for #type. More... | |
double | getInner () const |
Getter for inner. More... | |
double | getOuter () const |
Getter for outer. More... | |
void | changeLengthUnits (double const conv) |
Change length units of screening function. More... | |
double | f (double r) const |
Screening function \(f_\text{screen}\). More... | |
double | df (double r) const |
Derivative of screening function \(\frac{d f_\text{screen}}{d r}\). More... | |
void | fdf (double r, double &fr, double &dfr) const |
Calculate screening function and derivative at once. More... | |
std::vector< std::string > | info () const |
Get string with information of screening function. More... | |
Private Attributes | |
double | inner |
Inner radius where transition region starts. More... | |
double | outer |
Outer radius where transition region ends. More... | |
double | scale |
Inverse width. More... | |
CoreFunction | core |
Core function to be used in the transition region. More... | |
A screening functions for use with electrostatics.
Definition at line 26 of file ScreeningFunction.h.
ScreeningFunction::ScreeningFunction | ( | ) |
Constructor, initializes to #CoreFunction::Type::POLY2.
Definition at line 24 of file ScreeningFunction.cpp.
References core, nnp::CoreFunction::POLY2, and nnp::CoreFunction::setType().
|
inline |
Set functional form of transition region.
[in] | type | Type of core function to use. |
Definition at line 113 of file ScreeningFunction.h.
References core, and nnp::CoreFunction::setType().
Referenced by nnp::Mode::setupElectrostatics().
|
inline |
Set functional form of transition region.
[in] | typeString | Type (string version) of core function to use. |
Definition at line 120 of file ScreeningFunction.h.
References core, and nnp::CoreFunction::setType().
void ScreeningFunction::setInnerOuter | ( | double | inner, |
double | outer | ||
) |
Set inner and outer limit of transition region.
[in] | inner | Inner radius where transition region begins. |
[in] | outer | Outer radius where transition region ends. |
Definition at line 31 of file ScreeningFunction.cpp.
References inner, outer, and scale.
Referenced by nnp::Mode::setupElectrostatics().
|
inline |
Getter for #type.
Definition at line 127 of file ScreeningFunction.h.
References core, and nnp::CoreFunction::getType().
|
inline |
Getter for inner.
Definition at line 132 of file ScreeningFunction.h.
References inner.
|
inline |
Getter for outer.
Definition at line 133 of file ScreeningFunction.h.
References outer.
Referenced by nnp::Structure::calculateElectrostaticEnergyDerivatives(), nnp::Training::calculateNeighborLists(), nnp::Structure::calculateScreeningEnergy(), nnp::Mode::evaluateNNP(), nnp::InterfaceLammps::finalizeNeighborList(), nnp::InterfaceLammps::getMaxCutoffRadiusOverall(), and nnp::Mode::setupCutoffMatrix().
void ScreeningFunction::changeLengthUnits | ( | double const | conv | ) |
Change length units of screening function.
conv | Multiplicative conversion factor. |
Definition at line 46 of file ScreeningFunction.cpp.
References inner, outer, and scale.
Referenced by nnp::Mode::setupElectrostatics().
|
inline |
Screening function \(f_\text{screen}\).
[in] | r | Radius argument. |
Definition at line 135 of file ScreeningFunction.h.
References core, nnp::CoreFunction::f(), inner, outer, and scale.
Referenced by nnp::Structure::calculateElectrostaticEnergyDerivatives(), and nnp::Structure::calculateScreeningEnergy().
|
inline |
Derivative of screening function \(\frac{d f_\text{screen}}{d r}\).
[in] | r | Radius argument. |
Definition at line 142 of file ScreeningFunction.h.
References core, nnp::CoreFunction::df(), inner, outer, and scale.
Referenced by nnp::Structure::calculateElectrostaticEnergyDerivatives().
|
inline |
Calculate screening function and derivative at once.
[in] | r | Radius argument. |
[out] | fr | Screening function value. |
[out] | dfr | Value of screening function derivative. |
Definition at line 148 of file ScreeningFunction.h.
References core, nnp::CoreFunction::fdf(), inner, outer, and scale.
vector< string > ScreeningFunction::info | ( | ) | const |
Get string with information of screening function.
Definition at line 52 of file ScreeningFunction.cpp.
References core, nnp::CoreFunction::info(), inner, outer, and nnp::strpr().
Referenced by nnp::Mode::setupElectrostatics().
|
private |
Inner radius where transition region starts.
Definition at line 99 of file ScreeningFunction.h.
Referenced by changeLengthUnits(), df(), f(), fdf(), getInner(), info(), and setInnerOuter().
|
private |
Outer radius where transition region ends.
Definition at line 101 of file ScreeningFunction.h.
Referenced by changeLengthUnits(), df(), f(), fdf(), getOuter(), info(), and setInnerOuter().
|
private |
Inverse width.
Definition at line 103 of file ScreeningFunction.h.
Referenced by changeLengthUnits(), df(), f(), fdf(), and setInnerOuter().
|
private |
Core function to be used in the transition region.
Definition at line 105 of file ScreeningFunction.h.
Referenced by df(), f(), fdf(), getCoreFunctionType(), info(), ScreeningFunction(), and setCoreFunction().