Commit db629fb2 by Maarten L. Hekkelman

Fix legacy output

parent dd72655e
...@@ -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
......
...@@ -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;
BOOST_CHECK(line_t == line_r); if (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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment