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
aee19db2
Commit
aee19db2
authored
Apr 03, 2013
by
Yutong Zhao
Browse files
Fixed reorderAtoms so that it always uses double precision periodicBoxSizeDouble.
parent
fea6769a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
platforms/opencl/src/OpenCLContext.cpp
platforms/opencl/src/OpenCLContext.cpp
+9
-9
No files found.
platforms/opencl/src/OpenCLContext.cpp
View file @
aee19db2
...
...
@@ -963,9 +963,9 @@ void OpenCLContext::reorderAtomsImpl(bool enforcePeriodic) {
Real
minz
=
oldPosq
[
0
].
z
,
maxz
=
oldPosq
[
0
].
z
;
if
(
nonbonded
->
getUsePeriodic
())
{
minx
=
miny
=
minz
=
0.0
;
maxx
=
periodicBoxSize
.
x
;
maxy
=
periodicBoxSize
.
y
;
maxz
=
periodicBoxSize
.
z
;
maxx
=
periodicBoxSize
Double
.
x
;
maxy
=
periodicBoxSize
Double
.
y
;
maxz
=
periodicBoxSize
Double
.
z
;
}
else
{
for
(
int
i
=
1
;
i
<
numAtoms
;
i
++
)
{
...
...
@@ -1013,12 +1013,12 @@ void OpenCLContext::reorderAtomsImpl(bool enforcePeriodic) {
// Move each molecule position into the same box.
for
(
int
i
=
0
;
i
<
numMolecules
;
i
++
)
{
int
xcell
=
(
int
)
floor
(
molPos
[
i
].
x
*
invPeriodicBoxSize
.
x
);
int
ycell
=
(
int
)
floor
(
molPos
[
i
].
y
*
invPeriodicBoxSize
.
y
);
int
zcell
=
(
int
)
floor
(
molPos
[
i
].
z
*
invPeriodicBoxSize
.
z
);
Real
dx
=
xcell
*
periodicBoxSize
.
x
;
Real
dy
=
ycell
*
periodicBoxSize
.
y
;
Real
dz
=
zcell
*
periodicBoxSize
.
z
;
int
xcell
=
(
int
)
floor
(
molPos
[
i
].
x
*
invPeriodicBoxSize
Double
.
x
);
int
ycell
=
(
int
)
floor
(
molPos
[
i
].
y
*
invPeriodicBoxSize
Double
.
y
);
int
zcell
=
(
int
)
floor
(
molPos
[
i
].
z
*
invPeriodicBoxSize
Double
.
z
);
Real
dx
=
xcell
*
periodicBoxSize
Double
.
x
;
Real
dy
=
ycell
*
periodicBoxSize
Double
.
y
;
Real
dz
=
zcell
*
periodicBoxSize
Double
.
z
;
if
(
dx
!=
0.0
f
||
dy
!=
0.0
f
||
dz
!=
0.0
f
)
{
molPos
[
i
].
x
-=
dx
;
molPos
[
i
].
y
-=
dy
;
...
...
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