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
3134fbb9
Commit
3134fbb9
authored
Aug 29, 2014
by
peastman
Browse files
Bug fixes to CustomManyParticleForce
parent
c2d461f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
platforms/cuda/src/kernels/customManyParticle.cu
platforms/cuda/src/kernels/customManyParticle.cu
+14
-12
wrappers/python/src/swig_doxygen/swigInputConfig.py
wrappers/python/src/swig_doxygen/swigInputConfig.py
+1
-0
No files found.
platforms/cuda/src/kernels/customManyParticle.cu
View file @
3134fbb9
...
...
@@ -191,7 +191,7 @@ extern "C" __global__ void findNeighbors(real4 periodicBoxSize, real4 invPeriodi
)
{
__shared__
real3
positionCache
[
FIND_NEIGHBORS_WORKGROUP_SIZE
];
int
indexInWarp
=
threadIdx
.
x
%
32
;
for
(
int
atom1
=
blockIdx
.
x
*
blockDim
.
x
+
threadIdx
.
x
;
atom1
<
NUM_ATOMS
;
atom1
+=
blockDim
.
x
*
gridDim
.
x
)
{
for
(
int
atom1
=
blockIdx
.
x
*
blockDim
.
x
+
threadIdx
.
x
;
atom1
<
PADDED_
NUM_ATOMS
;
atom1
+=
blockDim
.
x
*
gridDim
.
x
)
{
// Load data for this atom. Note that all threads in a warp are processing atoms from the same block.
real3
pos1
=
trim
(
posq
[
atom1
]);
...
...
@@ -240,24 +240,26 @@ extern "C" __global__ void findNeighbors(real4 periodicBoxSize, real4 invPeriodi
int
included
[
TILE_SIZE
];
int
numIncluded
=
0
;
positionCache
[
threadIdx
.
x
]
=
trim
(
posq
[
start
+
indexInWarp
]);
for
(
int
j
=
0
;
j
<
32
;
j
++
)
{
int
atom2
=
start
+
j
;
real3
pos2
=
positionCache
[
threadIdx
.
x
-
indexInWarp
+
j
];
if
(
atom1
<
NUM_ATOMS
)
{
for
(
int
j
=
0
;
j
<
32
;
j
++
)
{
int
atom2
=
start
+
j
;
real3
pos2
=
positionCache
[
threadIdx
.
x
-
indexInWarp
+
j
];
// Decide whether to include this atom pair in the neighbor list.
// Decide whether to include this atom pair in the neighbor list.
real4
atomDelta
=
delta
(
pos1
,
pos2
,
periodicBoxSize
,
invPeriodicBoxSize
);
real4
atomDelta
=
delta
(
pos1
,
pos2
,
periodicBoxSize
,
invPeriodicBoxSize
);
#ifdef USE_CENTRAL_PARTICLE
bool
includeAtom
=
(
atom2
!=
atom1
&&
atom2
<
NUM_ATOMS
&&
atomDelta
.
w
<
CUTOFF_SQUARED
);
bool
includeAtom
=
(
atom2
!=
atom1
&&
atom2
<
NUM_ATOMS
&&
atomDelta
.
w
<
CUTOFF_SQUARED
);
#else
bool
includeAtom
=
(
atom2
>
atom1
&&
atom2
<
NUM_ATOMS
&&
atomDelta
.
w
<
CUTOFF_SQUARED
);
bool
includeAtom
=
(
atom2
>
atom1
&&
atom2
<
NUM_ATOMS
&&
atomDelta
.
w
<
CUTOFF_SQUARED
);
#endif
#ifdef USE_EXCLUSIONS
if
(
includeAtom
)
includeAtom
&=
!
isInteractionExcluded
(
atom1
,
atom2
,
exclusions
,
exclusionStartIndex
);
if
(
includeAtom
)
includeAtom
&=
!
isInteractionExcluded
(
atom1
,
atom2
,
exclusions
,
exclusionStartIndex
);
#endif
if
(
includeAtom
)
included
[
numIncluded
++
]
=
atom2
;
if
(
includeAtom
)
included
[
numIncluded
++
]
=
atom2
;
}
}
// If we found any neighbors, store them to the neighbor list.
...
...
wrappers/python/src/swig_doxygen/swigInputConfig.py
View file @
3134fbb9
...
...
@@ -194,6 +194,7 @@ UNITS = {
(
"*"
,
"getWeightCross"
)
:
(
None
,
()),
(
"*"
,
"getNonbondedMethod"
)
:
(
None
,
()),
(
"*"
,
"getGlobalParameterDefaultValue"
)
:
(
None
,
()),
(
"*"
,
"getPermutationMode"
)
:
(
None
,
()),
(
"LocalCoordinatesSite"
,
"getOriginWeights"
)
:
(
None
,
()),
(
"LocalCoordinatesSite"
,
"getXWeights"
)
:
(
None
,
()),
(
"LocalCoordinatesSite"
,
"getYWeights"
)
:
(
None
,
()),
...
...
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