rugnux: no .ccp4 map files - the maps are given as coefficients in _maps.mtz only
A model validation no longer writes <prefix>_2fofc.ccp4, _fofc.ccp4 and _anom.ccp4 (nor their _mr twins); <prefix>_maps.mtz, which Coot and PyMOL open as maps, is what is written. With the files goes everything that only existed for them: ModelMaps keeps the coefficients alone, the keep_map_grids switch is gone from the validation schedule and the rugnux config, and the mFo-DFc map is no longer transformed to real space at all (nothing read it). The 2mFo-DFc and anomalous maps are still made, for the mean atom density and the anomalous-site read-out. The anomalous difference map is now in no output file: _maps.mtz carries no anomalous columns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PXc1zD1yxHqaR1DGdCTHL4
This commit is contained in:
1 parent
8261b7354e
commit
80ed784d1d
13 files changed
+28
-79
No files matched your search
@@ -1697,9 +1697,8 @@ ModelValidationResult Validate(const std::vector<MergedReflection> &merged,
|
||||
result.mean_fom = sigma_a.mean_fom;
|
||||
result.sigma_a_shells = sigma_a.shells;
|
||||
|
||||
gemmi::AsuData<std::complex<float>> map2fofc, mapfofc;
|
||||
gemmi::AsuData<std::complex<float>> map2fofc;
|
||||
map2fofc.unit_cell_ = ucell; map2fofc.spacegroup_ = sg;
|
||||
mapfofc.unit_cell_ = ucell; mapfofc.spacegroup_ = sg;
|
||||
std::vector<float> fwt(terms.size()), delfwt(terms.size());
|
||||
for (size_t i = 0; i < terms.size(); i++) {
|
||||
const double m = sigma_a.weight[i].m, D = sigma_a.weight[i].d;
|
||||
@@ -1710,7 +1709,6 @@ ModelValidationResult Validate(const std::vector<MergedReflection> &merged,
|
||||
delfwt[i] = static_cast<float>(m * terms[i].fo - D * terms[i].fc);
|
||||
const std::complex<float> ph = std::polar(1.0f, static_cast<float>(terms[i].phi));
|
||||
map2fofc.v.push_back({terms[i].hkl, fwt[i] * ph});
|
||||
mapfofc.v.push_back({terms[i].hkl, delfwt[i] * ph});
|
||||
}
|
||||
|
||||
// A validation started before the one it follows had decided makes no maps until that one has,
|
||||
@@ -1728,13 +1726,9 @@ ModelValidationResult Validate(const std::vector<MergedReflection> &merged,
|
||||
if (!maps_superseded) {
|
||||
maps = std::make_shared<ModelMaps>();
|
||||
// --- make the maps and score the 2mFo-DFc map at atom centres (a real map peaks there) ---
|
||||
// The three maps - this one, the difference map and the anomalous map - share nothing but what
|
||||
// they read, so the other two are made on threads of their own beside this one. Nothing here
|
||||
// reads the difference map, so it is made only where it is kept.
|
||||
std::future<void> fofc_map = std::async(std::launch::async, [&] {
|
||||
if (schedule.keep_map_grids)
|
||||
maps->map_fofc = map_from_coefficients(mapfofc, sf_gpu);
|
||||
});
|
||||
// This map and the anomalous map share nothing but what they read, so the anomalous one is made
|
||||
// on a thread of its own beside this one. Nothing here reads the difference map: its coefficients
|
||||
// go to the file, the map is not made.
|
||||
|
||||
// --- anomalous difference map, where the merge kept the Bijvoet split ---
|
||||
// Coefficients F(+) - F(-) carried on the model phase turned back by 90 degrees. Its peaks sit on
|
||||
@@ -1749,8 +1743,6 @@ ModelValidationResult Validate(const std::vector<MergedReflection> &merged,
|
||||
if (!mapanom.v.empty()) {
|
||||
gemmi::Grid<float> grid = map_from_coefficients(mapanom, sf_gpu);
|
||||
read_anomalous_map(grid, map_rms(grid), st, result);
|
||||
if (schedule.keep_map_grids)
|
||||
maps->map_anom = std::move(grid);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1764,9 +1756,6 @@ ModelValidationResult Validate(const std::vector<MergedReflection> &merged,
|
||||
for (gemmi::Atom &a : r.atoms) { s += grid2fofc.interpolate_value(a.pos, MAP_INTERPOLATION_ORDER); ++n; }
|
||||
result.mean_atom_density_sigma = (n > 0 && rms2 > 0) ? (s / n) / rms2 : 0;
|
||||
}
|
||||
if (schedule.keep_map_grids)
|
||||
maps->map_2fofc = std::move(grid2fofc);
|
||||
fofc_map.get();
|
||||
anomalous_map.get();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user