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
f4080faa
Unverified
Commit
f4080faa
authored
Oct 03, 2019
by
peastman
Committed by
GitHub
Oct 03, 2019
Browse files
Merge pull request #2416 from peastman/triclinic
Fixed error building neighbor list with triclinic box
parents
509fa77e
2d7fb355
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
platforms/cuda/src/kernels/findInteractingBlocks.cu
platforms/cuda/src/kernels/findInteractingBlocks.cu
+3
-2
No files found.
platforms/cuda/src/kernels/findInteractingBlocks.cu
View file @
f4080faa
...
...
@@ -243,6 +243,7 @@ extern "C" __global__ void findBlocksWithInteractions(real4 periodicBoxSize, rea
for
(
int
block2Base
=
block1
+
1
;
block2Base
<
NUM_BLOCKS
;
block2Base
+=
32
)
{
int
block2
=
block2Base
+
indexInWarp
;
bool
includeBlock2
=
(
block2
<
NUM_BLOCKS
);
bool
forceInclude
=
false
;
if
(
includeBlock2
)
{
real4
blockCenterY
=
sortedBlockCenter
[
block2
];
real4
blockSizeY
=
sortedBlockBoundingBox
[
block2
];
...
...
@@ -260,7 +261,7 @@ extern "C" __global__ void findBlocksWithInteractions(real4 periodicBoxSize, rea
// If there's any possibility we might have missed it, do a detailed check.
if
(
periodicBoxSize
.
z
/
2
-
blockSizeX
.
z
-
blockSizeY
.
z
<
PADDED_CUTOFF
||
periodicBoxSize
.
y
/
2
-
blockSizeX
.
y
-
blockSizeY
.
y
<
PADDED_CUTOFF
)
includeBlock2
=
true
;
includeBlock2
=
forceInclude
=
true
;
#endif
if
(
includeBlock2
)
{
unsigned
short
y
=
(
unsigned
short
)
sortedBlocks
[
block2
].
y
;
...
...
@@ -291,7 +292,7 @@ extern "C" __global__ void findBlocksWithInteractions(real4 periodicBoxSize, rea
#ifdef USE_PERIODIC
APPLY_PERIODIC_TO_DELTA
(
atomDelta
)
#endif
int
atomFlags
=
BALLOT
(
atomDelta
.
x
*
atomDelta
.
x
+
atomDelta
.
y
*
atomDelta
.
y
+
atomDelta
.
z
*
atomDelta
.
z
<
(
PADDED_CUTOFF
+
blockCenterY
.
w
)
*
(
PADDED_CUTOFF
+
blockCenterY
.
w
));
int
atomFlags
=
BALLOT
(
forceInclude
||
atomDelta
.
x
*
atomDelta
.
x
+
atomDelta
.
y
*
atomDelta
.
y
+
atomDelta
.
z
*
atomDelta
.
z
<
(
PADDED_CUTOFF
+
blockCenterY
.
w
)
*
(
PADDED_CUTOFF
+
blockCenterY
.
w
));
int
interacts
=
0
;
if
(
atom2
<
NUM_ATOMS
&&
atomFlags
!=
0
)
{
int
first
=
__ffs
(
atomFlags
)
-
1
;
...
...
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