cudaKernels.h 5.48 KB
Newer Older
Peter Eastman's avatar
Peter Eastman committed
1
2
3
4
5
6
7
8
9
10
11
12
/* -------------------------------------------------------------------------- *
 *                                   OpenMM                                   *
 * -------------------------------------------------------------------------- *
 * This is part of the OpenMM molecular simulation toolkit originating from   *
 * Simbios, the NIH National Center for Physics-Based Simulation of           *
 * Biological Structures at Stanford, funded under the NIH Roadmap for        *
 * Medical Research, grant U54 GM072970. See https://simtk.org.               *
 *                                                                            *
 * Portions copyright (c) 2009 Stanford University and the Authors.           *
 * Authors: Scott Le Grand, Peter Eastman                                     *
 * Contributors:                                                              *
 *                                                                            *
13
14
15
16
 * This program is free software: you can redistribute it and/or modify       *
 * it under the terms of the GNU Lesser General Public License as published   *
 * by the Free Software Foundation, either version 3 of the License, or       *
 * (at your option) any later version.                                        *
Peter Eastman's avatar
Peter Eastman committed
17
 *                                                                            *
18
19
20
21
 * This program is distributed in the hope that it will be useful,            *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
 * GNU Lesser General Public License for more details.                        *
Peter Eastman's avatar
Peter Eastman committed
22
 *                                                                            *
23
24
 * You should have received a copy of the GNU Lesser General Public License   *
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.      *
Peter Eastman's avatar
Peter Eastman committed
25
26
27
28
29
30
 * -------------------------------------------------------------------------- */

#include "gputypes.h"

// Initialization
extern void kClearForces(gpuContext gpu);
31
32
extern void kClearEnergy(gpuContext gpu);
extern void kClearBornForces(gpuContext gpu);
Peter Eastman's avatar
Peter Eastman committed
33
34
35
36
37
extern void kCalculateObcGbsaBornSum(gpuContext gpu);
extern void kReduceObcGbsaBornSum(gpuContext gpu);
extern void kGenerateRandoms(gpuContext gpu);

// Main loop
38
39
extern void kCalculateCDLJObcGbsaForces1(gpuContext gpu);
extern void kCalculateCDLJForces(gpuContext gpu);
40
extern void kCalculateCustomNonbondedForces(gpuContext gpu, bool neighborListValid);
41
extern void kReduceObcGbsaBornForces(gpuContext gpu);
Peter Eastman's avatar
Peter Eastman committed
42
extern void kCalculateObcGbsaForces2(gpuContext gpu);
43
extern void kCalculateLocalForces(gpuContext gpu);
Peter Eastman's avatar
Peter Eastman committed
44
45
46
extern void kCalculateAndersenThermostat(gpuContext gpu);
extern void kReduceBornSumAndForces(gpuContext gpu);
extern void kApplyFirstShake(gpuContext gpu);
47
extern void kApplyFirstCCMA(gpuContext gpu);
48
extern void kApplyFirstSettle(gpuContext gpu);
Peter Eastman's avatar
Peter Eastman committed
49
extern void kApplySecondShake(gpuContext gpu);
50
extern void kApplySecondCCMA(gpuContext gpu);
51
extern void kApplySecondSettle(gpuContext gpu);
52
53
extern void kLangevinUpdatePart1(gpuContext gpu);
extern void kLangevinUpdatePart2(gpuContext gpu);
54
extern void kSelectLangevinStepSize(gpuContext gpu, float maxTimeStep);
Peter Eastman's avatar
Peter Eastman committed
55
56
extern void kVerletUpdatePart1(gpuContext gpu);
extern void kVerletUpdatePart2(gpuContext gpu);
57
extern void kSelectVerletStepSize(gpuContext gpu, float maxTimeStep);
Peter Eastman's avatar
Peter Eastman committed
58
59
60
61
62
extern void kBrownianUpdatePart1(gpuContext gpu);
extern void kBrownianUpdatePart2(gpuContext gpu);

// Extras
extern void kReduceForces(gpuContext gpu);
63
extern double kReduceEnergy(gpuContext gpu);
Peter Eastman's avatar
Peter Eastman committed
64
65
66
67
68
69

// Initializers
extern void SetCalculateCDLJObcGbsaForces1Sim(gpuContext gpu);
extern void GetCalculateCDLJObcGbsaForces1Sim(gpuContext gpu);
extern void SetCalculateCDLJForcesSim(gpuContext gpu);
extern void GetCalculateCDLJForcesSim(gpuContext gpu);
70
71
extern void SetCalculateCustomNonbondedForcesSim(gpuContext gpu);
extern void GetCalculateCustomNonbondedForcesSim(gpuContext gpu);
Peter Eastman's avatar
Peter Eastman committed
72
73
74
75
76
77
78
79
80
81
extern void SetCalculateLocalForcesSim(gpuContext gpu);
extern void GetCalculateLocalForcesSim(gpuContext gpu);
extern void SetCalculateObcGbsaBornSumSim(gpuContext gpu);
extern void GetCalculateObcGbsaBornSumSim(gpuContext gpu);
extern void SetCalculateObcGbsaForces2Sim(gpuContext gpu);
extern void GetCalculateObcGbsaForces2Sim(gpuContext gpu);
extern void SetCalculateAndersenThermostatSim(gpuContext gpu);
extern void GetCalculateAndersenThermostatSim(gpuContext gpu);
extern void SetForcesSim(gpuContext gpu);
extern void GetForcesSim(gpuContext gpu);
82
83
84
85
extern void SetShakeHSim(gpuContext gpu);
extern void GetShakeHSim(gpuContext gpu);
extern void SetLangevinUpdateSim(gpuContext gpu);
extern void GetLangevinUpdateSim(gpuContext gpu);
86
87
extern void SetSettleSim(gpuContext gpu);
extern void GetSettleSim(gpuContext gpu);
88
89
extern void SetCCMASim(gpuContext gpu);
extern void GetCCMASim(gpuContext gpu);
Peter Eastman's avatar
Peter Eastman committed
90
91
92
93
94
95
extern void SetVerletUpdateSim(gpuContext gpu);
extern void GetVerletUpdateSim(gpuContext gpu);
extern void SetBrownianUpdateSim(gpuContext gpu);
extern void GetBrownianUpdateSim(gpuContext gpu);
extern void SetRandomSim(gpuContext gpu);
extern void GetRandomSim(gpuContext gpu);
96
97
98
extern void SetCustomNonbondedForceExpression(const Expression<128>& expression);
extern void SetCustomNonbondedEnergyExpression(const Expression<128>& expression);
extern void SetCustomNonbondedCombiningRules(const Expression<64>* expressions);
99
extern void SetCustomNonbondedGlobalParams(const std::vector<float>& paramValues);