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
470c9b7f
Commit
470c9b7f
authored
Jan 27, 2012
by
Mark Friedrichs
Browse files
Renamed math functions in Cuda kernels to single-precision equivalent [cos() -> cosf()]
parent
fed50628
Changes
46
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
84 deletions
+84
-84
plugins/freeEnergy/platforms/cuda/src/kernels/kCalculateGBVISoftcoreBornSum.h
...latforms/cuda/src/kernels/kCalculateGBVISoftcoreBornSum.h
+12
-12
plugins/freeEnergy/platforms/cuda/src/kernels/kCalculateGBVISoftcoreForces2.h
...latforms/cuda/src/kernels/kCalculateGBVISoftcoreForces2.h
+12
-12
plugins/freeEnergy/platforms/cuda/src/kernels/kCalculateLocalSoftcoreForces.cu
...atforms/cuda/src/kernels/kCalculateLocalSoftcoreForces.cu
+6
-6
plugins/freeEnergy/platforms/cuda/src/kernels/kCalculateNonbondedSoftcore.h
.../platforms/cuda/src/kernels/kCalculateNonbondedSoftcore.h
+20
-20
plugins/freeEnergy/platforms/cuda/src/kernels/kCalculateObcGbsaSoftcoreBornSum.h
...forms/cuda/src/kernels/kCalculateObcGbsaSoftcoreBornSum.h
+17
-17
plugins/freeEnergy/platforms/cuda/src/kernels/kCalculateObcGbsaSoftcoreForces2.h
...forms/cuda/src/kernels/kCalculateObcGbsaSoftcoreForces2.h
+17
-17
No files found.
plugins/freeEnergy/platforms/cuda/src/kernels/kCalculateGBVISoftcoreBornSum.h
View file @
470c9b7f
...
@@ -99,9 +99,9 @@ void METHOD_NAME(kCalculateGBVISoftcore, BornSum_kernel)(unsigned int* workUnit)
...
@@ -99,9 +99,9 @@ void METHOD_NAME(kCalculateGBVISoftcore, BornSum_kernel)(unsigned int* workUnit)
dy
=
psA
[
j
].
y
-
apos
.
y
;
dy
=
psA
[
j
].
y
-
apos
.
y
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
#if defined USE_CUTOFF
#if defined USE_CUTOFF
...
@@ -110,7 +110,7 @@ void METHOD_NAME(kCalculateGBVISoftcore, BornSum_kernel)(unsigned int* workUnit)
...
@@ -110,7 +110,7 @@ void METHOD_NAME(kCalculateGBVISoftcore, BornSum_kernel)(unsigned int* workUnit)
if
(
i
<
cSim
.
atoms
&&
x
+
j
<
cSim
.
atoms
&&
j
!=
tgx
)
if
(
i
<
cSim
.
atoms
&&
x
+
j
<
cSim
.
atoms
&&
j
!=
tgx
)
#endif
#endif
{
{
bSum
+=
psA
[
j
].
bornRadiusScaleFactor
*
getGBVI_Volume
(
sqrt
(
r2
),
ar
.
x
,
psA
[
j
].
sr
);
bSum
+=
psA
[
j
].
bornRadiusScaleFactor
*
getGBVI_Volume
(
sqrt
f
(
r2
),
ar
.
x
,
psA
[
j
].
sr
);
}
}
}
}
...
@@ -166,9 +166,9 @@ void METHOD_NAME(kCalculateGBVISoftcore, BornSum_kernel)(unsigned int* workUnit)
...
@@ -166,9 +166,9 @@ void METHOD_NAME(kCalculateGBVISoftcore, BornSum_kernel)(unsigned int* workUnit)
dy
=
psA
[
tj
].
y
-
apos
.
y
;
dy
=
psA
[
tj
].
y
-
apos
.
y
;
dz
=
psA
[
tj
].
z
-
apos
.
z
;
dz
=
psA
[
tj
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
#ifdef USE_CUTOFF
#ifdef USE_CUTOFF
...
@@ -177,7 +177,7 @@ void METHOD_NAME(kCalculateGBVISoftcore, BornSum_kernel)(unsigned int* workUnit)
...
@@ -177,7 +177,7 @@ void METHOD_NAME(kCalculateGBVISoftcore, BornSum_kernel)(unsigned int* workUnit)
if
(
i
<
cSim
.
atoms
&&
y
+
tj
<
cSim
.
atoms
)
if
(
i
<
cSim
.
atoms
&&
y
+
tj
<
cSim
.
atoms
)
#endif
#endif
{
{
r
=
sqrt
(
r2
);
r
=
sqrt
f
(
r2
);
// psA[tj].sr = Sj
// psA[tj].sr = Sj
// ar.x = Ri
// ar.x = Ri
...
@@ -204,9 +204,9 @@ void METHOD_NAME(kCalculateGBVISoftcore, BornSum_kernel)(unsigned int* workUnit)
...
@@ -204,9 +204,9 @@ void METHOD_NAME(kCalculateGBVISoftcore, BornSum_kernel)(unsigned int* workUnit)
dy
=
psA
[
j
].
y
-
apos
.
y
;
dy
=
psA
[
j
].
y
-
apos
.
y
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
#ifdef USE_CUTOFF
#ifdef USE_CUTOFF
...
@@ -215,7 +215,7 @@ void METHOD_NAME(kCalculateGBVISoftcore, BornSum_kernel)(unsigned int* workUnit)
...
@@ -215,7 +215,7 @@ void METHOD_NAME(kCalculateGBVISoftcore, BornSum_kernel)(unsigned int* workUnit)
if
(
i
<
cSim
.
atoms
&&
y
+
j
<
cSim
.
atoms
)
if
(
i
<
cSim
.
atoms
&&
y
+
j
<
cSim
.
atoms
)
#endif
#endif
{
{
r
=
sqrt
(
r2
);
r
=
sqrt
f
(
r2
);
tempBuffer
[
threadIdx
.
x
]
=
ar
.
w
*
getGBVI_Volume
(
r
,
psA
[
j
].
r
,
ar
.
y
);
tempBuffer
[
threadIdx
.
x
]
=
ar
.
w
*
getGBVI_Volume
(
r
,
psA
[
j
].
r
,
ar
.
y
);
apos
.
w
+=
psA
[
j
].
bornRadiusScaleFactor
*
getGBVI_Volume
(
r
,
ar
.
x
,
psA
[
j
].
sr
);
apos
.
w
+=
psA
[
j
].
bornRadiusScaleFactor
*
getGBVI_Volume
(
r
,
ar
.
x
,
psA
[
j
].
sr
);
}
}
...
...
plugins/freeEnergy/platforms/cuda/src/kernels/kCalculateGBVISoftcoreForces2.h
View file @
470c9b7f
...
@@ -104,12 +104,12 @@ void METHOD_NAME(kCalculateGBVISoftcore, Forces2_kernel)(unsigned int* workUnit
...
@@ -104,12 +104,12 @@ void METHOD_NAME(kCalculateGBVISoftcore, Forces2_kernel)(unsigned int* workUnit
float
dz
=
psA
[
j
].
z
-
apos
.
z
;
float
dz
=
psA
[
j
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
float
r
=
sqrt
(
r2
);
float
r
=
sqrt
f
(
r2
);
// Atom I Born forces and sum
// Atom I Born forces and sum
float
dE
=
psA
[
j
].
bornRadiusScaleFactor
*
getGBVI_dE2
(
r
,
ar
.
x
,
psA
[
j
].
sr
,
fb
);
float
dE
=
psA
[
j
].
bornRadiusScaleFactor
*
getGBVI_dE2
(
r
,
ar
.
x
,
psA
[
j
].
sr
,
fb
);
...
@@ -190,12 +190,12 @@ void METHOD_NAME(kCalculateGBVISoftcore, Forces2_kernel)(unsigned int* workUnit
...
@@ -190,12 +190,12 @@ void METHOD_NAME(kCalculateGBVISoftcore, Forces2_kernel)(unsigned int* workUnit
float
dy
=
psA
[
tj
].
y
-
apos
.
y
;
float
dy
=
psA
[
tj
].
y
-
apos
.
y
;
float
dz
=
psA
[
tj
].
z
-
apos
.
z
;
float
dz
=
psA
[
tj
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
float
r
=
sqrt
(
r2
);
float
r
=
sqrt
f
(
r2
);
float
dE
=
psA
[
tj
].
bornRadiusScaleFactor
*
getGBVI_dE2
(
r
,
ar
.
x
,
psA
[
tj
].
sr
,
fb
);
float
dE
=
psA
[
tj
].
bornRadiusScaleFactor
*
getGBVI_dE2
(
r
,
ar
.
x
,
psA
[
tj
].
sr
,
fb
);
...
@@ -256,12 +256,12 @@ void METHOD_NAME(kCalculateGBVISoftcore, Forces2_kernel)(unsigned int* workUnit
...
@@ -256,12 +256,12 @@ void METHOD_NAME(kCalculateGBVISoftcore, Forces2_kernel)(unsigned int* workUnit
float
dy
=
psA
[
j
].
y
-
apos
.
y
;
float
dy
=
psA
[
j
].
y
-
apos
.
y
;
float
dz
=
psA
[
j
].
z
-
apos
.
z
;
float
dz
=
psA
[
j
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
float
r
=
sqrt
(
r2
);
float
r
=
sqrt
f
(
r2
);
// Interleaved Atom I and J Born Forces and sum components
// Interleaved Atom I and J Born Forces and sum components
float
dE
=
psA
[
j
].
bornRadiusScaleFactor
*
getGBVI_dE2
(
r
,
ar
.
x
,
psA
[
j
].
sr
,
fb
);
float
dE
=
psA
[
j
].
bornRadiusScaleFactor
*
getGBVI_dE2
(
r
,
ar
.
x
,
psA
[
j
].
sr
,
fb
);
...
...
plugins/freeEnergy/platforms/cuda/src/kernels/kCalculateLocalSoftcoreForces.cu
View file @
470c9b7f
...
@@ -142,7 +142,7 @@ __global__ void kCalculateLocalSoftcoreForces_kernel()
...
@@ -142,7 +142,7 @@ __global__ void kCalculateLocalSoftcoreForces_kernel()
d
.
z
=
a1
.
z
-
a2
.
z
;
d
.
z
=
a1
.
z
-
a2
.
z
;
float
r2
=
DOT3
(
d
,
d
);
float
r2
=
DOT3
(
d
,
d
);
float
inverseR
=
1.0
f
/
sqrt
(
r2
);
float
inverseR
=
1.0
f
/
sqrt
f
(
r2
);
#ifdef USE_SOFTCORE_LJ
#ifdef USE_SOFTCORE_LJ
float
CDLJ_energy
=
0.0
f
;
float
CDLJ_energy
=
0.0
f
;
float
dEdR
=
getSoftCoreLJ
(
r2
,
LJ14
.
y
,
LJ14
.
x
,
LJ14
.
w
,
LJ14
.
w
,
&
CDLJ_energy
);
float
dEdR
=
getSoftCoreLJ
(
r2
,
LJ14
.
y
,
LJ14
.
x
,
LJ14
.
w
,
LJ14
.
w
,
&
CDLJ_energy
);
...
@@ -187,7 +187,7 @@ __global__ void kCalculateLocalSoftcoreForces_kernel()
...
@@ -187,7 +187,7 @@ __global__ void kCalculateLocalSoftcoreForces_kernel()
d
.
y
=
a1
.
y
-
a2
.
y
;
d
.
y
=
a1
.
y
-
a2
.
y
;
d
.
z
=
a1
.
z
-
a2
.
z
;
d
.
z
=
a1
.
z
-
a2
.
z
;
float
r2
=
DOT3
(
d
,
d
);
float
r2
=
DOT3
(
d
,
d
);
float
inverseR
=
1.0
f
/
sqrt
(
r2
);
float
inverseR
=
1.0
f
/
sqrt
f
(
r2
);
#ifdef USE_SOFTCORE_LJ
#ifdef USE_SOFTCORE_LJ
float
dEdR
=
getSoftCoreLJ
(
r2
,
LJ14
.
y
,
LJ14
.
x
,
LJ14
.
w
,
LJ14
.
w
,
&
LJ14_energy
);
float
dEdR
=
getSoftCoreLJ
(
r2
,
LJ14
.
y
,
LJ14
.
x
,
LJ14
.
w
,
LJ14
.
w
,
&
LJ14_energy
);
#else
#else
...
@@ -235,11 +235,11 @@ __global__ void kCalculateLocalSoftcoreForces_kernel()
...
@@ -235,11 +235,11 @@ __global__ void kCalculateLocalSoftcoreForces_kernel()
d
.
x
=
a1
.
x
-
a2
.
x
;
d
.
x
=
a1
.
x
-
a2
.
x
;
d
.
y
=
a1
.
y
-
a2
.
y
;
d
.
y
=
a1
.
y
-
a2
.
y
;
d
.
z
=
a1
.
z
-
a2
.
z
;
d
.
z
=
a1
.
z
-
a2
.
z
;
d
.
x
-=
floor
(
d
.
x
/
cSim
.
periodicBoxSizeX
+
0.5
f
)
*
cSim
.
periodicBoxSizeX
;
d
.
x
-=
floor
f
(
d
.
x
/
cSim
.
periodicBoxSizeX
+
0.5
f
)
*
cSim
.
periodicBoxSizeX
;
d
.
y
-=
floor
(
d
.
y
/
cSim
.
periodicBoxSizeY
+
0.5
f
)
*
cSim
.
periodicBoxSizeY
;
d
.
y
-=
floor
f
(
d
.
y
/
cSim
.
periodicBoxSizeY
+
0.5
f
)
*
cSim
.
periodicBoxSizeY
;
d
.
z
-=
floor
(
d
.
z
/
cSim
.
periodicBoxSizeZ
+
0.5
f
)
*
cSim
.
periodicBoxSizeZ
;
d
.
z
-=
floor
f
(
d
.
z
/
cSim
.
periodicBoxSizeZ
+
0.5
f
)
*
cSim
.
periodicBoxSizeZ
;
float
r2
=
DOT3
(
d
,
d
);
float
r2
=
DOT3
(
d
,
d
);
float
inverseR
=
1.0
f
/
sqrt
(
r2
);
float
inverseR
=
1.0
f
/
sqrt
f
(
r2
);
#ifdef USE_SOFTCORE_LJ
#ifdef USE_SOFTCORE_LJ
float
dEdR
=
getSoftCoreLJ
(
r2
,
LJ14
.
y
,
LJ14
.
x
,
LJ14
.
w
,
LJ14
.
w
,
&
LJ14_energy
);
float
dEdR
=
getSoftCoreLJ
(
r2
,
LJ14
.
y
,
LJ14
.
x
,
LJ14
.
w
,
LJ14
.
w
,
&
LJ14_energy
);
#else
#else
...
...
plugins/freeEnergy/platforms/cuda/src/kernels/kCalculateNonbondedSoftcore.h
View file @
470c9b7f
...
@@ -104,12 +104,12 @@ void METHOD_NAME(kCalculateCDLJSoftcore, Forces_kernel)(unsigned int* workUnit )
...
@@ -104,12 +104,12 @@ void METHOD_NAME(kCalculateCDLJSoftcore, Forces_kernel)(unsigned int* workUnit )
dy
=
psA
[
j
].
y
-
apos
.
y
;
dy
=
psA
[
j
].
y
-
apos
.
y
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
invR
=
1
.
0
f
/
sqrt
(
r2
);
invR
=
1
.
0
f
/
sqrt
f
(
r2
);
sig
=
a
.
x
+
psA
[
j
].
sig
;
sig
=
a
.
x
+
psA
[
j
].
sig
;
eps
=
a
.
y
*
psA
[
j
].
eps
;
eps
=
a
.
y
*
psA
[
j
].
eps
;
#ifdef USE_SOFTCORE_LJ
#ifdef USE_SOFTCORE_LJ
...
@@ -158,12 +158,12 @@ void METHOD_NAME(kCalculateCDLJSoftcore, Forces_kernel)(unsigned int* workUnit )
...
@@ -158,12 +158,12 @@ void METHOD_NAME(kCalculateCDLJSoftcore, Forces_kernel)(unsigned int* workUnit )
dy
=
psA
[
j
].
y
-
apos
.
y
;
dy
=
psA
[
j
].
y
-
apos
.
y
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
invR
=
1
.
0
f
/
sqrt
(
r2
);
invR
=
1
.
0
f
/
sqrt
f
(
r2
);
sig
=
a
.
x
+
psA
[
j
].
sig
;
sig
=
a
.
x
+
psA
[
j
].
sig
;
eps
=
a
.
y
*
psA
[
j
].
eps
;
eps
=
a
.
y
*
psA
[
j
].
eps
;
#ifdef USE_SOFTCORE_LJ
#ifdef USE_SOFTCORE_LJ
...
@@ -266,12 +266,12 @@ void METHOD_NAME(kCalculateCDLJSoftcore, Forces_kernel)(unsigned int* workUnit )
...
@@ -266,12 +266,12 @@ void METHOD_NAME(kCalculateCDLJSoftcore, Forces_kernel)(unsigned int* workUnit )
dy
=
psA
[
tj
].
y
-
apos
.
y
;
dy
=
psA
[
tj
].
y
-
apos
.
y
;
dz
=
psA
[
tj
].
z
-
apos
.
z
;
dz
=
psA
[
tj
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
invR
=
1
.
0
f
/
sqrt
(
r2
);
invR
=
1
.
0
f
/
sqrt
f
(
r2
);
sig
=
a
.
x
+
psA
[
tj
].
sig
;
sig
=
a
.
x
+
psA
[
tj
].
sig
;
eps
=
a
.
y
*
psA
[
tj
].
eps
;
eps
=
a
.
y
*
psA
[
tj
].
eps
;
#ifdef USE_SOFTCORE_LJ
#ifdef USE_SOFTCORE_LJ
...
@@ -325,12 +325,12 @@ void METHOD_NAME(kCalculateCDLJSoftcore, Forces_kernel)(unsigned int* workUnit )
...
@@ -325,12 +325,12 @@ void METHOD_NAME(kCalculateCDLJSoftcore, Forces_kernel)(unsigned int* workUnit )
dy
=
psA
[
j
].
y
-
apos
.
y
;
dy
=
psA
[
j
].
y
-
apos
.
y
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
invR
=
1
.
0
f
/
sqrt
(
r2
);
invR
=
1
.
0
f
/
sqrt
f
(
r2
);
sig
=
a
.
x
+
psA
[
j
].
sig
;
sig
=
a
.
x
+
psA
[
j
].
sig
;
eps
=
a
.
y
*
psA
[
j
].
eps
;
eps
=
a
.
y
*
psA
[
j
].
eps
;
#ifdef USE_SOFTCORE_LJ
#ifdef USE_SOFTCORE_LJ
...
@@ -419,12 +419,12 @@ void METHOD_NAME(kCalculateCDLJSoftcore, Forces_kernel)(unsigned int* workUnit )
...
@@ -419,12 +419,12 @@ void METHOD_NAME(kCalculateCDLJSoftcore, Forces_kernel)(unsigned int* workUnit )
dy
=
psA
[
tj
].
y
-
apos
.
y
;
dy
=
psA
[
tj
].
y
-
apos
.
y
;
dz
=
psA
[
tj
].
z
-
apos
.
z
;
dz
=
psA
[
tj
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
invR
=
1
.
0
f
/
sqrt
(
r2
);
invR
=
1
.
0
f
/
sqrt
f
(
r2
);
sig
=
a
.
x
+
psA
[
tj
].
sig
;
sig
=
a
.
x
+
psA
[
tj
].
sig
;
eps
=
a
.
y
*
psA
[
tj
].
eps
;
eps
=
a
.
y
*
psA
[
tj
].
eps
;
#ifdef USE_SOFTCORE_LJ
#ifdef USE_SOFTCORE_LJ
...
...
plugins/freeEnergy/platforms/cuda/src/kernels/kCalculateObcGbsaSoftcoreBornSum.h
View file @
470c9b7f
...
@@ -99,9 +99,9 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
...
@@ -99,9 +99,9 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
dy
=
psA
[
j
].
y
-
apos
.
y
;
dy
=
psA
[
j
].
y
-
apos
.
y
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
...
@@ -112,7 +112,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
...
@@ -112,7 +112,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
if
(
i
<
cSim
.
atoms
&&
x
+
j
<
cSim
.
atoms
)
if
(
i
<
cSim
.
atoms
&&
x
+
j
<
cSim
.
atoms
)
#endif
#endif
{
{
r
=
sqrt
(
r2
);
r
=
sqrt
f
(
r2
);
float
rInverse
=
1
.
0
f
/
r
;
float
rInverse
=
1
.
0
f
/
r
;
float
rScaledRadiusJ
=
r
+
psA
[
j
].
sr
;
float
rScaledRadiusJ
=
r
+
psA
[
j
].
sr
;
if
(
(
j
!=
tgx
)
&&
(
ar
.
x
<
rScaledRadiusJ
)
){
if
(
(
j
!=
tgx
)
&&
(
ar
.
x
<
rScaledRadiusJ
)
){
...
@@ -120,7 +120,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
...
@@ -120,7 +120,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
float
u_ij
=
1
.
0
f
/
rScaledRadiusJ
;
float
u_ij
=
1
.
0
f
/
rScaledRadiusJ
;
float
l_ij2
=
l_ij
*
l_ij
;
float
l_ij2
=
l_ij
*
l_ij
;
float
u_ij2
=
u_ij
*
u_ij
;
float
u_ij2
=
u_ij
*
u_ij
;
float
ratio
=
log
(
u_ij
/
l_ij
);
float
ratio
=
log
f
(
u_ij
/
l_ij
);
float
term
=
l_ij
-
u_ij
+
float
term
=
l_ij
-
u_ij
+
0
.
25
f
*
r
*
(
u_ij2
-
l_ij2
)
+
0
.
25
f
*
r
*
(
u_ij2
-
l_ij2
)
+
(
0
.
50
f
*
rInverse
*
ratio
)
+
(
0
.
50
f
*
rInverse
*
ratio
)
+
...
@@ -190,9 +190,9 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
...
@@ -190,9 +190,9 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
dy
=
psA
[
tj
].
y
-
apos
.
y
;
dy
=
psA
[
tj
].
y
-
apos
.
y
;
dz
=
psA
[
tj
].
z
-
apos
.
z
;
dz
=
psA
[
tj
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
#ifdef USE_CUTOFF
#ifdef USE_CUTOFF
...
@@ -201,7 +201,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
...
@@ -201,7 +201,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
if
(
i
<
cSim
.
atoms
&&
y
+
tj
<
cSim
.
atoms
)
if
(
i
<
cSim
.
atoms
&&
y
+
tj
<
cSim
.
atoms
)
#endif
#endif
{
{
r
=
sqrt
(
r2
);
r
=
sqrt
f
(
r2
);
float
rInverse
=
1
.
0
f
/
r
;
float
rInverse
=
1
.
0
f
/
r
;
float
rScaledRadiusJ
=
r
+
psA
[
tj
].
sr
;
float
rScaledRadiusJ
=
r
+
psA
[
tj
].
sr
;
if
(
ar
.
x
<
rScaledRadiusJ
)
if
(
ar
.
x
<
rScaledRadiusJ
)
...
@@ -210,7 +210,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
...
@@ -210,7 +210,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
float
u_ij
=
1
.
0
f
/
rScaledRadiusJ
;
float
u_ij
=
1
.
0
f
/
rScaledRadiusJ
;
float
l_ij2
=
l_ij
*
l_ij
;
float
l_ij2
=
l_ij
*
l_ij
;
float
u_ij2
=
u_ij
*
u_ij
;
float
u_ij2
=
u_ij
*
u_ij
;
float
ratio
=
log
(
u_ij
/
l_ij
);
float
ratio
=
log
f
(
u_ij
/
l_ij
);
float
term
=
l_ij
-
u_ij
+
float
term
=
l_ij
-
u_ij
+
0
.
25
f
*
r
*
(
u_ij2
-
l_ij2
)
+
0
.
25
f
*
r
*
(
u_ij2
-
l_ij2
)
+
(
0
.
50
f
*
rInverse
*
ratio
)
+
(
0
.
50
f
*
rInverse
*
ratio
)
+
...
@@ -232,7 +232,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
...
@@ -232,7 +232,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
float
u_ij
=
1
.
0
f
/
rScaledRadiusI
;
float
u_ij
=
1
.
0
f
/
rScaledRadiusI
;
float
l_ij2
=
l_ij
*
l_ij
;
float
l_ij2
=
l_ij
*
l_ij
;
float
u_ij2
=
u_ij
*
u_ij
;
float
u_ij2
=
u_ij
*
u_ij
;
float
ratio
=
log
(
u_ij
/
l_ij
);
float
ratio
=
log
f
(
u_ij
/
l_ij
);
float
term
=
l_ij
-
u_ij
+
float
term
=
l_ij
-
u_ij
+
0
.
25
f
*
r
*
(
u_ij2
-
l_ij2
)
+
0
.
25
f
*
r
*
(
u_ij2
-
l_ij2
)
+
(
0
.
50
f
*
rInverse
*
ratio
)
+
(
0
.
50
f
*
rInverse
*
ratio
)
+
...
@@ -265,9 +265,9 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
...
@@ -265,9 +265,9 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
dy
=
psA
[
j
].
y
-
apos
.
y
;
dy
=
psA
[
j
].
y
-
apos
.
y
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
dz
=
psA
[
j
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
#ifdef USE_CUTOFF
#ifdef USE_CUTOFF
...
@@ -276,7 +276,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
...
@@ -276,7 +276,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
if
(
i
<
cSim
.
atoms
&&
y
+
j
<
cSim
.
atoms
)
if
(
i
<
cSim
.
atoms
&&
y
+
j
<
cSim
.
atoms
)
#endif
#endif
{
{
r
=
sqrt
(
r2
);
r
=
sqrt
f
(
r2
);
float
rInverse
=
1
.
0
f
/
r
;
float
rInverse
=
1
.
0
f
/
r
;
float
rScaledRadiusJ
=
r
+
psA
[
j
].
sr
;
float
rScaledRadiusJ
=
r
+
psA
[
j
].
sr
;
if
(
ar
.
x
<
rScaledRadiusJ
)
if
(
ar
.
x
<
rScaledRadiusJ
)
...
@@ -285,7 +285,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
...
@@ -285,7 +285,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
float
u_ij
=
1
.
0
f
/
rScaledRadiusJ
;
float
u_ij
=
1
.
0
f
/
rScaledRadiusJ
;
float
l_ij2
=
l_ij
*
l_ij
;
float
l_ij2
=
l_ij
*
l_ij
;
float
u_ij2
=
u_ij
*
u_ij
;
float
u_ij2
=
u_ij
*
u_ij
;
float
ratio
=
log
(
u_ij
/
l_ij
);
float
ratio
=
log
f
(
u_ij
/
l_ij
);
float
term
=
l_ij
-
float
term
=
l_ij
-
u_ij
+
u_ij
+
0
.
25
f
*
r
*
(
u_ij2
-
l_ij2
)
+
0
.
25
f
*
r
*
(
u_ij2
-
l_ij2
)
+
...
@@ -306,7 +306,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
...
@@ -306,7 +306,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, BornSum_kernel)(unsigned int* workUn
float
u_ij
=
1
.
0
f
/
rScaledRadiusI
;
float
u_ij
=
1
.
0
f
/
rScaledRadiusI
;
float
l_ij2
=
l_ij
*
l_ij
;
float
l_ij2
=
l_ij
*
l_ij
;
float
u_ij2
=
u_ij
*
u_ij
;
float
u_ij2
=
u_ij
*
u_ij
;
float
ratio
=
log
(
u_ij
/
l_ij
);
float
ratio
=
log
f
(
u_ij
/
l_ij
);
float
term
=
l_ij
-
float
term
=
l_ij
-
u_ij
+
u_ij
+
0
.
25
f
*
r
*
(
u_ij2
-
l_ij2
)
+
0
.
25
f
*
r
*
(
u_ij2
-
l_ij2
)
+
...
...
plugins/freeEnergy/platforms/cuda/src/kernels/kCalculateObcGbsaSoftcoreForces2.h
View file @
470c9b7f
...
@@ -95,12 +95,12 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, Forces2_kernel)(unsigned int* workUn
...
@@ -95,12 +95,12 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, Forces2_kernel)(unsigned int* workUn
float
dy
=
psA
[
j
].
y
-
apos
.
y
;
float
dy
=
psA
[
j
].
y
-
apos
.
y
;
float
dz
=
psA
[
j
].
z
-
apos
.
z
;
float
dz
=
psA
[
j
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
float
r
=
sqrt
(
r2
);
float
r
=
sqrt
f
(
r2
);
// Atom I Born forces and sum
// Atom I Born forces and sum
...
@@ -112,7 +112,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, Forces2_kernel)(unsigned int* workUn
...
@@ -112,7 +112,7 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, Forces2_kernel)(unsigned int* workUn
float
l_ij2
=
l_ij
*
l_ij
;
float
l_ij2
=
l_ij
*
l_ij
;
float
u_ij2
=
u_ij
*
u_ij
;
float
u_ij2
=
u_ij
*
u_ij
;
float
r2Inverse
=
rInverse
*
rInverse
;
float
r2Inverse
=
rInverse
*
rInverse
;
float
t1
=
log
(
u_ij
/
l_ij
);
float
t1
=
log
f
(
u_ij
/
l_ij
);
float
t2
=
(
l_ij2
-
u_ij2
);
float
t2
=
(
l_ij2
-
u_ij2
);
float
t3
=
t2
*
rInverse
;
float
t3
=
t2
*
rInverse
;
t1
*=
rInverse
;
t1
*=
rInverse
;
...
@@ -194,12 +194,12 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, Forces2_kernel)(unsigned int* workUn
...
@@ -194,12 +194,12 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, Forces2_kernel)(unsigned int* workUn
float
dy
=
psA
[
tj
].
y
-
apos
.
y
;
float
dy
=
psA
[
tj
].
y
-
apos
.
y
;
float
dz
=
psA
[
tj
].
z
-
apos
.
z
;
float
dz
=
psA
[
tj
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
float
r
=
sqrt
(
r2
);
float
r
=
sqrt
f
(
r2
);
// Interleaved Atom I and J Born Forces and sum components
// Interleaved Atom I and J Born Forces and sum components
float
r2Inverse
=
1
.
0
f
/
r2
;
float
r2Inverse
=
1
.
0
f
/
r2
;
...
@@ -214,8 +214,8 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, Forces2_kernel)(unsigned int* workUn
...
@@ -214,8 +214,8 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, Forces2_kernel)(unsigned int* workUn
float
l_ij2I
=
l_ijI
*
l_ijI
;
float
l_ij2I
=
l_ijI
*
l_ijI
;
float
u_ij2J
=
u_ijJ
*
u_ijJ
;
float
u_ij2J
=
u_ijJ
*
u_ijJ
;
float
u_ij2I
=
u_ijI
*
u_ijI
;
float
u_ij2I
=
u_ijI
*
u_ijI
;
float
t1J
=
log
(
u_ijJ
/
l_ijJ
);
float
t1J
=
log
f
(
u_ijJ
/
l_ijJ
);
float
t1I
=
log
(
u_ijI
/
l_ijI
);
float
t1I
=
log
f
(
u_ijI
/
l_ijI
);
float
t2J
=
(
l_ij2J
-
u_ij2J
);
float
t2J
=
(
l_ij2J
-
u_ij2J
);
float
t2I
=
(
l_ij2I
-
u_ij2I
);
float
t2I
=
(
l_ij2I
-
u_ij2I
);
float
t3J
=
t2J
*
rInverse
;
float
t3J
=
t2J
*
rInverse
;
...
@@ -290,12 +290,12 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, Forces2_kernel)(unsigned int* workUn
...
@@ -290,12 +290,12 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, Forces2_kernel)(unsigned int* workUn
float
dy
=
psA
[
j
].
y
-
apos
.
y
;
float
dy
=
psA
[
j
].
y
-
apos
.
y
;
float
dz
=
psA
[
j
].
z
-
apos
.
z
;
float
dz
=
psA
[
j
].
z
-
apos
.
z
;
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
dx
-=
floor
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dx
-=
floor
f
(
dx
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
dy
-=
floor
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dy
-=
floor
f
(
dy
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
dz
-=
floor
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
dz
-=
floor
f
(
dz
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
float
r2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
float
r
=
sqrt
(
r2
);
float
r
=
sqrt
f
(
r2
);
// Interleaved Atom I and J Born Forces and sum components
// Interleaved Atom I and J Born Forces and sum components
float
r2Inverse
=
1
.
0
f
/
r2
;
float
r2Inverse
=
1
.
0
f
/
r2
;
...
@@ -310,8 +310,8 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, Forces2_kernel)(unsigned int* workUn
...
@@ -310,8 +310,8 @@ void METHOD_NAME(kCalculateObcGbsaSoftcore, Forces2_kernel)(unsigned int* workUn
float
l_ij2I
=
l_ijI
*
l_ijI
;
float
l_ij2I
=
l_ijI
*
l_ijI
;
float
u_ij2J
=
u_ijJ
*
u_ijJ
;
float
u_ij2J
=
u_ijJ
*
u_ijJ
;
float
u_ij2I
=
u_ijI
*
u_ijI
;
float
u_ij2I
=
u_ijI
*
u_ijI
;
float
t1J
=
log
(
u_ijJ
/
l_ijJ
);
float
t1J
=
log
f
(
u_ijJ
/
l_ijJ
);
float
t1I
=
log
(
u_ijI
/
l_ijI
);
float
t1I
=
log
f
(
u_ijI
/
l_ijI
);
float
t2J
=
(
l_ij2J
-
u_ij2J
);
float
t2J
=
(
l_ij2J
-
u_ij2J
);
float
t2I
=
(
l_ij2I
-
u_ij2I
);
float
t2I
=
(
l_ij2I
-
u_ij2I
);
float
t3J
=
t2J
*
rInverse
;
float
t3J
=
t2J
*
rInverse
;
...
...
Prev
1
2
3
Next
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