diff --git a/rugnux/rugnux_cli.cpp b/rugnux/rugnux_cli.cpp index bba857edf..3238a24fd 100644 --- a/rugnux/rugnux_cli.cpp +++ b/rugnux/rugnux_cli.cpp @@ -939,6 +939,7 @@ struct RugnuxCli { bool anomalous_mode = false; const gemmi::SpaceGroup *space_group = nullptr; std::optional fixed_reference_unit_cell; + bool unit_cell_typed = false; // -C on the command line, not a cell a joint run hands a sweep std::optional fixed_lattice_system; // from a -C cell without -S std::optional max_spot_count_override; float sigma_spot_finding = SpotFindingSettings{}.signal_to_noise_threshold; @@ -1259,6 +1260,7 @@ int RugnuxCli::Parse(int argc, char **argv) { exit(EXIT_FAILURE); } fixed_reference_unit_cell = uc; + unit_cell_typed = true; logger.Info( "Fixed reference unit cell set: a={:.3f} b={:.3f} c={:.3f} alpha={:.3f} beta={:.3f} gamma={:.3f}", uc->a, uc->b, uc->c, uc->alpha, uc->beta, uc->gamma); @@ -2006,8 +2008,9 @@ int RugnuxInputRun::PrepareRugnuxInput() { // never above or below, and only the space group within it is searched. Three 90s: orthorhombic, // or tetragonal / cubic where the lengths are equal within the usual tolerance; two 90s and a // 120: hexagonal; two 90s: monoclinic; three equal angles: rhombohedral; anything else names a - // triclinic lattice, whose group is P 1 - and the run then goes as with -S P1. - if (fixed_reference_unit_cell && space_group == nullptr) { + // triclinic lattice, whose group is P 1 - and the run then goes as with -S P1. Only a cell typed by + // the user: a measured cell a joint run hands a sweep to process again has no literal angles. + if (fixed_reference_unit_cell && unit_cell_typed && space_group == nullptr) { const auto &c = *fixed_reference_unit_cell; const int n90 = (c.alpha == 90.0f) + (c.beta == 90.0f) + (c.gamma == 90.0f); const bool has120 = c.alpha == 120.0f || c.beta == 120.0f || c.gamma == 120.0f;