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
a9278f11
Unverified
Commit
a9278f11
authored
Aug 16, 2018
by
peastman
Committed by
GitHub
Aug 16, 2018
Browse files
Merge pull request #2152 from peastman/overflow
Fixed overflow when polarizability is 0
parents
3bf82cd8
33a2cc3a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
plugins/amoeba/platforms/cuda/src/kernels/pmeMultipoleElectrostatics.cu
.../platforms/cuda/src/kernels/pmeMultipoleElectrostatics.cu
+3
-3
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
...ence/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
+6
-6
No files found.
plugins/amoeba/platforms/cuda/src/kernels/pmeMultipoleElectrostatics.cu
View file @
a9278f11
...
...
@@ -141,9 +141,9 @@ __device__ void computeOneInteraction(AtomData& atom1, AtomData& atom2, bool has
real
dmp
=
atom1
.
damp
*
atom2
.
damp
;
real
a
=
min
(
atom1
.
thole
,
atom2
.
thole
);
real
u
=
fabs
(
dmp
)
>
1.0e-5
f
?
r
/
dmp
:
1e10
f
;
real
au3
=
a
*
u
*
u
*
u
;
real
expau3
=
au3
<
50
?
EXP
(
-
au3
)
:
0
;
real
u
=
r
/
dmp
;
real
au3
=
fabs
(
dmp
)
>
1.0e-5
f
?
a
*
u
*
u
*
u
:
0
;
real
expau3
=
fabs
(
dmp
)
>
1.0e-5
f
?
EXP
(
-
au3
)
:
0
;
real
a2u6
=
au3
*
au3
;
real
a3u9
=
a2u6
*
au3
;
// Thole damping factors for energies
...
...
plugins/amoeba/platforms/reference/src/SimTKReference/AmoebaReferenceMultipoleForce.cpp
View file @
a9278f11
...
...
@@ -1277,9 +1277,9 @@ double AmoebaReferenceMultipoleForce::calculateElectrostaticPairIxn(const Multip
double dmp = particleI.dampingFactor*particleK.dampingFactor;
double a = particleI.thole < particleK.thole ? particleI.thole : particleK.thole;
double u =
std::abs(dmp) > 1.0E-5 ? r/dmp : 1E10
;
double au3 = a*u*u*u;
double expau3 =
au3 < 50.0
? exp(-au3) : 0.0;
double u =
r/dmp
;
double au3 =
fabs(dmp) > 1.0e-5f ?
a*u*u*u
: 0.0
;
double expau3 =
fabs(dmp) > 1.0e-5f
? exp(-au3) : 0.0;
double a2u6 = au3*au3;
double a3u9 = a2u6*au3;
// Thole damping factors for energies
...
...
@@ -6553,9 +6553,9 @@ double AmoebaReferencePmeMultipoleForce::calculatePmeDirectElectrostaticPairIxn(
double dmp = particleI.dampingFactor*particleJ.dampingFactor;
double a = particleI.thole < particleJ.thole ? particleI.thole : particleJ.thole;
double u =
std::abs(dmp) > 1.0E-5 ? r/dmp : 1E10
;
double au3 = a*u*u*u;
double expau3 =
au3 < 50.0
? exp(-au3) : 0.0;
double u =
r/dmp
;
double au3 =
fabs(dmp) > 1.0e-5f ?
a*u*u*u
: 0.0
;
double expau3 =
fabs(dmp) > 1.0e-5f
? exp(-au3) : 0.0;
double a2u6 = au3*au3;
double a3u9 = a2u6*au3;
// Thole damping factors for energies
...
...
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