Commit 74bd2585 by Maarten L. Hekkelman

renaming, nonpoly_scheme

parent ebb27638
...@@ -2541,15 +2541,24 @@ void Category::update_value(RowSet &&rows, const std::string &tag, const std::st ...@@ -2541,15 +2541,24 @@ void Category::update_value(RowSet &&rows, const std::string &tag, const std::st
check = std::move(check) && Key(ck) == parent[pk].c_str(); check = std::move(check) && Key(ck) == parent[pk].c_str();
} }
std::cerr << check << std::endl;
if (childCat->exists(std::move(check))) // phew..., narrow escape if (childCat->exists(std::move(check))) // phew..., narrow escape
continue; continue;
// create the actual copy // create the actual copy, if we can...
if (childCat->mCatValidator != nullptr and childCat->mCatValidator->mKeys.size() == 1)
{
auto copy = childCat->copyRow(child); auto copy = childCat->copyRow(child);
if (copy != child) if (copy != child)
process.push_back(child); process.push_back(child);
} }
// cannot update this...
if (cif::VERBOSE)
std::cerr << "Cannot update child " << childCat->mName << "." << childTag << " with value " << value << std::endl;
}
// finally, update the children // finally, update the children
if (not process.empty()) if (not process.empty())
childCat->update_value(std::move(process), childTag, value); childCat->update_value(std::move(process), childTag, value);
......
...@@ -2289,7 +2289,10 @@ void Structure::changeResidue(const Residue& res, const std::string& newCompound ...@@ -2289,7 +2289,10 @@ void Structure::changeResidue(const Residue& res, const std::string& newCompound
auto &pdbxNonPolyScheme = db["pdbx_nonpoly_scheme"]; auto &pdbxNonPolyScheme = db["pdbx_nonpoly_scheme"];
for (auto &nps : pdbxNonPolyScheme.find("asym_id"_key == asymID)) for (auto &nps : pdbxNonPolyScheme.find("asym_id"_key == asymID))
{
nps.assign("mon_id", newCompound, true);
nps.assign("entity_id", entityID, true); nps.assign("entity_id", entityID, true);
}
// create rest // create rest
auto& chemComp = db["chem_comp"]; auto& chemComp = db["chem_comp"];
......
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