Skip to content

Commit

Permalink
mtz2cif: clarify combination of --depo and --spec
Browse files Browse the repository at this point in the history
  • Loading branch information
wojdyr committed Apr 13, 2022
1 parent ca803c8 commit 924c99a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion include/gemmi/mtz2cif.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,11 @@ inline void MtzToCif::write_cif(const Mtz& mtz, const Mtz* mtz2,

os << "\n\n_entry.id " << entry_id << "\n\n";

write_special_marker_if_requested(os, merged);
// If we have user-provided spec file, we don't take responsibility
// for the result. (The spec is used for merged data only, so we can
// add the merker in unmerged block).
if (spec_lines.empty() || !merged)
write_special_marker_if_requested(os, merged);

std::vector<Trans> recipe;
if (merged)
Expand Down Expand Up @@ -778,6 +782,9 @@ inline void MtzToCif::write_cif(const Mtz& mtz, const Mtz* mtz2,
if (merged)
write_main_loop(*merged, recipe, buf, os);
if (unmerged) {
// if --depo flag is used, the spec file is for the merged data only
if (write_special_marker_for_pdb)
spec_lines.clear();
prepare_recipe(*unmerged, recipe);
write_main_loop(*unmerged, recipe, buf, os);
}
Expand Down

0 comments on commit 924c99a

Please sign in to comment.