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
ba37b26b
"openmmapi/vscode:/vscode.git/clone" did not exist on "bd666c270a642f4e80ac6f0cc42742ccb925e725"
Commit
ba37b26b
authored
Dec 30, 2014
by
Jason Swails
Browse files
Update the tests of the classes I just updated.
parent
1b44cb9e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
0 deletions
+15
-0
platforms/reference/tests/TestReferenceAndersenThermostat.cpp
...forms/reference/tests/TestReferenceAndersenThermostat.cpp
+1
-0
platforms/reference/tests/TestReferenceMonteCarloAnisotropicBarostat.cpp
...ence/tests/TestReferenceMonteCarloAnisotropicBarostat.cpp
+6
-0
platforms/reference/tests/TestReferenceMonteCarloBarostat.cpp
...forms/reference/tests/TestReferenceMonteCarloBarostat.cpp
+4
-0
platforms/reference/tests/TestReferenceMonteCarloMembraneBarostat.cpp
...ference/tests/TestReferenceMonteCarloMembraneBarostat.cpp
+4
-0
No files found.
platforms/reference/tests/TestReferenceAndersenThermostat.cpp
View file @
ba37b26b
...
...
@@ -64,6 +64,7 @@ void testTemperature() {
system
.
addForce
(
forceField
);
AndersenThermostat
*
thermstat
=
new
AndersenThermostat
(
temp
,
collisionFreq
);
system
.
addForce
(
thermstat
);
ASSERT
(
!
thermostat
->
usesPeriodicBoundaryConditions
());
Context
context
(
system
,
integrator
,
platform
);
vector
<
Vec3
>
positions
(
numParticles
);
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
...
...
platforms/reference/tests/TestReferenceMonteCarloAnisotropicBarostat.cpp
View file @
ba37b26b
...
...
@@ -75,6 +75,8 @@ void testIdealGas() {
}
MonteCarloAnisotropicBarostat
*
barostat
=
new
MonteCarloAnisotropicBarostat
(
Vec3
(
pressure
,
pressure
,
pressure
),
temp
[
0
],
true
,
true
,
true
,
frequency
);
system
.
addForce
(
barostat
);
ASSERT
(
barostat
->
usesPeriodicBoundaryConditions
());
ASSERT
(
system
.
usesPeriodicBoundaryConditions
());
// Test it for three different temperatures.
...
...
@@ -134,6 +136,8 @@ void testIdealGasAxis(int axis) {
}
MonteCarloAnisotropicBarostat
*
barostat
=
new
MonteCarloAnisotropicBarostat
(
Vec3
(
pressure
,
pressure
,
pressure
),
temp
[
0
],
scaleX
,
scaleY
,
scaleZ
,
frequency
);
system
.
addForce
(
barostat
);
ASSERT
(
barostat
->
usesPeriodicBoundaryConditions
());
ASSERT
(
system
.
usesPeriodicBoundaryConditions
());
// Test it for three different temperatures.
...
...
@@ -191,6 +195,8 @@ void testRandomSeed() {
system
.
addForce
(
forceField
);
MonteCarloAnisotropicBarostat
*
barostat
=
new
MonteCarloAnisotropicBarostat
(
Vec3
(
pressure
,
pressure
,
pressure
),
temp
,
true
,
true
,
true
,
1
);
system
.
addForce
(
barostat
);
ASSERT
(
barostat
->
usesPeriodicBoundaryConditions
());
ASSERT
(
system
.
usesPeriodicBoundaryConditions
());
vector
<
Vec3
>
positions
(
numParticles
);
vector
<
Vec3
>
velocities
(
numParticles
);
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
...
...
platforms/reference/tests/TestReferenceMonteCarloBarostat.cpp
View file @
ba37b26b
...
...
@@ -112,6 +112,8 @@ void testIdealGas() {
}
MonteCarloBarostat
*
barostat
=
new
MonteCarloBarostat
(
pressure
,
temp
[
0
],
frequency
);
system
.
addForce
(
barostat
);
ASSERT
(
barostat
->
usesPeriodicBoundaryConditions
());
ASSERT
(
system
.
usesPeriodicBoundaryConditions
());
// Test it for three different temperatures.
...
...
@@ -159,6 +161,8 @@ void testRandomSeed() {
system
.
addForce
(
forceField
);
MonteCarloBarostat
*
barostat
=
new
MonteCarloBarostat
(
pressure
,
temp
,
1
);
system
.
addForce
(
barostat
);
ASSERT
(
barostat
->
usesPeriodicBoundaryConditions
());
ASSERT
(
system
.
usesPeriodicBoundaryConditions
());
vector
<
Vec3
>
positions
(
numParticles
);
vector
<
Vec3
>
velocities
(
numParticles
);
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
...
...
platforms/reference/tests/TestReferenceMonteCarloMembraneBarostat.cpp
View file @
ba37b26b
...
...
@@ -75,6 +75,8 @@ void testIdealGas(MonteCarloMembraneBarostat::XYMode xymode, MonteCarloMembraneB
}
MonteCarloMembraneBarostat
*
barostat
=
new
MonteCarloMembraneBarostat
(
pressure
,
tension
,
temp
[
0
],
xymode
,
zmode
,
frequency
);
system
.
addForce
(
barostat
);
ASSERT
(
barostat
->
usesPeriodicBoundaryConditions
());
ASSERT
(
system
.
usesPeriodicBoundaryConditions
());
// Test it for three different temperatures.
...
...
@@ -132,6 +134,8 @@ void testRandomSeed() {
system
.
addForce
(
forceField
);
MonteCarloMembraneBarostat
*
barostat
=
new
MonteCarloMembraneBarostat
(
pressure
,
tension
,
temp
,
MonteCarloMembraneBarostat
::
XYAnisotropic
,
MonteCarloMembraneBarostat
::
ZFree
,
1
);
system
.
addForce
(
barostat
);
ASSERT
(
barostat
->
usesPeriodicBoundaryConditions
());
ASSERT
(
system
.
usesPeriodicBoundaryConditions
());
vector
<
Vec3
>
positions
(
numParticles
);
vector
<
Vec3
>
velocities
(
numParticles
);
for
(
int
i
=
0
;
i
<
numParticles
;
++
i
)
{
...
...
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