Commit f6e05689 by Maarten L. Hekkelman

start reconstructing

parent 098f3fd4
...@@ -950,4 +950,11 @@ class structure ...@@ -950,4 +950,11 @@ class structure
std::vector<residue> m_non_polymers; std::vector<residue> m_non_polymers;
}; };
// --------------------------------------------------------------------
/// \brief Reconstruct all missing categories for an assumed PDBx file.
/// Some people believe that simply dumping some atom records is enough.
/// \param db The cif::datablock that hopefully contains some valid data
void reconstruct_pdbx(datablock &db);
} // namespace cif::mm } // namespace cif::mm
...@@ -2678,4 +2678,14 @@ void structure::validate_atoms() const ...@@ -2678,4 +2678,14 @@ void structure::validate_atoms() const
assert(atoms.empty()); assert(atoms.empty());
} }
// --------------------------------------------------------------------
void reconstruct_pdbx(datablock &db)
{
if (db.get("atom_site") == nullptr)
throw std::runtime_error("Cannot reconstruct PDBx file, atom data missing");
}
} // namespace pdbx } // namespace pdbx
...@@ -6240,4 +6240,4 @@ file read(const std::filesystem::path &file) ...@@ -6240,4 +6240,4 @@ file read(const std::filesystem::path &file)
} }
} }
} // namespace pdbx } // namespace pdbx
\ No newline at end of file
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