diff --git a/image_analysis/lattice_search/LatticeSearch.cpp b/image_analysis/lattice_search/LatticeSearch.cpp index b60c3c388..de3e127c3 100644 --- a/image_analysis/lattice_search/LatticeSearch.cpp +++ b/image_analysis/lattice_search/LatticeSearch.cpp @@ -480,10 +480,19 @@ std::optional SearchCharacters(const CrystalLattice &L, dou // class than the table, take it - held to this call's own tolerances, so a search that grants no // length equality still grants none. // + // Only for a class that equates lengths (tetragonal, trigonal, hexagonal, cubic): those are the + // lattices whose degenerate shortest vectors give the table more than one reduced cell. A class + // carried by its angles alone the table reads on any of them, and where it refuses one the + // two-folds would grant, the angle is not there: measured on monoclinic crystals with + // pseudo-orthorhombic metrics (and a triclinic one with a pseudo-I-orthorhombic one), Le Page + // promoted at 0.2-1 deg obliquity, the constrained cell was integrated and every one merged + // worse (ISa 46 -> 17 on one, CC1/2 0.98 -> 0.45 on another). + // // A tetragonal or cubic cell refused only on its length equality is, on its angles alone, the // orthorhombic lattice of the same centring in the same basis - the class a search granting no // length equality has to return, as the table did for the settings it could read. - if (auto lp = LePageLattice(L, std::min(angle_tolerance, LATTICE_MAX_OBLIQUITY_DEG))) { + if (auto lp = LePageLattice(L, std::min(angle_tolerance, LATTICE_MAX_OBLIQUITY_DEG)); + lp && ClassImposesLengthEquality(lp->system)) { const auto [angle, length] = ClassMetricDeparture(lp->conventional.GetUnitCell(), lp->system); if (length > dist_tolerance && (lp->system == gemmi::CrystalSystem::Tetragonal || lp->system == gemmi::CrystalSystem::Cubic))