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
1fea6058
Unverified
Commit
1fea6058
authored
Dec 04, 2019
by
Andy Simmonett
Browse files
Fix to test tolerance and superfluous loop
parent
0e396127
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
plugins/drude/tests/TestDrudeNoseHoover.h
plugins/drude/tests/TestDrudeNoseHoover.h
+1
-1
tests/TestNoseHooverThermostat.h
tests/TestNoseHooverThermostat.h
+4
-7
No files found.
plugins/drude/tests/TestDrudeNoseHoover.h
View file @
1fea6058
...
...
@@ -336,7 +336,7 @@ double testPositionsAfterShortRun(Platform &platform) {
const
auto
&
v
=
state
.
getVelocities
();
const
auto
&
p
=
state
.
getPositions
();
const
double
TOL
=
5
e-
4
;
const
double
TOL
=
1
e-
3
;
ASSERT_EQUAL_VEC
(
Vec3
(
0.35675068
,
0.65083786
,
0.27473552
),
v
[
0
],
TOL
);
ASSERT_EQUAL_VEC
(
Vec3
(
0.099853537
,
0.2840745
,
0.069048963
),
v
[
1
],
TOL
);
ASSERT_EQUAL_VEC
(
Vec3
(
0.24183664
,
0.12975303
,
-
1.1057667
),
v
[
2
],
TOL
);
...
...
tests/TestNoseHooverThermostat.h
View file @
1fea6058
...
...
@@ -248,12 +248,10 @@ void testCheckpoints() {
State
state1
=
context
.
getState
(
State
::
Positions
|
State
::
Velocities
);
State
state2
=
newContext
.
getState
(
State
::
Positions
|
State
::
Velocities
);
for
(
int
i
=
0
;
i
<
3
;
i
++
){
ASSERT_EQUAL_VEC
(
state1
.
getPositions
()[
0
],
state2
.
getPositions
()[
0
],
1e-6
);
ASSERT_EQUAL_VEC
(
state1
.
getPositions
()[
1
],
state2
.
getPositions
()[
1
],
1e-6
);
ASSERT_EQUAL_VEC
(
state1
.
getVelocities
()[
0
],
state2
.
getVelocities
()[
0
],
1e-6
);
ASSERT_EQUAL_VEC
(
state1
.
getVelocities
()[
1
],
state2
.
getVelocities
()[
1
],
1e-6
);
}
ASSERT_EQUAL_VEC
(
state1
.
getPositions
()[
0
],
state2
.
getPositions
()[
0
],
1e-6
);
ASSERT_EQUAL_VEC
(
state1
.
getPositions
()[
1
],
state2
.
getPositions
()[
1
],
1e-6
);
ASSERT_EQUAL_VEC
(
state1
.
getVelocities
()[
0
],
state2
.
getVelocities
()[
0
],
1e-6
);
ASSERT_EQUAL_VEC
(
state1
.
getVelocities
()[
1
],
state2
.
getVelocities
()[
1
],
1e-6
);
}
void
testAPIChangeNumParticles
()
{
...
...
@@ -265,7 +263,6 @@ void testAPIChangeNumParticles() {
std
::
vector
<
Vec3
>
positions
(
numMolecules
*
2
);
int
numDOF
=
makeDimerBox
(
system
,
positions
,
constrain
,
numMolecules
,
bondLength
);
}
void
runPlatformTests
();
...
...
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