IndexAndRefine: Reorder monoclinic cell

This commit is contained in:
2026-03-03 15:17:22 +01:00
parent 04f491c60d
commit b1861339c6
2 changed files with 7 additions and 3 deletions
+4 -1
View File
@@ -76,8 +76,8 @@ void RotationIndexer::TryIndex() {
if (!indexer_result.lattice.empty()) {
// Find lattice type
search_result_ = LatticeSearch(indexer_result.lattice[0]);
// Run refinement
// Run refinement
DiffractionExperiment experiment_copy(experiment);
XtalOptimizerData data{
.geom = experiment_copy.GetDiffractionGeometry(),
@@ -95,6 +95,8 @@ void RotationIndexer::TryIndex() {
if (data.crystal_system == gemmi::CrystalSystem::Trigonal)
data.crystal_system = gemmi::CrystalSystem::Hexagonal;
if (data.crystal_system == gemmi::CrystalSystem::Monoclinic)
data.latt.ReorderMonoclinic();
if (XtalOptimizer(data, v_sel)) {
indexed_lattice = data.latt;
updated_geom_ = data.geom;
@@ -132,6 +134,7 @@ std::optional<RotationIndexerResult> RotationIndexer::ProcessImage(int64_t image
}
if (!indexed_lattice)
return {};
return RotationIndexerResult{
.lattice = indexed_lattice.value(),
.search_result = search_result_,