Commit e866228a by Maarten L. Hekkelman

In reconstruct, use embedded compound info

parent 4aeaa525
...@@ -468,8 +468,12 @@ void reconstruct_pdbx(file &file, std::string_view dictionary) ...@@ -468,8 +468,12 @@ void reconstruct_pdbx(file &file, std::string_view dictionary)
if (file.empty()) if (file.empty())
throw std::runtime_error("Cannot reconstruct PDBx, file seems to be empty"); throw std::runtime_error("Cannot reconstruct PDBx, file seems to be empty");
// assuming the first datablock contains the entry ...
auto &db = file.front(); auto &db = file.front();
// ... and any additional datablock will contain compound information
cif::compound_source cs(file);
if (db.get("atom_site") == nullptr) if (db.get("atom_site") == nullptr)
throw std::runtime_error("Cannot reconstruct PDBx file, atom data missing"); throw std::runtime_error("Cannot reconstruct PDBx file, atom data missing");
......
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