Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
f9ff5e87
Commit
f9ff5e87
authored
13 years ago
by
Bienchen
Browse files
Options
Downloads
Patches
Plain Diff
Solved problemes with BOOST_CHECK_CLOSE in tests on bc2.
parent
e898fb5d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/img/alg/tests/test_stat.cc
+4
-4
4 additions, 4 deletions
modules/img/alg/tests/test_stat.cc
modules/mol/base/tests/test_ics.cc
+27
-27
27 additions, 27 deletions
modules/mol/base/tests/test_ics.cc
with
31 additions
and
31 deletions
modules/img/alg/tests/test_stat.cc
+
4
−
4
View file @
f9ff5e87
...
@@ -52,7 +52,7 @@ void test() {
...
@@ -52,7 +52,7 @@ void test() {
im
.
Apply
(
stat
);
im
.
Apply
(
stat
);
BOOST_CHECK_CLOSE
(
stat
.
GetMean
(),
Real
(
5.0
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
stat
.
GetMean
(),
Real
(
5.0
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
stat
.
GetStandardDeviation
(),
Real
(
2.58198889747
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
stat
.
GetStandardDeviation
(),
Real
(
2.58198889747
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
stat
.
GetSkewness
()
+
0.5
,
Real
(
0.5
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
stat
.
GetSkewness
()
+
Real
(
0.5
)
,
Real
(
0.5
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
stat
.
GetKurtosis
(),
Real
(
1.77
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
stat
.
GetKurtosis
(),
Real
(
1.77
),
Real
(
0.0001
));
// check for rounding errors
// check for rounding errors
...
@@ -60,7 +60,7 @@ void test() {
...
@@ -60,7 +60,7 @@ void test() {
im
.
Apply
(
stat
);
im
.
Apply
(
stat
);
BOOST_CHECK_CLOSE
(
stat
.
GetMean
(),
Real
(
10005.0
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
stat
.
GetMean
(),
Real
(
10005.0
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
stat
.
GetStandardDeviation
(),
Real
(
2.58198889747
),
Real
(
0.01
));
BOOST_CHECK_CLOSE
(
stat
.
GetStandardDeviation
(),
Real
(
2.58198889747
),
Real
(
0.01
));
BOOST_CHECK_CLOSE
(
stat
.
GetSkewness
()
+
0.5
,
Real
(
0.5
),
Real
(
0.01
));
BOOST_CHECK_CLOSE
(
stat
.
GetSkewness
()
+
Real
(
0.5
)
,
Real
(
0.5
),
Real
(
0.01
));
BOOST_CHECK_CLOSE
(
stat
.
GetKurtosis
(),
Real
(
1.77
),
Real
(
0.01
));
BOOST_CHECK_CLOSE
(
stat
.
GetKurtosis
(),
Real
(
1.77
),
Real
(
0.01
));
...
@@ -72,7 +72,7 @@ void test() {
...
@@ -72,7 +72,7 @@ void test() {
}
}
BOOST_CHECK_CLOSE
(
acc
.
GetMean
(),
Real
(
5.0
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc
.
GetMean
(),
Real
(
5.0
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc
.
GetStandardDeviation
(),
Real
(
2.58198889747
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc
.
GetStandardDeviation
(),
Real
(
2.58198889747
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc
.
GetSkewness
()
+
0.5
,
Real
(
0.5
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc
.
GetSkewness
()
+
Real
(
0.5
)
,
Real
(
0.5
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc
.
GetKurtosis
(),
Real
(
1.77
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc
.
GetKurtosis
(),
Real
(
1.77
),
Real
(
0.0001
));
StatAccumulator
<>
acc1
,
acc2
,
acc3
;
StatAccumulator
<>
acc1
,
acc2
,
acc3
;
...
@@ -84,7 +84,7 @@ void test() {
...
@@ -84,7 +84,7 @@ void test() {
StatAccumulator
<>
acc_c
=
acc1
+
acc2
+
acc3
;
StatAccumulator
<>
acc_c
=
acc1
+
acc2
+
acc3
;
BOOST_CHECK_CLOSE
(
acc_c
.
GetMean
(),
Real
(
5.0
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc_c
.
GetMean
(),
Real
(
5.0
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc_c
.
GetStandardDeviation
(),
Real
(
2.58198889747
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc_c
.
GetStandardDeviation
(),
Real
(
2.58198889747
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc_c
.
GetSkewness
()
+
0.5
,
Real
(
0.5
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc_c
.
GetSkewness
()
+
Real
(
0.5
)
,
Real
(
0.5
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc_c
.
GetKurtosis
(),
Real
(
1.77
),
Real
(
0.0001
));
BOOST_CHECK_CLOSE
(
acc_c
.
GetKurtosis
(),
Real
(
1.77
),
Real
(
0.0001
));
}
}
...
...
This diff is collapsed.
Click to expand it.
modules/mol/base/tests/test_ics.cc
+
27
−
27
View file @
f9ff5e87
...
@@ -107,7 +107,7 @@ BOOST_AUTO_TEST_CASE(ics_update_icsbondlength)
...
@@ -107,7 +107,7 @@ BOOST_AUTO_TEST_CASE(ics_update_icsbondlength)
{
{
TorsionStructure
s
;
TorsionStructure
s
;
mol
::
BondHandle
bond
=
s
.
a2
.
FindBondToAtom
(
s
.
a3
);
mol
::
BondHandle
bond
=
s
.
a2
.
FindBondToAtom
(
s
.
a3
);
BOOST_CHECK_CLOSE
(
bond
.
GetLength
(),
1.0
,
EPSILON
);
BOOST_CHECK_CLOSE
(
bond
.
GetLength
(),
Real
(
1.0
)
,
Real
(
EPSILON
)
)
;
}
}
BOOST_AUTO_TEST_CASE
(
ics_settorsion_unbuffered
)
BOOST_AUTO_TEST_CASE
(
ics_settorsion_unbuffered
)
...
@@ -115,20 +115,20 @@ BOOST_AUTO_TEST_CASE(ics_settorsion_unbuffered)
...
@@ -115,20 +115,20 @@ BOOST_AUTO_TEST_CASE(ics_settorsion_unbuffered)
Real
eps
=
0.0001
;
Real
eps
=
0.0001
;
TorsionStructure
s
;
TorsionStructure
s
;
ICSEditor
e
=
s
.
e
.
EditICS
(
mol
::
UNBUFFERED_EDIT
);
ICSEditor
e
=
s
.
e
.
EditICS
(
mol
::
UNBUFFERED_EDIT
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
M_PI
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
Real
(
M_PI
)
,
Real
(
eps
)
)
;
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
e
.
SetTorsionAngle
(
s
.
t1
,
0
);
e
.
SetTorsionAngle
(
s
.
t1
,
0
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
M_PI
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
M_PI
)
,
Real
(
eps
)
)
;
e
.
SetTorsionAngle
(
s
.
t2
,
M_PI
/
4
);
e
.
SetTorsionAngle
(
s
.
t2
,
M_PI
/
4
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
M_PI
/
4
)
,
Real
(
eps
)
)
;
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
-
M_PI
+
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
Real
(
-
M_PI
+
M_PI
/
4
)
,
Real
(
eps
)
)
;
e
.
SetTorsionAngle
(
s
.
t1
,
-
M_PI
/
4
);
e
.
SetTorsionAngle
(
s
.
t1
,
-
M_PI
/
4
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
-
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
Real
(
-
M_PI
/
4
)
,
Real
(
eps
)
)
;
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
3
/
4.
*
M_PI
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
3
/
4.
*
M_PI
)
,
Real
(
eps
)
)
;
e
.
RotateTorsionAngle
(
s
.
t1
,
M_PI
/
4
);
e
.
RotateTorsionAngle
(
s
.
t1
,
M_PI
/
4
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_CLOSE
(
std
::
abs
(
s
.
t2
.
GetAngle
()),
M_PI
,
eps
);
BOOST_CHECK_CLOSE
(
std
::
abs
(
s
.
t2
.
GetAngle
()),
Real
(
M_PI
)
,
Real
(
eps
)
)
;
}
}
BOOST_AUTO_TEST_CASE
(
ics_settorsion_buffered
)
BOOST_AUTO_TEST_CASE
(
ics_settorsion_buffered
)
...
@@ -136,20 +136,20 @@ BOOST_AUTO_TEST_CASE(ics_settorsion_buffered)
...
@@ -136,20 +136,20 @@ BOOST_AUTO_TEST_CASE(ics_settorsion_buffered)
Real
eps
=
0.0001
;
Real
eps
=
0.0001
;
TorsionStructure
s
;
TorsionStructure
s
;
ICSEditor
e
=
s
.
e
.
EditICS
(
mol
::
BUFFERED_EDIT
);
ICSEditor
e
=
s
.
e
.
EditICS
(
mol
::
BUFFERED_EDIT
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
M_PI
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
Real
(
M_PI
)
,
Real
(
eps
)
)
;
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
e
.
SetTorsionAngle
(
s
.
t1
,
0
);
e
.
SetTorsionAngle
(
s
.
t1
,
0
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
M_PI
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
M_PI
)
,
Real
(
eps
)
)
;
e
.
SetTorsionAngle
(
s
.
t2
,
M_PI
/
4
);
e
.
SetTorsionAngle
(
s
.
t2
,
M_PI
/
4
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
M_PI
/
4
)
,
Real
(
eps
)
)
;
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
-
M_PI
+
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
Real
(
-
M_PI
+
M_PI
/
4
)
,
Real
(
eps
)
)
;
e
.
SetTorsionAngle
(
s
.
t1
,
-
M_PI
/
4
);
e
.
SetTorsionAngle
(
s
.
t1
,
-
M_PI
/
4
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
-
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
Real
(
-
M_PI
/
4
)
,
Real
(
eps
)
)
;
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
3
/
4.
*
M_PI
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
3
/
4.
*
M_PI
)
,
Real
(
eps
)
)
;
e
.
RotateTorsionAngle
(
s
.
t1
,
M_PI
/
4
);
e
.
RotateTorsionAngle
(
s
.
t1
,
M_PI
/
4
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_CLOSE
(
std
::
abs
(
s
.
t2
.
GetAngle
()),
M_PI
,
eps
);
BOOST_CHECK_CLOSE
(
std
::
abs
(
s
.
t2
.
GetAngle
()),
Real
(
M_PI
)
,
Real
(
eps
)
)
;
}
}
BOOST_AUTO_TEST_CASE
(
ics_settorsion_unbuffered_update_others
)
BOOST_AUTO_TEST_CASE
(
ics_settorsion_unbuffered_update_others
)
...
@@ -157,20 +157,20 @@ BOOST_AUTO_TEST_CASE(ics_settorsion_unbuffered_update_others)
...
@@ -157,20 +157,20 @@ BOOST_AUTO_TEST_CASE(ics_settorsion_unbuffered_update_others)
Real
eps
=
0.0001
;
Real
eps
=
0.0001
;
TorsionStructure
s
;
TorsionStructure
s
;
ICSEditor
e
=
s
.
e
.
EditICS
(
mol
::
UNBUFFERED_EDIT
);
ICSEditor
e
=
s
.
e
.
EditICS
(
mol
::
UNBUFFERED_EDIT
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
M_PI
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
Real
(
M_PI
)
,
Real
(
eps
)
)
;
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
e
.
SetTorsionAngle
(
s
.
t1
,
0
,
false
);
e
.
SetTorsionAngle
(
s
.
t1
,
0
,
false
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
e
.
SetTorsionAngle
(
s
.
t2
,
M_PI
/
4
,
false
);
e
.
SetTorsionAngle
(
s
.
t2
,
M_PI
/
4
,
false
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
M_PI
/
4
)
,
Real
(
eps
)
)
;
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
e
.
SetTorsionAngle
(
s
.
t1
,
-
M_PI
/
4
,
false
);
e
.
SetTorsionAngle
(
s
.
t1
,
-
M_PI
/
4
,
false
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
-
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
Real
(
-
M_PI
/
4
)
,
Real
(
eps
)
)
;
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
M_PI
/
4
)
,
Real
(
eps
)
)
;
e
.
RotateTorsionAngle
(
s
.
t1
,
M_PI
/
4
,
false
);
e
.
RotateTorsionAngle
(
s
.
t1
,
M_PI
/
4
,
false
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
M_PI
/
4
)
,
Real
(
eps
)
)
;
}
}
BOOST_AUTO_TEST_CASE
(
ics_settorsion_buffered_update_others
)
BOOST_AUTO_TEST_CASE
(
ics_settorsion_buffered_update_others
)
...
@@ -178,20 +178,20 @@ BOOST_AUTO_TEST_CASE(ics_settorsion_buffered_update_others)
...
@@ -178,20 +178,20 @@ BOOST_AUTO_TEST_CASE(ics_settorsion_buffered_update_others)
Real
eps
=
0.0001
;
Real
eps
=
0.0001
;
TorsionStructure
s
;
TorsionStructure
s
;
ICSEditor
e
=
s
.
e
.
EditICS
(
mol
::
BUFFERED_EDIT
);
ICSEditor
e
=
s
.
e
.
EditICS
(
mol
::
BUFFERED_EDIT
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
M_PI
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
Real
(
M_PI
)
,
Real
(
eps
)
)
;
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
e
.
SetTorsionAngle
(
s
.
t1
,
0
,
false
);
e
.
SetTorsionAngle
(
s
.
t1
,
0
,
false
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
e
.
SetTorsionAngle
(
s
.
t2
,
M_PI
/
4
,
false
);
e
.
SetTorsionAngle
(
s
.
t2
,
M_PI
/
4
,
false
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
M_PI
/
4
)
,
Real
(
eps
)
)
;
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
e
.
SetTorsionAngle
(
s
.
t1
,
-
M_PI
/
4
,
false
);
e
.
SetTorsionAngle
(
s
.
t1
,
-
M_PI
/
4
,
false
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
-
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t1
.
GetAngle
(),
Real
(
-
M_PI
/
4
)
,
Real
(
eps
)
)
;
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
M_PI
/
4
)
,
Real
(
eps
)
)
;
e
.
RotateTorsionAngle
(
s
.
t1
,
M_PI
/
4
,
false
);
e
.
RotateTorsionAngle
(
s
.
t1
,
M_PI
/
4
,
false
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
M_PI
/
4
)
,
Real
(
eps
)
)
;
}
}
BOOST_AUTO_TEST_CASE
(
ics_settorsion_linear_unbuffered
)
BOOST_AUTO_TEST_CASE
(
ics_settorsion_linear_unbuffered
)
...
@@ -207,13 +207,13 @@ BOOST_AUTO_TEST_CASE(ics_settorsion_linear_unbuffered)
...
@@ -207,13 +207,13 @@ BOOST_AUTO_TEST_CASE(ics_settorsion_linear_unbuffered)
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
e
.
SetTorsionAngle
(
s
.
t2
,
M_PI
/
4
);
e
.
SetTorsionAngle
(
s
.
t2
,
M_PI
/
4
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
M_PI
/
4
)
,
Real
(
eps
)
)
;
e
.
SetTorsionAngle
(
s
.
t1
,
-
M_PI
/
4
);
e
.
SetTorsionAngle
(
s
.
t1
,
-
M_PI
/
4
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t2
.
GetAngle
(),
eps
);
e
.
RotateTorsionAngle
(
s
.
t1
,
M_PI
/
4
);
e
.
RotateTorsionAngle
(
s
.
t1
,
M_PI
/
4
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_SMALL
(
s
.
t1
.
GetAngle
(),
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
M_PI
/
4
,
eps
);
BOOST_CHECK_CLOSE
(
s
.
t2
.
GetAngle
(),
Real
(
M_PI
/
4
)
,
Real
(
eps
)
)
;
}
}
BOOST_AUTO_TEST_CASE
(
ics_angle_trivia
)
BOOST_AUTO_TEST_CASE
(
ics_angle_trivia
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment