rugnux: the model is parsed by the caller and handed in as RugnuxModel
The analysis read the --model file itself, four to five times per run (the model kind, every validation, molecular replacement, the stills reference intensities) and located the PAE sidecar from the file name. The library is to do no file I/O, so the model now arrives in memory: - RugnuxModel (image_analysis/structure_refinement/RugnuxModel.h): the gemmi structure as read, whether it is ModelCIF, the PAE matrix where a prediction came with one, and the name the report gives it. - ParseRugnuxModel / ReadRugnuxModelFile (writer/RugnuxModelFile.h, in JFJochRugnuxFiles): bytes in, gzip by magic, PDB/mmCIF by content, _ma_qa_metric detection as before; the file reader takes the PAE JSON from the same place PaePathFor named. - ProcessConfig::model replaces model_path; PrepareSearchModel, RunMolecularReplacement, ValidateAgainstModel and ModelReferenceIntensities take the model; result fields name it by model_name. - rugnux reads the model before the run starts and stops with an error where the file holds no model (it used to run and report the model as not validated). The viewer reads it when the job is set up. - The broker parses an uploaded model at once and answers 400 where it is not one; it keeps the parsed model in memory, with no temporary directory or file. It takes no PAE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f215300a07
commit
4bf41983ed
32 files changed
+352
-242
No files matched your search
@@ -6,6 +6,7 @@
|
||||
#include "JFJochMergeStatsWindow.h"
|
||||
#include "../widgets/ToolbarIcons.h"
|
||||
#include "../../rugnux/RugnuxCommandLine.h"
|
||||
#include "../../writer/RugnuxModelFile.h"
|
||||
#include "../../common/ThreadAffinity.h"
|
||||
|
||||
#include <QApplication>
|
||||
@@ -396,8 +397,6 @@ ProcessConfig JFJochProcessingJobsWindow::buildConfig(const JobSpec &spec, const
|
||||
config.reference_space_group = inputs.reference_space_group;
|
||||
config.reference_path = inputs.reference_path.toStdString();
|
||||
config.reference_column = inputs.reference_column.toStdString();
|
||||
// Validated at the end of the job, when there is an output to write the maps beside.
|
||||
config.model_path = inputs.model_path.toStdString();
|
||||
// Stills geometry-refinement two-pass. The dialog only offers it for a stills-with-cell run
|
||||
// (Rugnux no-ops it otherwise), so honour it whenever set; unset leaves the pass off.
|
||||
if (spec.refine_geometry)
|
||||
@@ -422,7 +421,17 @@ void JFJochProcessingJobsWindow::newJob(ProcessMode mode, CalibrationSelection c
|
||||
if (action == 0)
|
||||
return;
|
||||
|
||||
const ProcessConfig config = buildConfig(spec, inputs);
|
||||
ProcessConfig config = buildConfig(spec, inputs);
|
||||
// Validated at the end of the job, against the merge. Read here, so that a file holding no model is
|
||||
// said at once rather than after the run.
|
||||
if (spec.mode == ProcessMode::FullAnalysis && !inputs.model_path.isEmpty()) {
|
||||
try {
|
||||
config.model = std::make_shared<const RugnuxModel>(ReadRugnuxModelFile(inputs.model_path.toStdString()));
|
||||
} catch (const std::exception &e) {
|
||||
QMessageBox::warning(this, "Processing", QString("Cannot read the model: %1").arg(e.what()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// The experiment carries the panel's indexing settings — including RotationIndexing set by the
|
||||
// rotation axis (needed so IndexAndRefine builds a rotation indexer). On top of that it gets
|
||||
|
||||
Reference in new issue
Block a user