rugnux: say which lattice the first pass rejected
"Two-pass rotation indexing found only a lattice that indexes 2/60 validation frames" tells a user that something went wrong and nothing about what. The commonest cause is a metric symmetry promoted one class too far: the constrained cell then misses every reflection by the small angle the constraint snapped away, and the run dies with no way to see that a centred supercell setting was chosen over the primitive one it should have kept. Print the centring, crystal system and cell that was rejected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+13
-3
@@ -835,12 +835,22 @@ ProcessResult Rugnux::RunPipeline(RugnuxObserver *observer, bool write_output, b
|
||||
// frame in six, several times below the weakest crystal that still merges. It is checked AFTER
|
||||
// the long-axis rescue, so a metric that rescue recovers is never rejected on its pre-rescue
|
||||
// score.
|
||||
if (best.score < static_cast<int>(validation.size()) / 6)
|
||||
if (best.score < static_cast<int>(validation.size()) / 6) {
|
||||
// Name the cell and Bravais class that was rejected. The commonest cause is a metric
|
||||
// symmetry promoted one class too far - the constrained cell then misses every
|
||||
// reflection by the small angle the constraint snapped away - and without the cell in
|
||||
// the message there is nothing to see that from.
|
||||
const auto &c = best.result->search_result.conventional.GetUnitCell();
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
||||
fmt::format("Two-pass rotation indexing found only a lattice that "
|
||||
"indexes {}/{} validation frames - too few for it to be "
|
||||
"this crystal's lattice.{}",
|
||||
best.score, static_cast<int>(validation.size()), next_steps));
|
||||
"this crystal's lattice. It was {}-centred {}, "
|
||||
"{:.2f} {:.2f} {:.2f} {:.2f} {:.2f} {:.2f}.{}",
|
||||
best.score, static_cast<int>(validation.size()),
|
||||
best.result->search_result.centering,
|
||||
gemmi::crystal_system_str(best.result->search_result.system),
|
||||
c.a, c.b, c.c, c.alpha, c.beta, c.gamma, next_steps));
|
||||
}
|
||||
indexer->ForceRotationIndexerResult(*best.result);
|
||||
logger.Info("Two-pass rotation indexing found lattice (scheme '{}': {}/{} validation frames)",
|
||||
best.name, best.score, static_cast<int>(validation.size()));
|
||||
|
||||
Reference in New Issue
Block a user