ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
short_range_cabana_helpers.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2026 The ESPResSo project
3 *
4 * This file is part of ESPResSo.
5 *
6 * ESPResSo is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * ESPResSo is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22#include <config/config.hpp>
23
24#include "PropagationMode.hpp"
25#include "aosoa_pack.hpp"
27
28#include <Kokkos_Core.hpp>
29
30// Helper functions to check if specific algorithms are active
31#ifdef ESPRESSO_GAY_BERNE
32// Configured-for-type-pair: mask bit set iff gay_berne has a real cutoff.
33// In-range check is deferred to where it matters.
43#endif
44
45#ifdef ESPRESSO_DPD
46// True iff the DPD thermostat is on AND this type pair has DPD configured.
48dpd_active(IA_parameters const &ia_params, int thermo_switch) {
49 return (thermo_switch & THERMO_DPD) and
50 ((ia_params.active_pair_mask &
52}
53#endif
54
55#ifdef ESPRESSO_THOLE
57 bool has_coulomb_kernel) {
58 return (ia_params.thole.scaling_coeff != 0. and ia_params.thole.q1q2 != 0. and
60}
61#endif
@ THERMO_DPD
#define ESPRESSO_ATTR_ALWAYS_INLINE
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
Various procedures concerning interactions between particles.
constexpr unsigned pair_potential_bit(PairPotential p)
Bitmask for a pair potential.
ESPRESSO_ATTR_ALWAYS_INLINE KOKKOS_INLINE_FUNCTION bool gay_berne_configured(IA_parameters const &ia_params)
ESPRESSO_ATTR_ALWAYS_INLINE KOKKOS_INLINE_FUNCTION bool gay_berne_active(double dist, IA_parameters const &ia_params)
KOKKOS_INLINE_FUNCTION bool thole_active(IA_parameters const &ia_params, bool has_coulomb_kernel)
ESPRESSO_ATTR_ALWAYS_INLINE KOKKOS_INLINE_FUNCTION bool dpd_active(IA_parameters const &ia_params, int thermo_switch)
Parameters for non-bonded interactions.