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
"examples/cpp-examples/HelloWaterBox.cpp" did not exist on "15811b7c56b65a5e94e4c7b212100b37b4de331f"
Commit
f224fe20
authored
Sep 29, 2010
by
Mark Friedrichs
Browse files
Cleanup for Windows compile
parent
73b55e33
Changes
2
Hide 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 )
...
@@ -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
Create/initialize data structs associated w/ molecular -> lab frame calculation
...
@@ -1469,7 +1457,7 @@ void gpuSetAmoebaMultipoleParameters(amoebaGpuContext amoebaGpu, const std::vect
...
@@ -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
<
std
::
vector
<
std
::
vector
<
int
>
>
>&
multipoleParticleCovalentInfo
,
const
std
::
vector
<
int
>&
covalentDegree
,
const
std
::
vector
<
int
>&
minCovalentIndices
,
const
std
::
vector
<
int
>&
minCovalentPolarizationIndices
,
int
maxCovalentRange
,
const
std
::
vector
<
int
>&
minCovalentIndices
,
const
std
::
vector
<
int
>&
minCovalentPolarizationIndices
,
int
maxCovalentRange
,
int
mutualInducedIterativeMethod
,
int
mutualInducedMaxIterations
,
float
mutualInducedTargetEpsilon
,
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
...
@@ -1569,7 +1557,7 @@ void gpuSetAmoebaMultipoleParameters(amoebaGpuContext amoebaGpu, const std::vect
(
void
)
fflush
(
amoebaGpu
->
log
);
(
void
)
fflush
(
amoebaGpu
->
log
);
}
}
amoebaGpu
->
amoebaSim
.
cutoffDistance2
=
cutoffDistance
*
cutoffDistance
;
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
->
amoebaSim
.
electric
=
electricConstant
;
amoebaGpu
->
gpuContext
->
sim
.
alphaEwald
=
alphaEwald
;
amoebaGpu
->
gpuContext
->
sim
.
alphaEwald
=
alphaEwald
;
amoebaGpu
->
gpuContext
->
sim
.
nonbondedCutoff
=
cutoffDistance
;
amoebaGpu
->
gpuContext
->
sim
.
nonbondedCutoff
=
cutoffDistance
;
...
@@ -2270,19 +2258,19 @@ void gpuSetAmoebaPMEParameters(amoebaGpuContext amoebaGpu, float alpha, int grid
...
@@ -2270,19 +2258,19 @@ void gpuSetAmoebaPMEParameters(amoebaGpuContext amoebaGpu, float alpha, int grid
sum1
=
sum1
+
bsarray
[
j
]
*
cos
(
arg
);
sum1
=
sum1
+
bsarray
[
j
]
*
cos
(
arg
);
sum2
=
sum2
+
bsarray
[
j
]
*
sin
(
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
// fix for exponential Euler spline interpolation failure
double
eps
=
1.0e-7
;
double
eps
=
1.0e-7
;
if
(
bsmod
[
0
]
<
eps
)
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
++
)
for
(
int
i
=
1
;
i
<
size
-
1
;
i
++
)
if
(
bsmod
[
i
]
<
eps
)
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
)
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
// compute and apply the optimal zeta coefficient
...
@@ -2310,7 +2298,7 @@ void gpuSetAmoebaPMEParameters(amoebaGpuContext amoebaGpu, float alpha, int grid
...
@@ -2310,7 +2298,7 @@ void gpuSetAmoebaPMEParameters(amoebaGpuContext amoebaGpu, float alpha, int grid
}
}
zeta
=
sum2
/
sum1
;
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
();
gpu
->
psPmeBsplineModuli
[
dim
]
->
Upload
();
}
}
...
...
plugins/amoeba/platforms/reference/src/AmoebaReferenceKernelFactory.cpp
View file @
f224fe20
...
@@ -27,13 +27,13 @@
...
@@ -27,13 +27,13 @@
#include "AmoebaReferenceKernelFactory.h"
#include "AmoebaReferenceKernelFactory.h"
#include "AmoebaReferenceKernels.h"
#include "AmoebaReferenceKernels.h"
#include "ReferencePlatform.h"
#include "ReferencePlatform.h"
#include "
windowsExportAmoebaReference
.h"
#include "
openmm/internal/windowsExport
.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
using
namespace
OpenMM
;
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
++
){
for
(
int
ii
=
0
;
ii
<
Platform
::
getNumPlatforms
();
ii
++
){
Platform
&
platform
=
Platform
::
getPlatform
(
ii
);
Platform
&
platform
=
Platform
::
getPlatform
(
ii
);
if
(
platform
.
getName
()
==
"Reference"
){
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