Commit d633622e by Maarten L. Hekkelman

Creating new nonpoly compounds

parent 4c99710f
...@@ -81,10 +81,11 @@ endif() ...@@ -81,10 +81,11 @@ endif()
# When CCP4 is sourced in the environment, we can recreate the symmetry operations table # When CCP4 is sourced in the environment, we can recreate the symmetry operations table
if(EXISTS "${CCP4}") if(EXISTS "${CCP4}")
option(RECREATE_SYMOP_DATA "Recreate SymOp data table in case it is out of date" ON)
if(RECREATE_SYMOP_DATA AND NOT EXISTS "${CLIBD}/syminfo.lib") if(RECREATE_SYMOP_DATA AND NOT EXISTS "${CLIBD}/syminfo.lib")
message(FATAL_ERROR "Symop data table recreation requested, but file syminfo.lib was not found in ${CLIBD}") message(WARNING "Symop data table recreation requested, but file syminfo.lib was not found in ${CLIBD}")
set(RECREATE_SYMOP_DATA OFF)
else()
option(RECREATE_SYMOP_DATA "Recreate SymOp data table in case it is out of date" ON)
endif() endif()
else() else()
message("Not trying to recreate SymOpTable_data.hpp since CCP4 is not defined") message("Not trying to recreate SymOpTable_data.hpp since CCP4 is not defined")
......
...@@ -2354,8 +2354,6 @@ conditional_iterator_proxy<CategoryType, Ts...>::conditional_iterator_proxy(Cate ...@@ -2354,8 +2354,6 @@ conditional_iterator_proxy<CategoryType, Ts...>::conditional_iterator_proxy(Cate
{ {
static_assert(sizeof...(Ts) == sizeof...(Ns), "Number of column names should be equal to number of requested value types"); static_assert(sizeof...(Ts) == sizeof...(Ns), "Number of column names should be equal to number of requested value types");
size_t N = sizeof...(Ns);
mCondition.prepare(cat); mCondition.prepare(cat);
while (mCBegin != mCEnd and not mCondition(*mCat, mCBegin.row())) while (mCBegin != mCEnd and not mCondition(*mCat, mCBegin.row()))
......
...@@ -2216,7 +2216,7 @@ std::string Structure::insertCompound(const std::string &compoundID, bool isEnti ...@@ -2216,7 +2216,7 @@ std::string Structure::insertCompound(const std::string &compoundID, bool isEnti
catch(const std::exception& ex) catch(const std::exception& ex)
{ {
auto &entity = db["entity"]; auto &entity = db["entity"];
entity_id = std::to_string(entity.size() + 1); entity_id = entity.getUniqueID("");
entity.emplace({ entity.emplace({
{"id", entity_id}, {"id", entity_id},
...@@ -2474,9 +2474,11 @@ std::string Structure::createNonpoly(const std::string &entity_id, const std::ve ...@@ -2474,9 +2474,11 @@ std::string Structure::createNonpoly(const std::string &entity_id, const std::ve
for (auto& atom: atoms) for (auto& atom: atoms)
{ {
atom_site.emplace({ auto atom_id = atom_site.getUniqueID("");
auto &&[row, inserted ] = atom_site.emplace({
{ "group_PDB", atom.property<std::string>("group_PDB") }, { "group_PDB", atom.property<std::string>("group_PDB") },
{ "id", atom_site.getUniqueID("") }, { "id", atom_id },
{ "type_symbol", atom.property<std::string>("type_symbol") }, { "type_symbol", atom.property<std::string>("type_symbol") },
{ "label_atom_id", atom.property<std::string>("label_atom_id") }, { "label_atom_id", atom.property<std::string>("label_atom_id") },
{ "label_alt_id", atom.property<std::string>("label_alt_id") }, { "label_alt_id", atom.property<std::string>("label_alt_id") },
...@@ -2497,8 +2499,12 @@ std::string Structure::createNonpoly(const std::string &entity_id, const std::ve ...@@ -2497,8 +2499,12 @@ std::string Structure::createNonpoly(const std::string &entity_id, const std::ve
{ "auth_atom_id", atom.property<std::string>("label_atom_id") }, { "auth_atom_id", atom.property<std::string>("label_atom_id") },
{ "pdbx_PDB_model_num", 1 } { "pdbx_PDB_model_num", 1 }
}); });
mAtoms.emplace_back(new AtomImpl(db, atom_id, row));
} }
mNonPolymers.emplace_back(*this, comp_id, asym_id);
return asym_id; return asym_id;
} }
......
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