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
0ea02ab9
Commit
0ea02ab9
authored
Mar 29, 2013
by
Peter Eastman
Browse files
Fixed failing test cases
parent
aefe9a9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
platforms/cuda/tests/TestCudaGBSAOBCForce.cpp
platforms/cuda/tests/TestCudaGBSAOBCForce.cpp
+2
-2
platforms/opencl/tests/TestOpenCLGBSAOBCForce.cpp
platforms/opencl/tests/TestOpenCLGBSAOBCForce.cpp
+2
-2
No files found.
platforms/cuda/tests/TestCudaGBSAOBCForce.cpp
View file @
0ea02ab9
...
@@ -207,7 +207,7 @@ void testForce(int numParticles, NonbondedForce::NonbondedMethod method, GBSAOBC
...
@@ -207,7 +207,7 @@ void testForce(int numParticles, NonbondedForce::NonbondedMethod method, GBSAOBC
if
(
method
==
NonbondedForce
::
NoCutoff
)
if
(
method
==
NonbondedForce
::
NoCutoff
)
{
{
const
double
delta
=
1e-2
;
const
double
delta
=
0.1
;
double
step
=
0.5
*
delta
/
norm
;
double
step
=
0.5
*
delta
/
norm
;
vector
<
Vec3
>
positions2
(
numParticles
),
positions3
(
numParticles
);
vector
<
Vec3
>
positions2
(
numParticles
),
positions3
(
numParticles
);
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
...
@@ -220,7 +220,7 @@ void testForce(int numParticles, NonbondedForce::NonbondedMethod method, GBSAOBC
...
@@ -220,7 +220,7 @@ void testForce(int numParticles, NonbondedForce::NonbondedMethod method, GBSAOBC
State
state2
=
context
.
getState
(
State
::
Energy
);
State
state2
=
context
.
getState
(
State
::
Energy
);
context
.
setPositions
(
positions3
);
context
.
setPositions
(
positions3
);
State
state3
=
context
.
getState
(
State
::
Energy
);
State
state3
=
context
.
getState
(
State
::
Energy
);
ASSERT_EQUAL_TOL
(
norm
,
(
state2
.
getPotentialEnergy
()
-
state3
.
getPotentialEnergy
())
/
delta
,
1e-
3
)
ASSERT_EQUAL_TOL
(
norm
,
(
state2
.
getPotentialEnergy
()
-
state3
.
getPotentialEnergy
())
/
delta
,
1e-
2
)
}
}
}
}
...
...
platforms/opencl/tests/TestOpenCLGBSAOBCForce.cpp
View file @
0ea02ab9
...
@@ -207,7 +207,7 @@ void testForce(int numParticles, NonbondedForce::NonbondedMethod method, GBSAOBC
...
@@ -207,7 +207,7 @@ void testForce(int numParticles, NonbondedForce::NonbondedMethod method, GBSAOBC
if
(
method
==
NonbondedForce
::
NoCutoff
)
if
(
method
==
NonbondedForce
::
NoCutoff
)
{
{
const
double
delta
=
1e-2
;
const
double
delta
=
0.1
;
double
step
=
0.5
*
delta
/
norm
;
double
step
=
0.5
*
delta
/
norm
;
vector
<
Vec3
>
positions2
(
numParticles
),
positions3
(
numParticles
);
vector
<
Vec3
>
positions2
(
numParticles
),
positions3
(
numParticles
);
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
...
@@ -220,7 +220,7 @@ void testForce(int numParticles, NonbondedForce::NonbondedMethod method, GBSAOBC
...
@@ -220,7 +220,7 @@ void testForce(int numParticles, NonbondedForce::NonbondedMethod method, GBSAOBC
State
state2
=
context
.
getState
(
State
::
Energy
);
State
state2
=
context
.
getState
(
State
::
Energy
);
context
.
setPositions
(
positions3
);
context
.
setPositions
(
positions3
);
State
state3
=
context
.
getState
(
State
::
Energy
);
State
state3
=
context
.
getState
(
State
::
Energy
);
ASSERT_EQUAL_TOL
(
norm
,
(
state2
.
getPotentialEnergy
()
-
state3
.
getPotentialEnergy
())
/
delta
,
1e-
3
)
ASSERT_EQUAL_TOL
(
norm
,
(
state2
.
getPotentialEnergy
()
-
state3
.
getPotentialEnergy
())
/
delta
,
1e-
2
)
}
}
}
}
...
...
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