32#include <Kokkos_Core.hpp>
44 Kokkos::View<double **, Kokkos::LayoutRight, execution_space>
local_energy;
76 auto const &
iaparams = *bonded_ias.at(bond_id);
78 auto const pos1 = aosoa.get_vector_at(aosoa.position, i);
79 auto const pos2 = aosoa.get_vector_at(aosoa.position,
j);
80 auto const dx = box_geo.get_mi_vector(pos1, pos2);
92 local_energy(
thread_id, layout.bonded_idx(bond_id)) += energy.value();
126 auto const &
iaparams = *bonded_ias.at(bond_id);
128 auto const pos1 = aosoa.get_vector_at(aosoa.position, i);
129 auto const pos2 = aosoa.get_vector_at(aosoa.position,
j);
130 auto const pos3 = aosoa.get_vector_at(aosoa.position, k);
131 auto const vec1 = box_geo.get_mi_vector(pos2, pos1);
132 auto const vec2 = box_geo.get_mi_vector(
pos3, pos1);
134 std::optional<double> energy =
138 local_energy(
thread_id, layout.bonded_idx(bond_id)) += energy.value();
140 std::array<int, 2>
pids = {aosoa.id(
j), aosoa.id(k)};
173 auto const &
iaparams = *bonded_ias.at(bond_id);
175 auto const pos1 = aosoa.get_vector_at(aosoa.position, i);
176 auto const pos2 = aosoa.get_vector_at(aosoa.position,
j);
177 auto const pos3 = aosoa.get_vector_at(aosoa.position, k);
178 auto const pos4 = aosoa.get_vector_at(aosoa.position, m);
179 auto const v12 = box_geo.get_mi_vector(pos1, pos2);
180 auto const v23 = box_geo.get_mi_vector(
pos3, pos1);
181 auto const v34 = box_geo.get_mi_vector(
pos4,
pos3);
183 std::optional<double> energy =
187 local_energy(
thread_id, layout.bonded_idx(bond_id)) += energy.value();
189 std::array<int, 3>
pids = {aosoa.id(
j), aosoa.id(k), aosoa.id(m)};
Vector implementation and trait types for boost qvm interoperability.
#define ESPRESSO_ATTR_ALWAYS_INLINE
void bond_broken_error(int id, std::span< const int > partner_ids)
container for bonded interactions.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
std::optional< double > calc_dihedral_bonded_energy(Bonded_IA_Parameters const &iaparams, Utils::Vector3d const &v12, Utils::Vector3d const &v23, Utils::Vector3d const &v34)
std::optional< double > calc_pair_bonded_energy(Bonded_IA_Parameters const &iaparams, Utils::Vector3d const &dx, Utils::Vector3d const &pos1, Utils::Vector3d const &pos2, double q1q2, Coulomb::ShortRangeEnergyKernel::kernel_type const *kernel)
std::optional< double > calc_angle_bonded_energy(Bonded_IA_Parameters const &iaparams, Utils::Vector3d const &vec1, Utils::Vector3d const &vec2)
ESPRESSO_ATTR_ALWAYS_INLINE void operator()(std::size_t idx) const
BondsEnergyKernelData data
AngleBondsEnergyKernel(BondsEnergyKernelData data_, LocalBondState::AngleBondlistType bond_list_, LocalBondState::AngleBondIDType bond_ids_)
LocalBondState::AngleBondlistType bond_list
LocalBondState::AngleBondIDType bond_ids
BondedInteractionsMap const & bonded_ias
BoxGeometry const & box_geo
Kokkos::View< double **, Kokkos::LayoutRight, execution_space > local_energy
CellStructure::AoSoA_pack const & aosoa
Kokkos::HostSpace execution_space
Solver::ShortRangeEnergyKernel kernel_type
ESPRESSO_ATTR_ALWAYS_INLINE void operator()(std::size_t idx) const
DihedralBondsEnergyKernel(BondsEnergyKernelData data_, LocalBondState::DihedralBondlistType bond_list_, LocalBondState::DihedralBondIDType bond_ids_)
LocalBondState::DihedralBondlistType bond_list
BondsEnergyKernelData data
LocalBondState::DihedralBondIDType bond_ids
Kokkos::View< int *, Kokkos::LayoutRight, execution_space > AngleBondIDType
Kokkos::View< int *[3], Kokkos::LayoutRight, execution_space > AngleBondlistType
Kokkos::View< int *[2], Kokkos::LayoutRight, execution_space > PairBondlistType
Kokkos::View< int *, Kokkos::LayoutRight, execution_space > DihedralBondIDType
Kokkos::View< int *[4], Kokkos::LayoutRight, execution_space > DihedralBondlistType
Kokkos::View< int *, Kokkos::LayoutRight, execution_space > PairBondIDType
Coulomb::ShortRangeEnergyKernel::kernel_type const *const coulomb_u_kernel
BondsEnergyKernelData data
LocalBondState::PairBondIDType bond_ids
PairBondsEnergyKernel(BondsEnergyKernelData data_, LocalBondState::PairBondlistType bond_list_, LocalBondState::PairBondIDType bond_ids_, Coulomb::ShortRangeEnergyKernel::kernel_type const *coulomb_u_kernel_)
ESPRESSO_ATTR_ALWAYS_INLINE void operator()(std::size_t idx) const
LocalBondState::PairBondlistType bond_list