Computing the long-range energies and forces follow the same approach used for the cell structure factor calculation. Dynamic parallelism is used again, so a single kernel launched from the host launches a kernel for each cell. To compute the long-range energy and force, an atom is assigned to a warp. The warps then iterate through all of the cubature nodes, compute the basis function and the partial contribution to the total energy and force for a given atom. After all cubature nodes have been iterated, the warp performs another reduction to compute the total interaction energy and force for an atom within a given cell.