Ignore:
Timestamp:
Sep 13, 2025, 2:44:01 PM (6 weeks ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
9f1c84
Parents:
5b8c49
git-author:
Frederik Heber <frederik.heber@…> (08/30/25 15:56:12)
git-committer:
Frederik Heber <frederik.heber@…> (09/13/25 14:44:01)
Message:

FIX: PotentialTrainer did not heed take-best correctly.

  • we used the unset threshold for comparison instead of the passed _threshold parameter.
  • threshold needs to 0. when only best of how many/take best should be heeded.
  • TEST: This fixes failing test case for fit compound potential.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Potentials/PotentialTrainer.cpp

    r5b8c49 r5d18f3  
    149149      unsigned int runs=0;
    150150      // threshold overrules max_runs
    151       const double threshold = _threshold;
    152       const unsigned int max_runs = (threshold >= 1.) ? _best_of_howmany : std::numeric_limits<unsigned int>::max();
     151      const double threshold = (_threshold >= 1.) ? 0. : _threshold;
     152      const unsigned int max_runs = (_threshold >= 1.) ? _best_of_howmany : std::numeric_limits<unsigned int>::max();
    153153      LOG(1, "INFO: Maximum runs is " << max_runs << " and threshold set to " << threshold << ".");
    154154      do {
Note: See TracChangeset for help on using the changeset viewer.