Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
f224fe20
Commit
f224fe20
authored
Sep 29, 2010
by
Mark Friedrichs
Browse files
Cleanup for Windows compile
parent
73b55e33
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
21 deletions
+9
-21
plugins/amoeba/platforms/cuda/src/kernels/AmoebaGpu.cpp
plugins/amoeba/platforms/cuda/src/kernels/AmoebaGpu.cpp
+7
-19
plugins/amoeba/platforms/reference/src/AmoebaReferenceKernelFactory.cpp
.../platforms/reference/src/AmoebaReferenceKernelFactory.cpp
+2
-2
No files found.
plugins/amoeba/platforms/cuda/src/kernels/AmoebaGpu.cpp
View file @
f224fe20
...
...
@@ -1442,18 +1442,6 @@ void gpuKirkwoodAllocate( amoebaGpuContext amoebaGpu )
}
static
void
tabulateErfc
(
gpuContext
gpu
)
{
int
tableSize
=
2048
;
gpu
->
sim
.
tabulatedErfcSize
=
tableSize
;
gpu
->
sim
.
tabulatedErfcScale
=
tableSize
/
(
gpu
->
sim
.
alphaEwald
*
gpu
->
sim
.
nonbondedCutoff
);
gpu
->
psTabulatedErfc
=
new
CUDAStream
<
float
>
(
tableSize
,
1
,
"TabulatedErfc"
);
gpu
->
sim
.
pTabulatedErfc
=
gpu
->
psTabulatedErfc
->
_pDevData
;
for
(
int
i
=
0
;
i
<
tableSize
;
++
i
)
(
*
gpu
->
psTabulatedErfc
)[
i
]
=
(
float
)
erfc
(
i
*
(
gpu
->
sim
.
alphaEwald
*
gpu
->
sim
.
nonbondedCutoff
)
/
tableSize
);
gpu
->
psTabulatedErfc
->
Upload
();
}
/**---------------------------------------------------------------------------------------
Create/initialize data structs associated w/ molecular -> lab frame calculation
...
...
@@ -1469,7 +1457,7 @@ void gpuSetAmoebaMultipoleParameters(amoebaGpuContext amoebaGpu, const std::vect
const
std
::
vector
<
std
::
vector
<
std
::
vector
<
int
>
>
>&
multipoleParticleCovalentInfo
,
const
std
::
vector
<
int
>&
covalentDegree
,
const
std
::
vector
<
int
>&
minCovalentIndices
,
const
std
::
vector
<
int
>&
minCovalentPolarizationIndices
,
int
maxCovalentRange
,
int
mutualInducedIterativeMethod
,
int
mutualInducedMaxIterations
,
float
mutualInducedTargetEpsilon
,
int
nonbondedMethod
,
float
cutoffDistance
,
float
alphaEwald
,
float
electricConstant
){
int
nonbondedMethod
,
float
cutoffDistance
,
float
alphaEwald
,
float
electricConstant
)
{
// ---------------------------------------------------------------------------------------
...
...
@@ -1569,7 +1557,7 @@ void gpuSetAmoebaMultipoleParameters(amoebaGpuContext amoebaGpu, const std::vect
(
void
)
fflush
(
amoebaGpu
->
log
);
}
amoebaGpu
->
amoebaSim
.
cutoffDistance2
=
cutoffDistance
*
cutoffDistance
;
amoebaGpu
->
amoebaSim
.
sqrtPi
=
sqrt
(
3.14159265358
97932384626433832795
);
amoebaGpu
->
amoebaSim
.
sqrtPi
=
std
::
sqrt
(
3.14159265358
f
);
amoebaGpu
->
amoebaSim
.
electric
=
electricConstant
;
amoebaGpu
->
gpuContext
->
sim
.
alphaEwald
=
alphaEwald
;
amoebaGpu
->
gpuContext
->
sim
.
nonbondedCutoff
=
cutoffDistance
;
...
...
@@ -2270,19 +2258,19 @@ void gpuSetAmoebaPMEParameters(amoebaGpuContext amoebaGpu, float alpha, int grid
sum1
=
sum1
+
bsarray
[
j
]
*
cos
(
arg
);
sum2
=
sum2
+
bsarray
[
j
]
*
sin
(
arg
);
}
bsmod
[
i
]
=
sum1
*
sum1
+
sum2
*
sum2
;
bsmod
[
i
]
=
static_cast
<
float
>
(
sum1
*
sum1
+
sum2
*
sum2
)
;
}
// fix for exponential Euler spline interpolation failure
double
eps
=
1.0e-7
;
if
(
bsmod
[
0
]
<
eps
)
bsmod
[
0
]
=
0.5
*
bsmod
[
1
];
bsmod
[
0
]
=
0.5
f
*
bsmod
[
1
];
for
(
int
i
=
1
;
i
<
size
-
1
;
i
++
)
if
(
bsmod
[
i
]
<
eps
)
bsmod
[
i
]
=
0.5
*
(
bsmod
[
i
-
1
]
+
bsmod
[
i
+
1
]);
bsmod
[
i
]
=
0.5
f
*
(
bsmod
[
i
-
1
]
+
bsmod
[
i
+
1
]);
if
(
bsmod
[
size
-
1
]
<
eps
)
bsmod
[
size
-
1
]
=
0.5
*
bsmod
[
size
-
2
];
bsmod
[
size
-
1
]
=
0.5
f
*
bsmod
[
size
-
2
];
// compute and apply the optimal zeta coefficient
...
...
@@ -2310,7 +2298,7 @@ void gpuSetAmoebaPMEParameters(amoebaGpuContext amoebaGpu, float alpha, int grid
}
zeta
=
sum2
/
sum1
;
}
bsmod
[
i
-
1
]
=
bsmod
[
i
-
1
]
*
zeta
*
zeta
;
bsmod
[
i
-
1
]
=
bsmod
[
i
-
1
]
*
static_cast
<
float
>
(
zeta
*
zeta
)
;
}
gpu
->
psPmeBsplineModuli
[
dim
]
->
Upload
();
}
...
...
plugins/amoeba/platforms/reference/src/AmoebaReferenceKernelFactory.cpp
View file @
f224fe20
...
...
@@ -27,13 +27,13 @@
#include "AmoebaReferenceKernelFactory.h"
#include "AmoebaReferenceKernels.h"
#include "ReferencePlatform.h"
#include "
windowsExportAmoebaReference
.h"
#include "
openmm/internal/windowsExport
.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/OpenMMException.h"
using
namespace
OpenMM
;
extern
"C"
void
OPENMM_
AMOEBA_REFERENCE_
EXPORT
registerKernelFactories
()
{
extern
"C"
void
OPENMM_EXPORT
registerKernelFactories
()
{
for
(
int
ii
=
0
;
ii
<
Platform
::
getNumPlatforms
();
ii
++
){
Platform
&
platform
=
Platform
::
getPlatform
(
ii
);
if
(
platform
.
getName
()
==
"Reference"
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment