75 auto dtHalf(0.5_r * dt);
82 auto temperature = temperature_;
85 auto kernel = KOKKOS_LAMBDA(
const idx_t& idx,
real_t& maxDistSqr)
92 impl::updateKick(vel(idx, 0),
102 pos(idx, 0), pos(idx, 1), pos(idx, 2), vel(idx, 0), vel(idx, 1), vel(idx, 2), dtHalf);
104 if (pred(pos(idx, 0), pos(idx, 1), pos(idx, 2)))
107 auto randGen = RNG.get_state();
110 impl::updateOrnsteinUhlenbeck(vel(idx, 0),
122 RNG.free_state(randGen);
126 pos(idx, 0), pos(idx, 1), pos(idx, 2), vel(idx, 0), vel(idx, 1), vel(idx, 2), dtHalf);
128 dx[0] -= pos(idx, 0);
129 dx[1] -= pos(idx, 1);
130 dx[2] -= pos(idx, 2);
133 maxDistSqr = Kokkos::max(distSqr, maxDistSqr);
136 Kokkos::parallel_reduce(
"VelocityVerletLangevinThermostat::preForceIntegrate",
139 Kokkos::Max<real_t>(maxDistSqr));
141 return std::sqrt(maxDistSqr);