namespace rgpot_cuh2¶
Overview¶
Embedded-atom potential for Cu/H systems, in gather form. More…
namespace rgpot_cuh2 {
// global variables
integer(ip), parameter, public cuh2_z_cu = 29_ip;
integer(ip), parameter, public cuh2_z_h = 1_ip;
// global functions
pure real(wp) function cuh2_cutoff(class(cuh2_params_t), intent(in) self);
subroutine, public cuh2_energy_forces(real(wp), dimension(:, :), intent(in), contiguous positions, integer(ip), dimension(:), intent(in), contiguous atomic_numbers, real(wp), dimension(3, 3), intent(in) cell, type(cuh2_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_cuh2
Detailed Documentation¶
Embedded-atom potential for Cu/H systems, in gather form.
The EAM energy splits into a pair sum and an embedding sum, U = sum_{i<j} phi_{Z_i Z_j}(r_ij) + sum_i F_{Z_i}(rho_i), rho_i = sum_{j /= i} rho_{Z_j}(r_ij),
so the force on atom i needs dF/drho at both ends of every pair. That fixes the shape of the evaluation: densities first, embedding derivatives second, forces third. Each of the three passes writes one slot per atom and runs under do concurrent.
- With a full neighbour list the force on
icloses over its own row, f_i = sum_j (r_j - r_i) * [ phi’/r + rho’_{Z_j}/r * F’(rho_i) rho’_{Z_i}/r * F’(rho_j) ],
and the bracket is symmetric under i <-> j, so the net force vanishes to rounding without the loop ever touching f_j.
Species come from atomic numbers rather than index ranges, so a caller may interleave Cu and H in any order.
Global Variables¶
integer(ip), parameter, public cuh2_z_cu = 29_ip
Atomic numbers this potential covers.
Global Functions¶
pure real(wp) function cuh2_cutoff(class(cuh2_params_t), intent(in) self)
Interaction cutoff.
subroutine, public cuh2_energy_forces(real(wp), dimension(:, :), intent(in), contiguous positions, integer(ip), dimension(:), intent(in), contiguous atomic_numbers, real(wp), dimension(3, 3), intent(in) cell, type(cuh2_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.
atomic_numbers selects the species per atom and must hold only cuh2_z_cu or cuh2_z_h. Non-zero status leaves energy and forces zeroed and describes the fault in errmsg.