// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include #include "gemmi/model.hpp" #include "gemmi/symmetry.hpp" #include "../common/UnitCell.h" class Logger; // Write `placed` - the atomic model as ValidateAgainstModel left it, re-fractionalized into the data // cell and moved by the rigid-body step - to `output_prefix`_model.cif, and to `_model.pdb` as well where a PDB can express the cell. Everything the input carried // comes with it: chains, residues, ligands, waters, B-factors, occupancies, anisotropic Us. // // `cell` and `space_group` must be the ones the reflection files beside it are written in, i.e. the // unit cell and DiffractionExperiment::GetSpaceGroupOrP1() that WriteReflections is given after // AdoptModelFrame has settled the enantiomorph. The cell is always taken; the group is taken wherever // the model's coordinates obey it, which is the ordinary case. Where they do not - data merged in a // supergroup of the model's group, or in the other hand - the model keeps its own group and a warning // says the two files disagree, because a label whose operations the coordinates contradict makes a // refinement program build a different structure and say nothing. void WritePlacedModel(const gemmi::Structure &placed, const UnitCell &cell, const gemmi::SpaceGroup &space_group, const std::string &output_prefix, Logger &logger);