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
db629fb2
Unverified
Commit
db629fb2
authored
May 31, 2023
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix legacy output
parent
dd72655e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
src/dssp-io.cpp
+6
-2
test/unit-test-dssp.cpp
+7
-3
No files found.
src/dssp-io.cpp
View file @
db629fb2
...
@@ -139,7 +139,11 @@ std::string ResidueToDSSPLine(const dssp::residue_info &info)
...
@@ -139,7 +139,11 @@ std::string ResidueToDSSPLine(const dssp::residue_info &info)
ss
,
helix
[
3
],
helix
[
0
],
helix
[
1
],
helix
[
2
],
bend
,
chirality
,
bridgelabel
[
0
],
bridgelabel
[
1
],
ss
,
helix
[
3
],
helix
[
0
],
helix
[
1
],
helix
[
2
],
bend
,
chirality
,
bridgelabel
[
0
],
bridgelabel
[
1
],
bp
[
0
],
bp
[
1
],
sheet
,
floor
(
info
.
accessibility
()
+
0.5
),
bp
[
0
],
bp
[
1
],
sheet
,
floor
(
info
.
accessibility
()
+
0.5
),
NHO
[
0
],
ONH
[
0
],
NHO
[
1
],
ONH
[
1
],
NHO
[
0
],
ONH
[
0
],
NHO
[
1
],
ONH
[
1
],
residue
.
tco
(),
residue
.
kappa
(),
alpha
,
residue
.
phi
(),
residue
.
psi
(),
residue
.
tco
().
value_or
(
0
),
residue
.
kappa
().
value_or
(
360
),
residue
.
alpha
().
value_or
(
360
),
residue
.
phi
().
value_or
(
360
),
residue
.
psi
().
value_or
(
360
),
cax
,
cay
,
caz
)
cax
,
cay
,
caz
)
.
str
();
.
str
();
}
}
...
@@ -153,7 +157,7 @@ void writeDSSP(const dssp &dssp, std::ostream &os)
...
@@ -153,7 +157,7 @@ void writeDSSP(const dssp &dssp, std::ostream &os)
std
::
time_t
today
=
system_clock
::
to_time_t
(
system_clock
::
now
());
std
::
time_t
today
=
system_clock
::
to_time_t
(
system_clock
::
now
());
std
::
tm
*
tm
=
std
::
gmtime
(
&
today
);
std
::
tm
*
tm
=
std
::
gmtime
(
&
today
);
os
<<
"==== Secondary Structure Definition by the program DSSP, NKI version 4.
0
==== DATE="
<<
std
::
put_time
(
tm
,
"%F"
)
<<
" ."
<<
std
::
endl
os
<<
"==== Secondary Structure Definition by the program DSSP, NKI version 4.
3
==== DATE="
<<
std
::
put_time
(
tm
,
"%F"
)
<<
" ."
<<
std
::
endl
<<
"REFERENCE W. KABSCH AND C.SANDER, BIOPOLYMERS 22 (1983) 2577-2637 ."
<<
std
::
endl
<<
"REFERENCE W. KABSCH AND C.SANDER, BIOPOLYMERS 22 (1983) 2577-2637 ."
<<
std
::
endl
<<
dssp
.
get_pdb_header_line
(
dssp
::
pdb_record_type
::
HEADER
)
<<
'.'
<<
std
::
endl
<<
dssp
.
get_pdb_header_line
(
dssp
::
pdb_record_type
::
HEADER
)
<<
'.'
<<
std
::
endl
<<
dssp
.
get_pdb_header_line
(
dssp
::
pdb_record_type
::
COMPND
)
<<
'.'
<<
std
::
endl
<<
dssp
.
get_pdb_header_line
(
dssp
::
pdb_record_type
::
COMPND
)
<<
'.'
<<
std
::
endl
...
...
test/unit-test-dssp.cpp
View file @
db629fb2
...
@@ -97,9 +97,9 @@ BOOST_AUTO_TEST_CASE(ut_dssp)
...
@@ -97,9 +97,9 @@ BOOST_AUTO_TEST_CASE(ut_dssp)
std
::
string
line_t
,
line_r
;
std
::
string
line_t
,
line_r
;
BOOST_CHECK
(
std
::
getline
(
test
,
line_t
)
and
std
::
getline
(
reference
,
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.
0
===="
;
const
char
*
kHeaderLineStart
=
"==== Secondary Structure Definition by the program DSSP, NKI version 4.
3
===="
;
BOOST_CHECK
(
line_t
.
compare
(
0
,
std
::
strlen
(
kHeaderLineStart
),
kHeaderLineStart
)
==
0
);
BOOST_CHECK
(
line_t
.
compare
(
0
,
std
::
strlen
(
kHeaderLineStart
),
kHeaderLineStart
)
==
0
);
BOOST_CHECK
(
line_r
.
compare
(
0
,
std
::
strlen
(
kHeaderLineStart
),
kHeaderLineStart
)
==
0
);
//
BOOST_CHECK(line_r.compare(0, std::strlen(kHeaderLineStart), kHeaderLineStart) == 0);
for
(
int
line_nr
=
2
;;
++
line_nr
)
for
(
int
line_nr
=
2
;;
++
line_nr
)
{
{
...
@@ -115,7 +115,11 @@ BOOST_AUTO_TEST_CASE(ut_dssp)
...
@@ -115,7 +115,11 @@ BOOST_AUTO_TEST_CASE(ut_dssp)
<<
line_t
<<
std
::
endl
<<
line_t
<<
std
::
endl
<<
line_r
<<
std
::
endl
;
<<
line_r
<<
std
::
endl
;
if
(
line_t
!=
line_r
)
{
BOOST_CHECK
(
line_t
==
line_r
);
BOOST_CHECK
(
line_t
==
line_r
);
break
;
}
}
}
BOOST_CHECK
(
test
.
eof
());
BOOST_CHECK
(
test
.
eof
());
...
@@ -164,7 +168,7 @@ BOOST_AUTO_TEST_CASE(dssp_1)
...
@@ -164,7 +168,7 @@ BOOST_AUTO_TEST_CASE(dssp_1)
std
::
string
line
;
std
::
string
line
;
getline
(
t
,
line
);
getline
(
t
,
line
);
std
::
cout
<<
line
<<
std
::
endl
;
//
std::cout << line << std::endl;
auto
fld
=
cif
::
split
(
line
,
"
\t
"
);
auto
fld
=
cif
::
split
(
line
,
"
\t
"
);
...
...
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