From c20d0d2a308c8ad9c8a6316872062c86c536726f Mon Sep 17 00:00:00 2001 From: "Maarten L. Hekkelman" Date: Tue, 12 Aug 2025 16:45:19 +0200 Subject: [PATCH] lightweight fixup --- changelog | 2 ++ include/cif++/pdb.hpp | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/changelog b/changelog index c039305..524c92e 100644 --- a/changelog +++ b/changelog @@ -4,6 +4,8 @@ Version 9.0.0 using the correct mapping between atom_site and residues. - _atom_site.auth_alt_id does not exist, it should be _atom_site.pdbx_auth_alt_id of course. +- Added a more lightweight fixup for mmcif_pdbx files + that lack certain categories. Version 8.0.1 - Fix cif::mm::structure::cleanup_empty_categories, removed too much diff --git a/include/cif++/pdb.hpp b/include/cif++/pdb.hpp index 89ceec1..29f73b4 100644 --- a/include/cif++/pdb.hpp +++ b/include/cif++/pdb.hpp @@ -104,6 +104,27 @@ inline void write(const std::filesystem::path &p, const file &f) // -------------------------------------------------------------------- +/** + * @brief Quickly fix a PDB file that lacks some often needed categories + * + * This differs from reconstruct_pdbx which does a much more thorough job + * + * \param pdbx_file The cif::file that hopefully contains some valid data + */ + +void fixup_pdbx(file &pdbx_file); + +/** + * @brief Quickly fix a PDB file that lacks some often needed categories + * + * This differs from reconstruct_pdbx which does a much more thorough job + * + * \param pdbx_file The cif::file that hopefully contains some valid data + * \param v The validator to use + */ + +void fixup_pdbx(file &pdbx_file, const validator &v); + /** \brief Reconstruct all missing categories for an assumed PDBx file. * * Some people believe that simply dumping some atom records is enough.