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
f854d108
Commit
f854d108
authored
May 03, 2016
by
peastman
Browse files
Bug fix and optimization to CPU GayBerneForce
parent
3741c957
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
platforms/cpu/src/CpuGayBerneForce.cpp
platforms/cpu/src/CpuGayBerneForce.cpp
+3
-1
platforms/cpu/src/CpuKernels.cpp
platforms/cpu/src/CpuKernels.cpp
+1
-0
No files found.
platforms/cpu/src/CpuGayBerneForce.cpp
View file @
f854d108
...
...
@@ -412,11 +412,13 @@ RealOpenMM CpuGayBerneForce::computeOneInteraction(int particle1, int particle2,
for
(
int
j
=
0
;
j
<
2
;
j
++
)
{
int
particle
=
(
j
==
0
?
particle1
:
particle2
);
ParticleInfo
&
p
=
particles
[
particle
];
if
(
p
.
isPointParticle
)
continue
;
RealVec
dudq
=
(
kappa
*
G
[
particle
]).
cross
(
kappa
*
(
temp
*
dUSLJdr
));
RealVec
dchidq
=
(
iota
*
B
[
particle
]).
cross
(
iota
)
*
(
-
4
*
rInv2
);
RealOpenMM
(
&
g12
)[
3
][
3
]
=
G12
.
v
;
RealOpenMM
(
&
a
)[
3
][
3
]
=
A
[
particle
].
v
;
ParticleInfo
&
p
=
particles
[
particle
];
RealVec
scale
=
RealVec
(
p
.
rx
*
p
.
rx
,
p
.
ry
*
p
.
ry
,
p
.
rz
*
p
.
rz
)
*
(
-
0.5
*
eta
/
detG12
);
Matrix
D
;
RealOpenMM
(
&
d
)[
3
][
3
]
=
D
.
v
;
...
...
platforms/cpu/src/CpuKernels.cpp
View file @
f854d108
...
...
@@ -1212,6 +1212,7 @@ CpuCalcGayBerneForceKernel::~CpuCalcGayBerneForceKernel() {
void
CpuCalcGayBerneForceKernel
::
initialize
(
const
System
&
system
,
const
GayBerneForce
&
force
)
{
ixn
=
new
CpuGayBerneForce
(
force
);
data
.
isPeriodic
=
(
force
.
getNonbondedMethod
()
==
GayBerneForce
::
CutoffPeriodic
);
}
double
CpuCalcGayBerneForceKernel
::
execute
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
{
...
...
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