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
84e18c01
Commit
84e18c01
authored
4 years ago
by
B13nch3n
Browse files
Options
Downloads
Patches
Plain Diff
SCHWED-4851: some unit tests for branched entities
parent
dbeba018
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/io/tests/test_mmcif_reader.cc
+64
-5
64 additions, 5 deletions
modules/io/tests/test_mmcif_reader.cc
with
64 additions
and
5 deletions
modules/io/tests/test_mmcif_reader.cc
+
64
−
5
View file @
84e18c01
...
...
@@ -62,6 +62,7 @@ public:
using
MMCifReader
::
ParseStructConf
;
using
MMCifReader
::
ParseStructSheetRange
;
using
MMCifReader
::
ParsePdbxEntityBranch
;
using
MMCifReader
::
ParsePdbxEntityBranchLink
;
using
MMCifReader
::
TryStoreIdx
;
using
MMCifReader
::
SetRestrictChains
;
using
MMCifReader
::
SetReadSeqRes
;
...
...
@@ -1419,13 +1420,8 @@ BOOST_AUTO_TEST_CASE(mmcif_test_revisions_new)
BOOST_AUTO_TEST_CASE
(
mmcif_pdbx_entity_branch_tests
)
{
BOOST_TEST_MESSAGE
(
" Running mmcif_pdbx_entity_branch_tests..."
);
IOProfile
profile
;
StarLoopDesc
tmmcif_h
;
mol
::
EntityHandle
eh
=
mol
::
CreateEntity
();
MMCifReader
mmcif_p
(
"testfiles/mmcif/atom_site.mmcif"
,
eh
,
profile
);
mmcif_p
.
Parse
();
BOOST_TEST_MESSAGE
(
" testing chain type recognition..."
);
{
...
...
@@ -1462,4 +1458,67 @@ BOOST_AUTO_TEST_CASE(mmcif_pdbx_entity_branch_tests)
BOOST_TEST_MESSAGE
(
" done."
);
}
BOOST_AUTO_TEST_CASE
(
mmcif_pdbx_entity_branch_link_tests
)
{
BOOST_TEST_MESSAGE
(
" Running mmcif_pdbx_entity_branch_link_tests..."
);
mol
::
EntityHandle
eh
=
mol
::
CreateEntity
();
StarLoopDesc
tmmcif_h
;
BOOST_TEST_MESSAGE
(
" testing link retrieval..."
);
{
TestMMCifReaderProtected
tmmcif_p
(
"testfiles/mmcif/atom_site.mmcif"
,
eh
);
std
::
vector
<
StringRef
>
columns
;
// build dummy pdbx_entity_branch_link header
tmmcif_h
.
Clear
();
tmmcif_h
.
SetCategory
(
StringRef
(
"pdbx_entity_branch_link"
,
23
));
tmmcif_h
.
Add
(
StringRef
(
"entity_id"
,
9
));
tmmcif_h
.
Add
(
StringRef
(
"atom_id_1"
,
9
));
tmmcif_h
.
Add
(
StringRef
(
"atom_id_2"
,
9
));
tmmcif_h
.
Add
(
StringRef
(
"comp_id_1"
,
9
));
tmmcif_h
.
Add
(
StringRef
(
"comp_id_2"
,
9
));
tmmcif_h
.
Add
(
StringRef
(
"entity_branch_list_num_1"
,
24
));
tmmcif_h
.
Add
(
StringRef
(
"entity_branch_list_num_2"
,
24
));
tmmcif_p
.
OnBeginLoop
(
tmmcif_h
);
columns
.
push_back
(
StringRef
(
"1"
,
1
));
columns
.
push_back
(
StringRef
(
"C1"
,
2
));
columns
.
push_back
(
StringRef
(
"O3"
,
2
));
columns
.
push_back
(
StringRef
(
"MAN"
,
3
));
columns
.
push_back
(
StringRef
(
"BMA"
,
3
));
columns
.
push_back
(
StringRef
(
"2"
,
1
));
columns
.
push_back
(
StringRef
(
"1"
,
1
));
BOOST_CHECK_NO_THROW
(
tmmcif_p
.
ParsePdbxEntityBranchLink
(
columns
));
}
BOOST_TEST_MESSAGE
(
" done."
);
BOOST_TEST_MESSAGE
(
" testing link with bond order..."
);
{
TestMMCifReaderProtected
tmmcif_p
(
"testfiles/mmcif/atom_site.mmcif"
,
eh
);
std
::
vector
<
StringRef
>
columns
;
// build dummy pdbx_entity_branch_link header
tmmcif_h
.
Clear
();
tmmcif_h
.
SetCategory
(
StringRef
(
"pdbx_entity_branch_link"
,
23
));
tmmcif_h
.
Add
(
StringRef
(
"entity_id"
,
9
));
tmmcif_h
.
Add
(
StringRef
(
"atom_id_1"
,
9
));
tmmcif_h
.
Add
(
StringRef
(
"atom_id_2"
,
9
));
tmmcif_h
.
Add
(
StringRef
(
"comp_id_1"
,
9
));
tmmcif_h
.
Add
(
StringRef
(
"comp_id_2"
,
9
));
tmmcif_h
.
Add
(
StringRef
(
"entity_branch_list_num_1"
,
24
));
tmmcif_h
.
Add
(
StringRef
(
"entity_branch_list_num_2"
,
24
));
tmmcif_h
.
Add
(
StringRef
(
"value_order"
,
11
));
tmmcif_p
.
OnBeginLoop
(
tmmcif_h
);
columns
.
push_back
(
StringRef
(
"1"
,
1
));
columns
.
push_back
(
StringRef
(
"C1"
,
2
));
columns
.
push_back
(
StringRef
(
"O3"
,
2
));
columns
.
push_back
(
StringRef
(
"MAN"
,
3
));
columns
.
push_back
(
StringRef
(
"BMA"
,
3
));
columns
.
push_back
(
StringRef
(
"2"
,
1
));
columns
.
push_back
(
StringRef
(
"1"
,
1
));
columns
.
push_back
(
StringRef
(
"2"
,
1
));
BOOST_CHECK_NO_THROW
(
tmmcif_p
.
ParsePdbxEntityBranchLink
(
columns
));
}
BOOST_TEST_MESSAGE
(
" done."
);
BOOST_TEST_MESSAGE
(
" done."
);
}
BOOST_AUTO_TEST_SUITE_END
();
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