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
7398e5a3
Unverified
Commit
7398e5a3
authored
Mar 11, 2020
by
peastman
Committed by
GitHub
Mar 11, 2020
Browse files
Merge pull request #2594 from peastman/dimertest
Made a test case more reliable
parents
c5c0348a
32e7dcf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/TestNoseHooverThermostat.h
tests/TestNoseHooverThermostat.h
+2
-2
No files found.
tests/TestNoseHooverThermostat.h
View file @
7398e5a3
...
@@ -165,7 +165,7 @@ void testDimerBox(bool constrain=true) {
...
@@ -165,7 +165,7 @@ void testDimerBox(bool constrain=true) {
context
.
setPositions
(
positions
);
context
.
setPositions
(
positions
);
context
.
setVelocitiesToTemperature
(
temperature
);
context
.
setVelocitiesToTemperature
(
temperature
);
int
nSteps
=
1
500
;
int
nSteps
=
5
0
00
;
double
mean_temp
=
0.0
;
double
mean_temp
=
0.0
;
std
::
vector
<
double
>
energies
(
nSteps
);
std
::
vector
<
double
>
energies
(
nSteps
);
for
(
int
i
=
0
;
i
<
nSteps
;
++
i
)
{
for
(
int
i
=
0
;
i
<
nSteps
;
++
i
)
{
...
@@ -195,7 +195,7 @@ void testDimerBox(bool constrain=true) {
...
@@ -195,7 +195,7 @@ void testDimerBox(bool constrain=true) {
// Check mean temperature
// Check mean temperature
ASSERT_USUALLY_EQUAL_TOL
(
temperature
,
mean_temp
,
1e-2
);
ASSERT_USUALLY_EQUAL_TOL
(
temperature
,
mean_temp
,
1e-2
);
// Check fluctuation of conserved (total bath + system) energy
// Check fluctuation of conserved (total bath + system) energy
ASSERT_USUALLY_EQUAL_TOL
(
relative_std
,
0
,
5
e-
4
);
ASSERT_USUALLY_EQUAL_TOL
(
relative_std
,
0
,
1
e-
3
);
}
}
void
testCheckpoints
()
{
void
testCheckpoints
()
{
...
...
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