IndexAndRefine: Reorder monoclinic cell
This commit is contained in:
@@ -83,8 +83,6 @@ IndexAndRefine::IndexingOutcome IndexAndRefine::DetermineLatticeAndSymmetry(Data
|
||||
};
|
||||
outcome.lattice_candidate = sym_result.conventional;
|
||||
|
||||
if (sym_result.system == gemmi::CrystalSystem::Monoclinic)
|
||||
outcome.lattice_candidate->ReorderMonoclinic();
|
||||
}
|
||||
|
||||
return outcome;
|
||||
@@ -128,6 +126,9 @@ void IndexAndRefine::RefineGeometryIfNeeded(DataMessage &msg, IndexAndRefine::In
|
||||
|
||||
outcome.lattice_candidate = data.latt;
|
||||
|
||||
if (outcome.symmetry.crystal_system == gemmi::CrystalSystem::Monoclinic)
|
||||
outcome.lattice_candidate->ReorderMonoclinic();
|
||||
|
||||
if (outcome.beam_center_updated) {
|
||||
msg.beam_corr_x = data.beam_corr_x;
|
||||
msg.beam_corr_y = data.beam_corr_y;
|
||||
|
||||
@@ -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_,
|
||||
|
||||
Reference in New Issue
Block a user