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
c1bdee13
Commit
c1bdee13
authored
Jun 24, 2011
by
Mark Friedrichs
Browse files
Added missing Born radii switching derivative
parent
643ea90e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
platforms/cuda/src/kernels/kForces.cu
platforms/cuda/src/kernels/kForces.cu
+6
-5
No files found.
platforms/cuda/src/kernels/kForces.cu
View file @
c1bdee13
...
@@ -378,10 +378,11 @@ void kReduceGBVIBornForces_kernel()
...
@@ -378,10 +378,11 @@ void kReduceGBVIBornForces_kernel()
float
energy
=
0.0
f
;
float
energy
=
0.0
f
;
while
(
pos
<
cSim
.
atoms
)
while
(
pos
<
cSim
.
atoms
)
{
{
float
bornRadius
=
cSim
.
pBornRadii
[
pos
];
float
bornRadius
=
cSim
.
pBornRadii
[
pos
];
float4
gbviData
=
cSim
.
pGBVIData
[
pos
];
float4
gbviData
=
cSim
.
pGBVIData
[
pos
];
float
totalForce
=
0.0
f
;
float
switchDeriv
=
cSim
.
pGBVISwitchDerivative
[
pos
];
float
*
pFt
=
cSim
.
pBornForce
+
pos
;
float
totalForce
=
0.0
f
;
float
*
pFt
=
cSim
.
pBornForce
+
pos
;
int
i
=
cSim
.
nonbondOutputBuffers
;
int
i
=
cSim
.
nonbondOutputBuffers
;
while
(
i
>=
4
)
while
(
i
>=
4
)
...
@@ -416,7 +417,7 @@ void kReduceGBVIBornForces_kernel()
...
@@ -416,7 +417,7 @@ void kReduceGBVIBornForces_kernel()
energy
-=
gbviData
.
z
*
ratio3
;
energy
-=
gbviData
.
z
*
ratio3
;
totalForce
+=
(
3.0
f
*
gbviData
.
z
*
ratio3
)
/
bornRadius
;
// 'cavity' term
totalForce
+=
(
3.0
f
*
gbviData
.
z
*
ratio3
)
/
bornRadius
;
// 'cavity' term
float
br2
=
bornRadius
*
bornRadius
;
float
br2
=
bornRadius
*
bornRadius
;
totalForce
*=
(
1.0
f
/
3.0
f
)
*
br2
*
br2
;
totalForce
*=
(
1.0
f
/
3.0
f
)
*
br2
*
br2
*
switchDeriv
;
pFt
=
cSim
.
pBornForce
+
pos
;
pFt
=
cSim
.
pBornForce
+
pos
;
*
pFt
=
totalForce
;
*
pFt
=
totalForce
;
...
...
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