@@ -1723,6 +1723,7 @@ void Species::_ValidateNonNeutralCaches(const std::vector<slim_trait_index_t> &p
17231723 MutationBlock *mutation_block = mutation_block_;
17241724 Mutation *mut_block_ptr = mutation_block->mutation_buffer_;
17251725 const std::map<slim_objectid_t,MutationType*> &mut_types = MutationTypes();
1726+ bool local_doing_mutrun_experiments = DoingAnyMutationRunExperiments();
17261727
17271728 for (Chromosome *chromosome : chromosomes_)
17281729 {
@@ -1888,7 +1889,7 @@ void Species::_ValidateNonNeutralCaches(const std::vector<slim_trait_index_t> &p
18881889 int64_t mutations_cached = 0, mutations_omitted = 0, mutations_summarized = 0;
18891890#endif
18901891
1891- if (DoingAnyMutationRunExperiments() ) chromosome->StartMutationRunExperimentClock();
1892+ if (local_doing_mutrun_experiments ) chromosome->StartMutationRunExperimentClock();
18921893
18931894 int mutrun_context_count = chromosome->ChromosomeMutationRunContextCount();
18941895
@@ -2077,7 +2078,7 @@ void Species::_ValidateNonNeutralCaches(const std::vector<slim_trait_index_t> &p
20772078#endif
20782079 }
20792080
2080- if (DoingAnyMutationRunExperiments() ) chromosome->StopMutationRunExperimentClock("ValidateNonNeutralCaches()");
2081+ if (local_doing_mutrun_experiments ) chromosome->StopMutationRunExperimentClock("ValidateNonNeutralCaches()");
20812082
20822083#if SLIM_PROFILE_NONNEUTRAL_CACHES()
20832084 // FIXME MULTITRAIT: would be nice to use total_run_count in the profile output too!
@@ -5346,8 +5347,6 @@ void Species::MaintainTreeSequence(void)
53465347void Species::EmptyGraveyard(void)
53475348{
53485349 // Individuals end up in graveyard_ due to killIndividuals(); they get disposed of here.
5349- // It's not necessary that FreeSubpopIndividual() be called on the correct subpopulation, really,
5350- // but that API is at the Subpopulation level instead of in Species for efficiency, so...
53515350 for (Individual *individual : graveyard_)
53525351 individual->subpopulation_->FreeSubpopIndividual(individual);
53535352
@@ -5518,8 +5517,9 @@ void Species::nonWF_GenerateOffspring(void)
55185517 bool recording_tree_sequence = RecordingTreeSequence();
55195518 bool has_callbacks = ((reproduction_callbacks.size() > 0) || (modify_child_callbacks.size() > 0) || (recombination_callbacks.size() > 0) || (mutation_callbacks.size() > 0));
55205519 bool is_spatial = (SpatialDimensionality() >= 1);
5520+ bool local_doing_mutrun_experiments = DoingAnyMutationRunExperiments();
55215521
5522- if (DoingAnyMutationRunExperiments() )
5522+ if (local_doing_mutrun_experiments )
55235523 {
55245524 if (pedigrees_enabled)
55255525 {
@@ -6005,6 +6005,17 @@ void Species::nonWF_ViabilitySurvival(void)
60056005 population_.InvalidateMutationReferencesCache();
60066006}
60076007
6008+ bool Species::DoingAnyMutationRunExperiments(void) const
6009+ {
6010+ // BCH 7/21/2026: We want to allow some operations to be done in the Eidos console that would normally
6011+ // be measured for mutrun experiments, so here we disable mutrun experiments when between ticks.
6012+ // NOTE: For this reason, doing_any_mutrun_experiments_ should not be consulted directly!
6013+ if (community_.CycleStage() == SLiMCycleStage::kStagePostCycle)
6014+ return false;
6015+
6016+ return doing_any_mutrun_experiments_;
6017+ }
6018+
60086019void Species::FinishMutationRunExperimentTimings(void)
60096020{
60106021 for (Chromosome *chromosome : chromosomes_)
0 commit comments