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
"platforms/vscode:/vscode.git/clone" did not exist on "bdc8f29eaec9799e386d197153c1031ffc5be201"
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) {
...
@@ -963,9 +963,9 @@ void OpenCLContext::reorderAtomsImpl(bool enforcePeriodic) {
Real
minz
=
oldPosq
[
0
].
z
,
maxz
=
oldPosq
[
0
].
z
;
Real
minz
=
oldPosq
[
0
].
z
,
maxz
=
oldPosq
[
0
].
z
;
if
(
nonbonded
->
getUsePeriodic
())
{
if
(
nonbonded
->
getUsePeriodic
())
{
minx
=
miny
=
minz
=
0.0
;
minx
=
miny
=
minz
=
0.0
;
maxx
=
periodicBoxSize
.
x
;
maxx
=
periodicBoxSize
Double
.
x
;
maxy
=
periodicBoxSize
.
y
;
maxy
=
periodicBoxSize
Double
.
y
;
maxz
=
periodicBoxSize
.
z
;
maxz
=
periodicBoxSize
Double
.
z
;
}
}
else
{
else
{
for
(
int
i
=
1
;
i
<
numAtoms
;
i
++
)
{
for
(
int
i
=
1
;
i
<
numAtoms
;
i
++
)
{
...
@@ -1013,12 +1013,12 @@ void OpenCLContext::reorderAtomsImpl(bool enforcePeriodic) {
...
@@ -1013,12 +1013,12 @@ void OpenCLContext::reorderAtomsImpl(bool enforcePeriodic) {
// Move each molecule position into the same box.
// Move each molecule position into the same box.
for
(
int
i
=
0
;
i
<
numMolecules
;
i
++
)
{
for
(
int
i
=
0
;
i
<
numMolecules
;
i
++
)
{
int
xcell
=
(
int
)
floor
(
molPos
[
i
].
x
*
invPeriodicBoxSize
.
x
);
int
xcell
=
(
int
)
floor
(
molPos
[
i
].
x
*
invPeriodicBoxSize
Double
.
x
);
int
ycell
=
(
int
)
floor
(
molPos
[
i
].
y
*
invPeriodicBoxSize
.
y
);
int
ycell
=
(
int
)
floor
(
molPos
[
i
].
y
*
invPeriodicBoxSize
Double
.
y
);
int
zcell
=
(
int
)
floor
(
molPos
[
i
].
z
*
invPeriodicBoxSize
.
z
);
int
zcell
=
(
int
)
floor
(
molPos
[
i
].
z
*
invPeriodicBoxSize
Double
.
z
);
Real
dx
=
xcell
*
periodicBoxSize
.
x
;
Real
dx
=
xcell
*
periodicBoxSize
Double
.
x
;
Real
dy
=
ycell
*
periodicBoxSize
.
y
;
Real
dy
=
ycell
*
periodicBoxSize
Double
.
y
;
Real
dz
=
zcell
*
periodicBoxSize
.
z
;
Real
dz
=
zcell
*
periodicBoxSize
Double
.
z
;
if
(
dx
!=
0.0
f
||
dy
!=
0.0
f
||
dz
!=
0.0
f
)
{
if
(
dx
!=
0.0
f
||
dy
!=
0.0
f
||
dz
!=
0.0
f
)
{
molPos
[
i
].
x
-=
dx
;
molPos
[
i
].
x
-=
dx
;
molPos
[
i
].
y
-=
dy
;
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