Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfBond_cuda.h
1/*******************************************************************************
2 * This file is part of mdcore.
3 * Copyright (c) 2022-2024 T.J. Sego
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 ******************************************************************************/
19
20#ifndef _MDCORE_SOURCE_TFBOND_CUDA_H_
21#define _MDCORE_SOURCE_TFBOND_CUDA_H_
22
23#include "tfPotential_cuda.h"
24#include <tfBond.h>
25
26
27namespace TissueForge::cuda {
28
29
30 struct Bond {
31 uint32_t flags;
32 float dissociation_energy;
33 float half_life;
34 int2 pids;
35
37
38 __host__
39 Bond();
40
41 __host__
42 Bond(TissueForge::Bond *b);
43
44 __host__
45 void finalize();
46 };
47
48 int Bond_setThreads(const unsigned int &nr_threads);
49 int Bond_setBlocks(const unsigned int &nr_blocks);
50 int Bond_getDevice();
51 int Bond_setDevice(engine *e, const int &deviceId);
52 int Bond_toDevice(engine *e);
53 int Bond_fromDevice(engine *e);
54 int Bond_refresh(engine *e);
55 int Bond_refreshBond(engine *e, BondHandle *b);
56 int Bond_refreshBonds(engine *e, BondHandle **bonds, int nr_bonds);
57
58 int engine_cuda_add_bond(TissueForge::Bond *b);
59 int engine_cuda_add_bonds(TissueForge::Bond *bonds, int nr_bonds);
60 int engine_cuda_finalize_bond(int bind);
61 int engine_cuda_finalize_bonds(engine *e, int *binds, int nr_bonds);
62 int engine_cuda_finalize_bonds_all(engine *e);
63 int engine_bond_eval_cuda(struct TissueForge::Bond *bonds, int N, struct engine *e, float *epot_out);
64
65};
66
67#endif // _MDCORE_SOURCE_TFBOND_CUDA_H_
Tissue Forge GPU acceleration on CUDA-supporting devices.
Definition tfAngleConfig.h:26
Handle to a bond.
Definition tfBond.h:144
Bonds apply a potential to a particular set of particles.
Definition tfBond.h:68
A Potential object is a compiled interpolation of a given function. The Universe applies potentials t...
Definition tfPotential.h:213
Definition tfEngine.h:164