namespace rgpot_eam_al_capi¶
Overview¶
C entry point for the embedded-atom aluminium potential. More…
namespace rgpot_eam_al_capi {
// global functions
integer(c_int) function, public rgpot_eam_al_force(integer(c_int), intent(in), value natoms, real(c_double), dimension(3, natoms), intent(in) positions, real(c_double), dimension(3, 3), intent(in) cell, real(c_double), dimension(3, natoms), intent(out) forces, real(c_double), intent(out) energy);
integer(c_int) function, public rgpot_eam_al_force_ws(type(c_ptr), value handle, integer(c_int), intent(in), value natoms, real(c_double), dimension(3, natoms), intent(in) positions, real(c_double), dimension(3, 3), intent(in) cell, real(c_double), dimension(3, natoms), intent(out) forces, real(c_double), intent(out) energy);
} // namespace rgpot_eam_al_capi
Detailed Documentation¶
C entry point for the embedded-atom aluminium potential.
Only bind(c) names leave this library; the physics module exports no external symbols of its own that C could collide with. The _ws entry point keeps the neighbour table in the caller’s workspace (rgpot_workspace), where vesin reuses its buffers and tracks list staleness for that caller’s geometry; the entry point without a handle shares one module-level workspace and is process-serial.
Global Functions¶
integer(c_int) function, public rgpot_eam_al_force(integer(c_int), intent(in), value natoms, real(c_double), dimension(3, natoms), intent(in) positions, real(c_double), dimension(3, 3), intent(in) cell, real(c_double), dimension(3, natoms), intent(out) forces, real(c_double), intent(out) energy)
Evaluate embedded-atom aluminium forces and energy.
positions and forces are 3 * natoms doubles, x/y/z interleaved; cell is nine doubles, row-major, one cell vector per row. Energies are eV and forces eV/Angstrom. Returns zero on success, non-zero on failure with the message available through rgpot_fortran_last_error.
integer(c_int) function, public rgpot_eam_al_force_ws(type(c_ptr), value handle, integer(c_int), intent(in), value natoms, real(c_double), dimension(3, natoms), intent(in) positions, real(c_double), dimension(3, 3), intent(in) cell, real(c_double), dimension(3, natoms), intent(out) forces, real(c_double), intent(out) energy)
Evaluate embedded-atom aluminium forces and energy in a per-caller workspace.
positions and forces are 3 * natoms doubles, x/y/z interleaved; cell is nine doubles, row-major, one cell vector per row. Energies are eV and forces eV/Angstrom. Returns zero on success, non-zero on failure with the message available through rgpot_fortran_workspace_error. handle is a workspace from rgpot_fortran_workspace_new; a NULL handle returns -1.