Merged mmCIF: drop the scaled unmerged block
The unmerged observations already leave a run as the unmerged MTZ (and the scaled fulls as the .hkl), and deposition does not come straight from rugnux, so the _diffrn_refln block made the .cif up to ten times larger for no consumer. The .cif is one data block again; the keys, software rows, metadata, R_merge/R_pim/CC* and provenance stay. ScaledFull loses the scale and frame it carried only for that block. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SVmAWnzCmRKAXVUCdc4iNi
This commit is contained in:
@@ -232,7 +232,7 @@ TEST_CASE("CC* from CC1/2", "[write_reflections][portable]") {
|
||||
CHECK(std::isnan(CCStar(NAN)));
|
||||
}
|
||||
|
||||
TEST_CASE("Merged mmCIF: PDBx keys, merging R-factors and the scaled unmerged block",
|
||||
TEST_CASE("Merged mmCIF: PDBx keys, merging R-factors and provenance",
|
||||
"[write_reflections][portable]") {
|
||||
jfjoch_test::SyntheticMergeParams params;
|
||||
params.true_space_group = "P 43 21 2";
|
||||
@@ -254,12 +254,6 @@ TEST_CASE("Merged mmCIF: PDBx keys, merging R-factors and the scaled unmerged bl
|
||||
statistics.shells = {shell};
|
||||
statistics.overall = shell;
|
||||
|
||||
// Three fulls, one without a usable sigma - that one is left out, as from the .hkl.
|
||||
const std::vector<ScaledFull> fulls{
|
||||
{1, 2, 3, 200.0f, 20.0f, 1.25f, 0.4f},
|
||||
{-1, -2, -3, 100.0f, 12.0f, 0.8f, 9.6f},
|
||||
{4, 5, 6, 10.0f, 0.0f, 1.0f, 3.0f},
|
||||
};
|
||||
OutputProvenance provenance;
|
||||
provenance.collection_date = "2026-07-13T13:48:52.413Z";
|
||||
provenance.command_line = "rugnux -o 'my run' /data/x_master.h5";
|
||||
@@ -268,11 +262,11 @@ TEST_CASE("Merged mmCIF: PDBx keys, merging R-factors and the scaled unmerged bl
|
||||
|
||||
const auto path = (std::filesystem::temp_directory_path() / "rugnux_merged_test.cif").string();
|
||||
WriteMmcifReflections(reflections, TETRAGONAL_CELL, experiment, statistics, ErrorModelReport{},
|
||||
TwinningAnalysisResult{}, fulls, provenance, path, 2);
|
||||
TwinningAnalysisResult{}, provenance, path, 2);
|
||||
gemmi::cif::Document doc = gemmi::read_cif_gz(path);
|
||||
std::filesystem::remove(path);
|
||||
|
||||
REQUIRE(doc.blocks.size() == 2);
|
||||
REQUIRE(doc.blocks.size() == 1);
|
||||
gemmi::cif::Block &merged = doc.blocks[0];
|
||||
CHECK(merged.name == "sample");
|
||||
CHECK(*merged.find_value("_reflns.pdbx_ordinal") == "1");
|
||||
@@ -301,18 +295,6 @@ TEST_CASE("Merged mmCIF: PDBx keys, merging R-factors and the scaled unmerged bl
|
||||
CHECK(shells[0][1] == "0.0500");
|
||||
CHECK(shells[0][2] == "0.0300");
|
||||
|
||||
gemmi::cif::Block &unmerged = doc.blocks[1];
|
||||
CHECK(unmerged.name == "sample_unmerged");
|
||||
gemmi::cif::Table obs = unmerged.find("_diffrn_refln.", {"id", "pdbx_image_id", "index_h",
|
||||
"intensity_net", "intensity_sigma",
|
||||
"pdbx_scale_value"});
|
||||
REQUIRE(obs.length() == 2);
|
||||
CHECK(obs[0][0] == "1");
|
||||
CHECK(obs[0][1] == "1"); // peaks on frame 0.4 -> image 1
|
||||
CHECK(obs[1][1] == "11"); // 9.6 -> image 11
|
||||
CHECK(obs[1][2] == "-1");
|
||||
CHECK(gemmi::cif::as_number(obs[0][3]) == Catch::Approx(200.0));
|
||||
CHECK(gemmi::cif::as_number(obs[1][5]) == Catch::Approx(0.8));
|
||||
}
|
||||
|
||||
TEST_CASE("MTZ history: command line and input, in records of at most 80 characters",
|
||||
|
||||
Reference in New Issue
Block a user