Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
a817f094
Unverified
Commit
a817f094
authored
Nov 25, 2023
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stricter tests
parent
413ba855
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
test/unit-3d-test.cpp
+17
-17
No files found.
test/unit-3d-test.cpp
View file @
a817f094
...
...
@@ -434,17 +434,17 @@ TEST_CASE("symm_4wvp_1, *utf::tolerance(0.1f)")
auto
a
=
s
.
get_residue
(
"A"
,
10
,
""
).
get_atom_by_atom_id
(
"O"
);
auto
sp1
=
c
.
symmetry_copy
(
a
.
get_location
(),
"2_565"
_symop
);
REQUIRE_THAT
(
sp1
.
m_x
,
Catch
::
Matchers
::
WithinAbs
(
p
.
m_x
,
1.0
f
));
REQUIRE_THAT
(
sp1
.
m_y
,
Catch
::
Matchers
::
WithinAbs
(
p
.
m_y
,
1.0
f
));
REQUIRE_THAT
(
sp1
.
m_z
,
Catch
::
Matchers
::
WithinAbs
(
p
.
m_z
,
1.0
f
));
REQUIRE_THAT
(
sp1
.
m_x
,
Catch
::
Matchers
::
WithinAbs
(
p
.
m_x
,
0.5
f
));
REQUIRE_THAT
(
sp1
.
m_y
,
Catch
::
Matchers
::
WithinAbs
(
p
.
m_y
,
0.5
f
));
REQUIRE_THAT
(
sp1
.
m_z
,
Catch
::
Matchers
::
WithinAbs
(
p
.
m_z
,
0.5
f
));
const
auto
&
[
d
,
sp2
,
so
]
=
c
.
closest_symmetry_copy
(
p
,
a
.
get_location
());
REQUIRE
(
d
<
1
);
REQUIRE_THAT
(
sp2
.
m_x
,
Catch
::
Matchers
::
WithinAbs
(
p
.
m_x
,
1.0
f
));
REQUIRE_THAT
(
sp2
.
m_y
,
Catch
::
Matchers
::
WithinAbs
(
p
.
m_y
,
1.0
f
));
REQUIRE_THAT
(
sp2
.
m_z
,
Catch
::
Matchers
::
WithinAbs
(
p
.
m_z
,
1.0
f
));
REQUIRE_THAT
(
sp2
.
m_x
,
Catch
::
Matchers
::
WithinAbs
(
p
.
m_x
,
0.5
f
));
REQUIRE_THAT
(
sp2
.
m_y
,
Catch
::
Matchers
::
WithinAbs
(
p
.
m_y
,
0.5
f
));
REQUIRE_THAT
(
sp2
.
m_z
,
Catch
::
Matchers
::
WithinAbs
(
p
.
m_z
,
0.5
f
));
}
...
...
@@ -480,17 +480,17 @@ TEST_CASE("symm_2bi3_1, *utf::tolerance(0.1f)")
auto
sa1
=
c
.
symmetry_copy
(
a1
.
get_location
(),
cif
::
sym_op
(
symm1
));
auto
sa2
=
c
.
symmetry_copy
(
a2
.
get_location
(),
cif
::
sym_op
(
symm2
));
REQUIRE_THAT
(
cif
::
distance
(
sa1
,
sa2
),
Catch
::
Matchers
::
WithinAbs
(
dist
,
1.0
f
));
REQUIRE_THAT
(
cif
::
distance
(
sa1
,
sa2
),
Catch
::
Matchers
::
WithinAbs
(
dist
,
0.5
f
));
auto
pa1
=
a1
.
get_location
();
const
auto
&
[
d
,
p
,
so
]
=
c
.
closest_symmetry_copy
(
pa1
,
a2
.
get_location
());
REQUIRE_THAT
(
p
.
m_x
,
Catch
::
Matchers
::
WithinAbs
(
sa2
.
m_x
,
1.0
f
));
REQUIRE_THAT
(
p
.
m_y
,
Catch
::
Matchers
::
WithinAbs
(
sa2
.
m_y
,
1.0
f
));
REQUIRE_THAT
(
p
.
m_z
,
Catch
::
Matchers
::
WithinAbs
(
sa2
.
m_z
,
1.0
f
));
REQUIRE_THAT
(
p
.
m_x
,
Catch
::
Matchers
::
WithinAbs
(
sa2
.
m_x
,
0.5
f
));
REQUIRE_THAT
(
p
.
m_y
,
Catch
::
Matchers
::
WithinAbs
(
sa2
.
m_y
,
0.5
f
));
REQUIRE_THAT
(
p
.
m_z
,
Catch
::
Matchers
::
WithinAbs
(
sa2
.
m_z
,
0.5
f
));
REQUIRE_THAT
(
d
,
Catch
::
Matchers
::
WithinAbs
(
dist
,
1.0
f
));
REQUIRE_THAT
(
d
,
Catch
::
Matchers
::
WithinAbs
(
dist
,
0.5
f
));
REQUIRE
(
so
.
string
()
==
symm2
);
}
}
...
...
@@ -530,15 +530,15 @@ TEST_CASE("symm_2bi3_1a, *utf::tolerance(0.1f)")
auto
sa1
=
c
.
symmetry_copy
(
p1
,
cif
::
sym_op
(
symm1
));
auto
sa2
=
c
.
symmetry_copy
(
p2
,
cif
::
sym_op
(
symm2
));
REQUIRE_THAT
(
cif
::
distance
(
sa1
,
sa2
),
Catch
::
Matchers
::
WithinAbs
(
dist
,
1.0
f
));
REQUIRE_THAT
(
cif
::
distance
(
sa1
,
sa2
),
Catch
::
Matchers
::
WithinAbs
(
dist
,
0.5
f
));
const
auto
&
[
d
,
p
,
so
]
=
c
.
closest_symmetry_copy
(
p1
,
p2
);
REQUIRE_THAT
(
p
.
m_x
,
Catch
::
Matchers
::
WithinAbs
(
sa2
.
m_x
,
1.0
f
));
REQUIRE_THAT
(
p
.
m_y
,
Catch
::
Matchers
::
WithinAbs
(
sa2
.
m_y
,
1.0
f
));
REQUIRE_THAT
(
p
.
m_z
,
Catch
::
Matchers
::
WithinAbs
(
sa2
.
m_z
,
1.0
f
));
REQUIRE_THAT
(
p
.
m_x
,
Catch
::
Matchers
::
WithinAbs
(
sa2
.
m_x
,
0.5
f
));
REQUIRE_THAT
(
p
.
m_y
,
Catch
::
Matchers
::
WithinAbs
(
sa2
.
m_y
,
0.5
f
));
REQUIRE_THAT
(
p
.
m_z
,
Catch
::
Matchers
::
WithinAbs
(
sa2
.
m_z
,
0.5
f
));
REQUIRE_THAT
(
d
,
Catch
::
Matchers
::
WithinAbs
(
dist
,
1.0
f
));
REQUIRE_THAT
(
d
,
Catch
::
Matchers
::
WithinAbs
(
dist
,
0.5
f
));
REQUIRE
(
so
.
string
()
==
symm2
);
}
}
...
...
@@ -561,7 +561,7 @@ TEST_CASE("symm_3bwh_1, *utf::tolerance(0.1f)")
const
auto
&
[
d
,
p
,
so
]
=
c
.
closest_symmetry_copy
(
a1
.
get_location
(),
a2
.
get_location
());
REQUIRE_THAT
(
d
,
Catch
::
Matchers
::
WithinAbs
(
distance
(
a1
.
get_location
(),
p
),
1.0
f
));
REQUIRE_THAT
(
d
,
Catch
::
Matchers
::
WithinAbs
(
distance
(
a1
.
get_location
(),
p
),
0.5
f
));
}
}
}
...
...
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