Skip to content

Commit

Permalink
repaired bug in local symmetry of auto-refine, reported by Nicholas V…
Browse files Browse the repository at this point in the history
…angos
  • Loading branch information
scheres committed Aug 30, 2023
1 parent 0b03a6f commit 7809a73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/ml_optimiser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4446,11 +4446,11 @@ void MlOptimiser::symmetriseReconstructions()

void MlOptimiser::applyLocalSymmetryForEachRef()
{
if ( (fn_local_symmetry_masks.size() < 1) || (fn_local_symmetry_operators.size() < 1) )
if ( (fn_local_symmetry_masks.size() == 0) || (fn_local_symmetry_operators.size() == 0) )
return;

if (verb > 0)
std::cout << " Applying local symmetry in real space according to " << fn_local_symmetry_operators.size() << " operators..." << std::endl;
std::cout << " Applying local symmetry in real space..." << std::endl;

for (int ibody = 0; ibody < mymodel.nr_bodies; ibody++)
{
Expand Down
8 changes: 4 additions & 4 deletions src/ml_optimiser_mpi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2093,7 +2093,7 @@ void MlOptimiserMpi::maximization()
}

// Apply local symmetry according to a list of masks and their operators
if ( (fn_local_symmetry_masks.size() >= 1) && (fn_local_symmetry_operators.size() >= 1) && (!has_converged) )
if ( (fn_local_symmetry_masks.size() != 0) && (fn_local_symmetry_operators.size() != 0) && (!has_converged) )
applyLocalSymmetry(mymodel.Iref[ith_recons], fn_local_symmetry_masks, fn_local_symmetry_operators);

// Shaoda Jul26,2015 - Helical symmetry local refinement
Expand Down Expand Up @@ -2225,7 +2225,7 @@ void MlOptimiserMpi::maximization()
}

// Apply local symmetry according to a list of masks and their operators
if ( (fn_local_symmetry_masks.size() >= 1) && (fn_local_symmetry_operators.size() >= 1) && (!has_converged) )
if ( (fn_local_symmetry_masks.size() != 0) && (fn_local_symmetry_operators.size() != 0) && (!has_converged) )
applyLocalSymmetry(mymodel.Iref[ith_recons], fn_local_symmetry_masks, fn_local_symmetry_operators);

// Shaoda Jul26,2015 - Helical symmetry local refinement
Expand Down Expand Up @@ -3543,8 +3543,8 @@ void MlOptimiserMpi::iterate()
}
symmetriseReconstructions();

if ( (verb > 0) && (node->isLeader()) && (fn_local_symmetry_masks.size() >= 1) && (fn_local_symmetry_operators.size() >= 1) )
std::cout << " Applying local symmetry in real space according to " << fn_local_symmetry_operators.size() << " operators..." << std::endl;
if ( (verb > 0) && (node->isLeader()) && (fn_local_symmetry_masks.size() != 0) && (fn_local_symmetry_operators.size() != 0) )
std::cout << " Applying local symmetry in real space..." << std::endl;

// Write out data and weight arrays to disc in order to also do an unregularized reconstruction
#ifndef DEBUG_RECONSTRUCTION
Expand Down

0 comments on commit 7809a73

Please sign in to comment.