Commit 6e30365f by Maarten L. Hekkelman

endl

parent c0555b6d
...@@ -52,7 +52,7 @@ int main(int argc, char *argv[]) ...@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
if (file.empty()) if (file.empty())
{ {
std::cerr << "Empty file" << std::endl; std::cerr << "Empty file\n";
exit(1); exit(1);
} }
...@@ -66,8 +66,8 @@ int main(int argc, char *argv[]) ...@@ -66,8 +66,8 @@ int main(int argc, char *argv[])
auto n = atom_site.count(cif::key("label_atom_id") == "OXT"); auto n = atom_site.count(cif::key("label_atom_id") == "OXT");
std::cout << "File contains " << atom_site.size() << " atoms of which " std::cout << "File contains " << atom_site.size() << " atoms of which "
<< n << (n == 1 ? " is" : " are") << " OXT" << std::endl << n << (n == 1 ? " is" : " are") << " OXT\n"
<< "residues with an OXT are:" << std::endl; << "residues with an OXT are:\n";
// Loop over all atoms with atom-id "OXT" and print out some info. // Loop over all atoms with atom-id "OXT" and print out some info.
// That info is extracted using structured binding in C++ // That info is extracted using structured binding in C++
...@@ -76,7 +76,7 @@ int main(int argc, char *argv[]) ...@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
cif::key("label_atom_id") == "OXT", cif::key("label_atom_id") == "OXT",
"label_asym_id", "label_comp_id", "label_seq_id")) "label_asym_id", "label_comp_id", "label_seq_id"))
{ {
std::cout << asym << ' ' << comp << ' ' << seqnr << std::endl; std::cout << asym << ' ' << comp << ' ' << seqnr << '\n';
} }
return 0; return 0;
......
...@@ -496,7 +496,7 @@ compound *compound_factory_impl::create(const std::string &id) ...@@ -496,7 +496,7 @@ compound *compound_factory_impl::create(const std::string &id)
m_index = parser.index_datablocks(); m_index = parser.index_datablocks();
if (cif::VERBOSE > 1) if (cif::VERBOSE > 1)
std::cout << " done" << std::endl; std::cout << " done\n";
// reload the resource, perhaps this should be improved... // reload the resource, perhaps this should be improved...
if (m_file.empty()) if (m_file.empty())
...@@ -519,7 +519,7 @@ compound *compound_factory_impl::create(const std::string &id) ...@@ -519,7 +519,7 @@ compound *compound_factory_impl::create(const std::string &id)
parser.parse_single_datablock(id, m_index); parser.parse_single_datablock(id, m_index);
if (cif::VERBOSE > 1) if (cif::VERBOSE > 1)
std::cout << " done" << std::endl; std::cout << " done\n";
if (not file.empty()) if (not file.empty())
{ {
...@@ -545,20 +545,20 @@ class local_compound_factory_impl : public compound_factory_impl ...@@ -545,20 +545,20 @@ class local_compound_factory_impl : public compound_factory_impl
: compound_factory_impl(next) : compound_factory_impl(next)
, m_local_file(file) , m_local_file(file)
{ {
const std::regex peptideRx("(?:[lmp]-)?peptide", std::regex::icase); // const std::regex peptideRx("(?:[lmp]-)?peptide", std::regex::icase);
for (const auto &[id, name, threeLetterCode, group] : // for (const auto &[id, name, threeLetterCode, group] :
file["comp_list"]["chem_comp"].rows<std::string, std::string, std::string, std::string>("id", "name", "three_letter_code", "group")) // file["comp_list"]["chem_comp"].rows<std::string, std::string, std::string, std::string>("id", "name", "three_letter_code", "group"))
{ // {
auto &rdb = m_local_file["comp_" + id]; // auto &rdb = m_local_file["comp_" + id];
if (rdb.empty()) // if (rdb.empty())
{ // {
std::cerr << "Missing data in restraint file for id " + id + '\n'; // // std::cerr << "Missing data in restraint file for id " + id + '\n';
continue; // continue;
} // }
construct_compound(rdb, id, name, threeLetterCode, group); // construct_compound(rdb, id, name, threeLetterCode, group);
} // }
} }
compound *create(const std::string &id) override; compound *create(const std::string &id) override;
......
...@@ -235,7 +235,7 @@ void progress_bar_impl::print_progress() ...@@ -235,7 +235,7 @@ void progress_bar_impl::print_progress()
float progress = static_cast<float>(m_consumed) / m_max_value; float progress = static_cast<float>(m_consumed) / m_max_value;
if (width < kMinBarWidth) if (width < kMinBarWidth)
std::cout << (100 * progress) << '%' << std::endl; std::cout << (100 * progress) << "%\n";
else else
{ {
uint32_t bar_width = 7 * width / 10; uint32_t bar_width = 7 * width / 10;
...@@ -329,7 +329,7 @@ void progress_bar_impl::print_done() ...@@ -329,7 +329,7 @@ void progress_bar_impl::print_done()
if (msg.length() < width) if (msg.length() < width)
msg += std::string(width - msg.length(), ' '); msg += std::string(width - msg.length(), ' ');
std::cout << '\r' << msg << std::endl; std::cout << '\r' << msg << '\n';
} }
progress_bar::progress_bar(int64_t inMax, const std::string &inAction) progress_bar::progress_bar(int64_t inMax, const std::string &inAction)
......
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