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
78b80ccf
Commit
78b80ccf
authored
Jan 16, 2015
by
peastman
Browse files
Merge pull request #787 from peastman/step
Variable step size integrators were scaling the step size incorrectly
parents
923ccea5
bd01a379
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
platforms/cuda/src/kernels/langevin.cu
platforms/cuda/src/kernels/langevin.cu
+1
-1
platforms/cuda/src/kernels/verlet.cu
platforms/cuda/src/kernels/verlet.cu
+1
-1
platforms/opencl/src/kernels/langevin.cl
platforms/opencl/src/kernels/langevin.cl
+1
-1
platforms/opencl/src/kernels/verlet.cl
platforms/opencl/src/kernels/verlet.cl
+1
-1
No files found.
platforms/cuda/src/kernels/langevin.cu
View file @
78b80ccf
...
...
@@ -90,7 +90,7 @@ extern "C" __global__ void selectLangevinStepSize(int numAtoms, int paddedNumAto
while
(
index
<
numAtoms
)
{
mixed3
f
=
make_mixed3
(
scale
*
force
[
index
],
scale
*
force
[
index
+
paddedNumAtoms
],
scale
*
force
[
index
+
paddedNumAtoms
*
2
]);
mixed
invMass
=
velm
[
index
].
w
;
err
+=
(
f
.
x
*
f
.
x
+
f
.
y
*
f
.
y
+
f
.
z
*
f
.
z
)
*
invMass
;
err
+=
(
f
.
x
*
f
.
x
+
f
.
y
*
f
.
y
+
f
.
z
*
f
.
z
)
*
invMass
*
invMass
;
index
+=
blockDim
.
x
*
gridDim
.
x
;
}
error
[
threadIdx
.
x
]
=
err
;
...
...
platforms/cuda/src/kernels/verlet.cu
View file @
78b80ccf
...
...
@@ -89,7 +89,7 @@ extern "C" __global__ void selectVerletStepSize(int numAtoms, int paddedNumAtoms
for
(
int
index
=
threadIdx
.
x
;
index
<
numAtoms
;
index
+=
blockDim
.
x
*
gridDim
.
x
)
{
mixed3
f
=
make_mixed3
(
scale
*
force
[
index
],
scale
*
force
[
index
+
paddedNumAtoms
],
scale
*
force
[
index
+
paddedNumAtoms
*
2
]);
mixed
invMass
=
velm
[
index
].
w
;
err
+=
(
f
.
x
*
f
.
x
+
f
.
y
*
f
.
y
+
f
.
z
*
f
.
z
)
*
invMass
;
err
+=
(
f
.
x
*
f
.
x
+
f
.
y
*
f
.
y
+
f
.
z
*
f
.
z
)
*
invMass
*
invMass
;
}
error
[
threadIdx
.
x
]
=
err
;
__syncthreads
();
...
...
platforms/opencl/src/kernels/langevin.cl
View file @
78b80ccf
...
...
@@ -81,7 +81,7 @@ __kernel void selectLangevinStepSize(mixed maxStepSize, mixed errorTol, mixed ta
while
(
index
<
NUM_ATOMS
)
{
real4
f
=
force[index]
;
mixed
invMass
=
velm[index].w
;
err
+=
(
f.x*f.x
+
f.y*f.y
+
f.z*f.z
)
*invMass
;
err
+=
(
f.x*f.x
+
f.y*f.y
+
f.z*f.z
)
*invMass
*
invMass
;
index
+=
get_global_size
(
0
)
;
}
error[get_local_id
(
0
)
]
=
err
;
...
...
platforms/opencl/src/kernels/verlet.cl
View file @
78b80ccf
...
...
@@ -85,7 +85,7 @@ __kernel void selectVerletStepSize(int numAtoms, mixed maxStepSize, mixed errorT
while
(
index
<
numAtoms
)
{
real4
f
=
force[index]
;
mixed
invMass
=
velm[index].w
;
err
+=
(
f.x*f.x
+
f.y*f.y
+
f.z*f.z
)
*invMass
;
err
+=
(
f.x*f.x
+
f.y*f.y
+
f.z*f.z
)
*invMass
*
invMass
;
index
+=
get_global_size
(
0
)
;
}
error[get_local_id
(
0
)
]
=
err
;
...
...
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