.. index:: pair: class; rgpot::StillingerWeberSi .. _doxid-classrgpot_1_1_stillinger_weber_si: class rgpot::StillingerWeberSi ============================== .. toctree:: :hidden: Overview ~~~~~~~~ Stillinger-Weber silicon with the 1985 published parameters. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class StillingerWeberSi: public rgpot::Potential< StillingerWeberSi > { public: // fields static double :ref:`kEpsilon` = 3.4723e-12* 1.0e-7 / 1.602176634e-19; static double :ref:`kSigma` = 2.0951; static double :target:`kA` = 7.049556277; static double :target:`kB` = 0.6022245584; static double :target:`kP` = 4.0; static double :ref:`kCut` = 1.80; static double :target:`kLambda` = 21.0; static double :target:`kGamma` = 1.20; // construction :target:`StillingerWeberSi`(); // methods virtual :ref:`PotCaps` :ref:`caps`() const; virtual uint64_t :ref:`paramsKey`() const; void :ref:`forceImpl`(const :ref:`ForceInput`& in, :ref:`ForceOut`* out) const; void :ref:`setNeighbourMode`(nlist::Mode mode); void :ref:`energyAndGradient`(const double* positions, const int* atomic_numbers, const double* box, std::size_t n_atoms, double* energy, double* gradient, :ref:`nlist::NeighborList`* neighbors = nullptr) const; void :ref:`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; }; .. _details-classrgpot_1_1_stillinger_weber_si: 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 ------ .. index:: pair: variable; kEpsilon .. _doxid-classrgpot_1_1_stillinger_weber_si_1a3d57713003fbd11cc7a3cdb5c5b70867: .. ref-code-block:: cpp :class: doxyrest-title-code-block 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. .. index:: pair: variable; kSigma .. _doxid-classrgpot_1_1_stillinger_weber_si_1a80bad90d0f86319d2757f71d4ac78c4b: .. ref-code-block:: cpp :class: doxyrest-title-code-block static double kSigma = 2.0951 0.20951 nm, Eq. (2.9). .. index:: pair: variable; kCut .. _doxid-classrgpot_1_1_stillinger_weber_si_1ab94159ee49fd5b0c0cdd45adbf312e2a: .. ref-code-block:: cpp :class: doxyrest-title-code-block static double kCut = 1.80 Reduced cutoff a, Eq. (2.7). Methods ------- .. index:: pair: function; caps .. _doxid-classrgpot_1_1_stillinger_weber_si_1a092f548ae42a89f6918b7be005256b63: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`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. .. index:: pair: function; paramsKey .. _doxid-classrgpot_1_1_stillinger_weber_si_1aec1e23058cdad634f8caa49f737710c4: .. ref-code-block:: cpp :class: doxyrest-title-code-block 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 :ref:`ParamHash.hpp `) plus a kernel-version salt that changes whenever the numerics change. The default (0) suits parameter-free potentials whose numerics never changed. .. index:: pair: function; forceImpl .. _doxid-classrgpot_1_1_stillinger_weber_si_1ab31b440db32f0b6b2b730c8646d48107: .. ref-code-block:: cpp :class: doxyrest-title-code-block void forceImpl(const :ref:`ForceInput`& in, :ref:`ForceOut`* out) const Forces, energy and the Cauchy stress sigma = (1/V) dE/dε in eV/Angstrom^3, the convention of :ref:`stress.hpp `. The virial sums each folded bond vector times the energy gradient with respect to it. .. index:: pair: function; setNeighbourMode .. _doxid-classrgpot_1_1_stillinger_weber_si_1acbafe3ba8146d719ed3c210d0d7306c3: .. ref-code-block:: cpp :class: doxyrest-title-code-block 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. .. index:: pair: function; energyAndGradient .. _doxid-classrgpot_1_1_stillinger_weber_si_1a62cde2425330a151a5cdf55713fb4e96: .. ref-code-block:: cpp :class: doxyrest-title-code-block void energyAndGradient(const double* positions, const int* atomic_numbers, const double* box, std::size_t n_atoms, double* energy, double* gradient, :ref:`nlist::NeighborList`* neighbors = nullptr) const Energy and dE/dx for one configuration. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - 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. .. index:: pair: function; energyAndGradientBatch .. _doxid-classrgpot_1_1_stillinger_weber_si_1a22df9b2db2ea1161328495c933ccd311: .. ref-code-block:: cpp :class: doxyrest-title-code-block 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. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - 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.