Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dssp
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
dssp
Commits
18a6336a
Unverified
Commit
18a6336a
authored
Jun 21, 2023
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed unit tests
parent
4af95fcf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
CMakeLists.txt
+3
-1
src/dssp.cpp
+4
-1
test/1cbs.dssp
+1
-1
test/unit-test-dssp.cpp
+3
-1
No files found.
CMakeLists.txt
View file @
18a6336a
...
...
@@ -265,7 +265,9 @@ if(ENABLE_TESTING)
add_executable
(
unit-test-dssp
${
PROJECT_SOURCE_DIR
}
/test/unit-test-dssp.cpp
${
PROJECT_SOURCE_DIR
}
/src/dssp-io.cpp
)
if
(
USE_RSRC
)
mrc_target_resources
(
unit-test-dssp
${
CIFPP_SHARE_DIR
}
/mmcif_pdbx.dic
${
CIFPP_SHARE_DIR
}
/mmcif_ddl.dic
)
mrc_target_resources
(
unit-test-dssp
${
CIFPP_SHARE_DIR
}
/mmcif_pdbx.dic
${
CIFPP_SHARE_DIR
}
/mmcif_ddl.dic
${
CMAKE_CURRENT_SOURCE_DIR
}
/mmcif_pdbx/dssp-extension.dic
)
endif
()
target_include_directories
(
unit-test-dssp PRIVATE
...
...
src/dssp.cpp
View file @
18a6336a
...
...
@@ -1508,7 +1508,10 @@ DSSP_impl::DSSP_impl(const cif::datablock &db, int model_nr, int min_poly_prolin
nextNext
.
mCAlpha
,
cur
.
mCAlpha
);
float
skap
=
std
::
sqrt
(
1
-
ckap
*
ckap
);
cur
.
mKappa
=
std
::
atan2
(
skap
,
ckap
)
*
static_cast
<
float
>
(
180
/
kPI
);
auto
kappa
=
std
::
atan2
(
skap
,
ckap
)
*
static_cast
<
float
>
(
180
/
kPI
);
if
(
not
std
::
isnan
(
kappa
))
cur
.
mKappa
=
kappa
;
}
}
...
...
test/1cbs.dssp
View file @
18a6336a
==== Secondary Structure Definition by the program DSSP, NKI version 4.
0
==== DATE=2021-08-25 .
==== Secondary Structure Definition by the program DSSP, NKI version 4.
4.0
==== DATE=2021-08-25 .
REFERENCE W. KABSCH AND C.SANDER, BIOPOLYMERS 22 (1983) 2577-2637 .
HEADER RETINOIC-ACID TRANSPORT 28-SEP-94 1CBS .
COMPND MOL_ID: 1; MOLECULE: CELLULAR RETINOIC ACID BINDING PROTEIN TYPE II; CHAIN: A; ENGINEERED: YES .
...
...
test/unit-test-dssp.cpp
View file @
18a6336a
...
...
@@ -32,6 +32,8 @@
#include "dssp.hpp"
#include "dssp-io.hpp"
#include <cif++/dictionary_parser.hpp>
namespace
fs
=
std
::
filesystem
;
// --------------------------------------------------------------------
...
...
@@ -97,7 +99,7 @@ BOOST_AUTO_TEST_CASE(ut_dssp)
std
::
string
line_t
,
line_r
;
BOOST_CHECK
(
std
::
getline
(
test
,
line_t
)
and
std
::
getline
(
reference
,
line_r
));
const
char
*
kHeaderLineStart
=
"==== Secondary Structure Definition by the program DSSP, NKI version 4.
3
===="
;
const
char
*
kHeaderLineStart
=
"==== Secondary Structure Definition by the program DSSP, NKI version 4.
4.0
===="
;
BOOST_CHECK
(
line_t
.
compare
(
0
,
std
::
strlen
(
kHeaderLineStart
),
kHeaderLineStart
)
==
0
);
// BOOST_CHECK(line_r.compare(0, std::strlen(kHeaderLineStart), kHeaderLineStart) == 0);
...
...
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