class rgpot::StillingerWeberSi¶
Overview¶
Stillinger-Weber silicon with the 1985 published parameters. More…
#include <SWSi.hpp>
class StillingerWeberSi: public rgpot::Potential< StillingerWeberSi > {
public:
// fields
static double kEpsilon = 3.4723e-12* 1.0e-7 / 1.602176634e-19;
static double kSigma = 2.0951;
static double kA = 7.049556277;
static double kB = 0.6022245584;
static double kP = 4.0;
static double kCut = 1.80;
static double kLambda = 21.0;
static double kGamma = 1.20;
// construction
StillingerWeberSi();
// methods
virtual PotCaps caps() const;
virtual uint64_t paramsKey() const;
void forceImpl(const ForceInput& in, ForceOut* out) const;
void setNeighbourMode(nlist::Mode mode);
void energyAndGradient(const double* positions, const int* atomic_numbers, const double* box, std::size_t n_atoms, double* energy, double* gradient, nlist::NeighborList* neighbors = nullptr) const;
void energyAndGradientBatch(std::size_t n_config, const double* positions, const int* atomic_numbers, const double* box, std::size_t n_atoms, double* energies, double* gradients) const;
};
Detailed Documentation¶
Stillinger-Weber silicon with the 1985 published parameters.
One call evaluates a whole configuration. energyAndGradientBatch evaluates many configurations that share a cell and a species list, so a caller crosses into the library once per batch rather than once per pair.
Fields¶
static double kEpsilon = 3.4723e-12* 1.0e-7 / 1.602176634e-19
Eq. (2.9) prints 3.4723e-12 erg per atom pair, 2.16723920 eV. 1 erg = 1e-7 J. The CODATA electron-volt is 1.602176634e-19 J. PotType::SWSi is 2.3149945 eV, larger by 1.068176741337.
static double kSigma = 2.0951
0.20951 nm, Eq. (2.9).
static double kCut = 1.80
Reduced cutoff a, Eq. (2.7).
Methods¶
virtual PotCaps caps() const
Concurrency and evaluation capabilities of this potential.
Multi-threaded callers (NEB images, dimer endpoints) derive their sharing and cloning policy from this instead of hard-coded lists.
virtual uint64_t paramsKey() const
Fingerprint of the potential’s parameter set.
Mixed into the result-cache key so results never cross parameter sets. Implementations hash their config field by field (see ParamHash.hpp) plus a kernel-version salt that changes whenever the numerics change. The default (0) suits parameter-free potentials whose numerics never changed.
void forceImpl(const ForceInput& in, ForceOut* out) const
Forces, energy and the Cauchy stress sigma = (1/V) dE/dε in eV/Angstrom^3, the convention of stress.hpp. The virial sums each folded bond vector times the energy gradient with respect to it.
void setNeighbourMode(nlist::Mode mode)
Auto, Stored and Stream all use the shared neighbour layer. One thread agrees with the old ordered walk to within 1e-12.
void energyAndGradient(const double* positions, const int* atomic_numbers, const double* box, std::size_t n_atoms, double* energy, double* gradient, nlist::NeighborList* neighbors = nullptr) const
Energy and dE/dx for one configuration.
Parameters:
positions |
Row-major n_atoms by 3 coordinates, Angstrom. |
atomic_numbers |
Length n_atoms. Unused: the 1985 set is silicon. |
box |
Row-major 3 by 3 cell, Angstrom. Periodic in every direction. |
n_atoms |
Atom count. |
energy |
Receives the potential energy, eV. |
gradient |
Receives dE/dx, length 3 * n_atoms, eV/Angstrom. The library force is the negation of this gradient. |
neighbors |
Optional Verlet list. Null uses the internal list, with a skin of one fifth of the cutoff (none in Stream mode). A list is reused while each atom has moved by at most half its skin and the cell is unchanged. |
void energyAndGradientBatch(std::size_t n_config, const double* positions, const int* atomic_numbers, const double* box, std::size_t n_atoms, double* energies, double* gradients) const
Energy and dE/dx for a batch of configurations.
Parameters:
n_config |
Number of configurations. |
positions |
n_config blocks of n_atoms * 3 coordinates. |
atomic_numbers |
Species shared by every configuration. |
box |
Cell shared by every configuration. |
n_atoms |
Atom count of each configuration. |
energies |
Length n_config. |
gradients |
Length n_config * n_atoms * 3. |