Commit e7c34cc1 by Maarten L. Hekkelman

Merge changes

parent 6fe5a04c
...@@ -50,7 +50,7 @@ class atom ...@@ -50,7 +50,7 @@ class atom
private: private:
struct atom_impl : public std::enable_shared_from_this<atom_impl> struct atom_impl : public std::enable_shared_from_this<atom_impl>
{ {
atom_impl(datablock &db, std::string_view id) atom_impl(const datablock &db, std::string_view id)
: m_db(db) : m_db(db)
, m_cat(db["atom_site"]) , m_cat(db["atom_site"])
, m_id(id) , m_id(id)
...@@ -111,7 +111,7 @@ class atom ...@@ -111,7 +111,7 @@ class atom
} }
const datablock &m_db; const datablock &m_db;
category &m_cat; const category &m_cat;
std::string m_id; std::string m_id;
point m_location; point m_location;
std::string m_symop = "1_555"; std::string m_symop = "1_555";
...@@ -130,7 +130,7 @@ class atom ...@@ -130,7 +130,7 @@ class atom
{ {
} }
atom(datablock &db, row_handle &row) atom(const datablock &db, const row_handle &row)
: atom(std::make_shared<atom_impl>(db, row["id"].as<std::string>())) : atom(std::make_shared<atom_impl>(db, row["id"].as<std::string>()))
{ {
} }
...@@ -893,15 +893,7 @@ class structure ...@@ -893,15 +893,7 @@ class structure
void validate_atoms() const; void validate_atoms() const;
private: // TODO: make this protected?
friend polymer;
friend residue;
std::string insert_compound(const std::string &compoundID, bool is_entity);
std::string create_entity_for_branch(branch &branch);
void load_data();
void load_atoms_for_model(StructureOpenOptions options); void load_atoms_for_model(StructureOpenOptions options);
...@@ -913,6 +905,16 @@ class structure ...@@ -913,6 +905,16 @@ class structure
atom &emplace_atom(atom &&atom); atom &emplace_atom(atom &&atom);
private:
friend polymer;
friend residue;
std::string insert_compound(const std::string &compoundID, bool is_entity);
std::string create_entity_for_branch(branch &branch);
void load_data();
void remove_atom(atom &a, bool removeFromResidue); void remove_atom(atom &a, bool removeFromResidue);
void remove_sugar(sugar &sugar); void remove_sugar(sugar &sugar);
......
...@@ -2331,6 +2331,11 @@ _test.text ...@@ -2331,6 +2331,11 @@ _test.text
'data_dinges' 'data_dinges'
'blablaglobal_bla' 'blablaglobal_bla'
boo.data_.whatever boo.data_.whatever
'data_.whatever'
'stop_'
'loop_'
'global_'
'_with.leading_underscore'
)"_cf; )"_cf;
auto &db1 = data1.front(); auto &db1 = data1.front();
...@@ -2344,8 +2349,13 @@ boo.data_.whatever ...@@ -2344,8 +2349,13 @@ boo.data_.whatever
{ "stop_the_crap", false }, { "stop_the_crap", false },
{ "and stop_ this too", false }, { "and stop_ this too", false },
{ "data_dinges", false }, { "data_dinges", false },
{ "blablaglobal_bla", false }, { "blablaglobal_bla", true },
{ "boo.data_.whatever", true } { "boo.data_.whatever", true },
{ "data_.whatever", false },
{ "stop_", false },
{ "loop_", false },
{ "global_", false },
{ "_with.leading_underscore", false }
}; };
BOOST_CHECK_EQUAL(test1.size(), sizeof(kS) / sizeof(T)); BOOST_CHECK_EQUAL(test1.size(), sizeof(kS) / sizeof(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