Ignore:
Timestamp:
Sep 11, 2008, 1:28:25 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
1bd619, bb28e0
Parents:
9070650
git-author:
Frederik Heber <heber@…> (09/11/08 13:04:01)
git-committer:
Frederik Heber <heber@…> (09/11/08 13:28:25)
Message:

molecule::MinimiseConstrainedPotential(): Extension of search and bugfix

We set the DistanceIterator to the begin() of DistanceList if we have reached the end, i.e. start anew for searching possible candidates.
Trajectories were not written correctly, due to wrong if condition (step> MDSteps) instead of (steps < MaxStep)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/molecules.cpp

    r9070650 r4a434c  
    13021302        DistanceIterators[Walker->nr] = StepList[Walker->nr]; 
    13031303        if (DistanceIterators[Walker->nr] == DistanceList[Walker->nr]->end()) {// stop, before we run through the list and still on
     1304          DistanceIterators[Walker->nr] == DistanceList[Walker->nr]->begin();
    13041305          break;
    13051306        }
     
    14501451        // add to Trajectories
    14511452        //*out << Verbose(3) << step << ">=" << MDSteps-1 << endl;
    1452         //if (step >= MDSteps-1) {
     1453        if (step < MaxSteps) {
    14531454          Trajectories[Walker].R.at(step).x[n] = Trajectories[Walker].R.at(startstep).x[n] + (Trajectories[PermutationMap[Walker->nr]].R.at(endstep).x[n] - Trajectories[Walker].R.at(startstep).x[n])*((double)step/(double)MaxSteps);
    14541455          Trajectories[Walker].U.at(step).x[n] = 0.;
    14551456          Trajectories[Walker].F.at(step).x[n] = 0.;
    1456         //}
     1457        }
    14571458      }
    14581459    }
Note: See TracChangeset for help on using the changeset viewer.