// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include #include "../image_analysis/structure_refinement/RugnuxModel.h" // The atomic model of a run from the bytes of its file: PDB or mmCIF, gzipped or not, the format taken from // the content, never from a name. `pae_json` is the AlphaFold DB's predicted-aligned-error JSON of a // prediction, empty where there is none; one that cannot be read is left out, as one never given. `name` is // what the report calls the model, and what gemmi names a PDB structure after. Throws where the bytes hold no // atomic model. RugnuxModel ParseRugnuxModel(const std::string &bytes, const std::string &name, const std::string &pae_json = {}); // The model file at `path`, with the predicted aligned error the AlphaFold DB puts beside it where it is there // (PaePathFor). Named by `path`. RugnuxModel ReadRugnuxModelFile(const std::string &path); // The PAE file the AlphaFold DB puts beside a model: AF--F1-model_v.cif -> // AF--F1-predicted_aligned_error_v.json in the same directory; empty where the name does not follow it. std::string PaePathFor(const std::string &model_path);