viewer: subscripted space group and a pathology checklist in the merge window
The space-group hero card (and the "indistinguishable" line) render the short Hermann-Mauguin symbol as rich text: screw axes subscripted, rotoinversions overlined (P2_1/c, P4_12_12, Fd-3m). It is built from gemmi's spaced symbol with short_name()'s monoclinic shortening applied; checked against all 564 gemmi settings to reduce to short_name() once the markup is stripped. The report's SUMMARY now also records its pathology rows as typed checks (ReportDocument::checks): PRESENT exactly when one of the row's codes is in PATHOLOGY_FLAGS, ABSENT when it was measured and did not fire, UNDETERMINED when it could not be measured. A flag no row stands for gets a check named after its code, so the list never shows less than PATHOLOGY_FLAGS. The text report is unchanged. The viewer builds the document once, renders the text from it and shows the checks phenix.xtriage-style: a green/red/grey light per pathology, the summary words and fired warnings in the tooltip. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
JFJochProcessController::JFJochProcessController(QObject *parent) : QObject(parent) {
|
||||
qRegisterMetaType<ProcessResult>("ProcessResult");
|
||||
qRegisterMetaType<std::shared_ptr<const JFJochReaderDataset>>("std::shared_ptr<const JFJochReaderDataset>");
|
||||
qRegisterMetaType<std::vector<ReportCheck>>("std::vector<ReportCheck>");
|
||||
}
|
||||
|
||||
JFJochProcessController::~JFJochProcessController() {
|
||||
@@ -98,19 +99,22 @@ void JFJochProcessController::run_(QString file_path, DiffractionExperiment expe
|
||||
// with WriteResultReport, a run that produced results must not be lost to a report
|
||||
// failure, so a throw here leaves the report empty rather than failing the job.
|
||||
QString report;
|
||||
std::vector<ReportCheck> checks;
|
||||
if (!result.cancelled) {
|
||||
try {
|
||||
RunProvenance provenance;
|
||||
provenance.wall_time_s = run_timer.elapsed() / 1000.0;
|
||||
report = QString::fromStdString(RenderResultReport(
|
||||
output_prefix, file_path.toStdString(), report_experiment, result, provenance));
|
||||
ReportDocument doc = BuildReportDocument(output_prefix, file_path.toStdString(),
|
||||
report_experiment, result, provenance);
|
||||
report = QString::fromStdString(RenderReportText(doc, provenance.developer));
|
||||
checks = std::move(doc.checks);
|
||||
} catch (...) {
|
||||
}
|
||||
}
|
||||
|
||||
active_ = nullptr;
|
||||
running_ = false;
|
||||
emit finished(result, report);
|
||||
emit finished(result, report, checks);
|
||||
} catch (const std::exception &e) {
|
||||
active_ = nullptr;
|
||||
running_ = false;
|
||||
|
||||
Reference in New Issue
Block a user