namespace rgpot_lenosky¶
Overview¶
Lenosky tight-binding-fit silicon in gather form. More…
namespace rgpot_lenosky {
// global variables
real(wp), dimension(0:9), parameter cof_phi = [ 6.92994_wp, -0.43995_wp, -1.70123_wp, -1.62473_wp, -0.99696_wp, -0.27391_wp, -0.02499_wp, -0.01784_wp, -0.00961_wp, 0.0_wp];
// global functions
pure subroutine splint(type(spline_t), intent(in) sp, real(wp), dimension(0:), intent(in) ya, real(wp), dimension(0:), intent(in) y2a, real(wp), intent(in) x, real(wp), intent(out) y, real(wp), intent(out) yp);
subroutine, public lenosky_energy_forces(real(wp), dimension(:, :), intent(in), contiguous positions, real(wp), dimension(3, 3), intent(in) cell, type(lenosky_params_t), intent(in) par, type(neighbor_table_t), intent(inout) table, real(wp), intent(out) energy, real(wp), dimension(:, :), intent(out), contiguous forces, integer, intent(out) status, character(len=:), intent(out), allocatable errmsg);
} // namespace rgpot_lenosky
Detailed Documentation¶
Lenosky tight-binding-fit silicon in gather form.
Atom i carries a pair sum and an embedding term evaluated at a local density built from two- and three-body pieces: dens_i = sum_j rho(r_ij) + sum_{j<k} f(r_ij) f(r_ik) g(cos t_jik),
E_i = sum_j phi(r_ij)/2 + U(dens_i).
Every ingredient is a cubic spline over a tabulated grid, linearly extrapolated outside it.
dU/ddens is not known until dens_i is complete, which is what stops a single-pass gather. Evaluation therefore runs in three passes: the densities, then the embedding derivative per atom, then the force gather, in which atom a collects
its own pair terms,
-dU/ddens_atimes the density gradients of the terms it centres,+dU/ddens_mtimes the gradients it contributes to each neighbourm‘s density, both asm‘s two-body partner and as an end of the tripletsmcentres.
Each pass writes one slot per atom, so all three run under do concurrent.
Global Variables¶
real(wp), dimension(0:9), parameter cof_phi = [ 6.92994_wp, -0.43995_wp, -1.70123_wp, -1.62473_wp, -0.99696_wp, -0.27391_wp, -0.02499_wp, -0.01784_wp, -0.00961_wp, 0.0_wp]
Pair energy spline: 10 knots on [1.5_wp, 4.5_wp].
Global Functions¶
pure subroutine splint(type(spline_t), intent(in) sp, real(wp), dimension(0:), intent(in) ya, real(wp), dimension(0:), intent(in) y2a, real(wp), intent(in) x, real(wp), intent(out) y, real(wp), intent(out) yp)
Cubic spline value and derivative, linear outside the knot range.
subroutine, public lenosky_energy_forces(real(wp), dimension(:, :), intent(in), contiguous positions, real(wp), dimension(3, 3), intent(in) cell, type(lenosky_params_t), intent(in) par, type(neighbor_table_t), intent(inout) table, real(wp), intent(out) energy, real(wp), dimension(:, :), intent(out), contiguous forces, integer, intent(out) status, character(len=:), intent(out), allocatable errmsg)
Energy and forces for positions (3 x natoms) in cell.