Ignore:
Timestamp:
Jul 3, 2017, 3:07:28 PM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
ForceAnnealing_oldresults, IndependentFragmentGrids_IntegrationTest
Children:
67e885
Parents:
efc80e
git-author:
Frederik Heber <frederik.heber@…> (06/17/17 23:09:19)
git-committer:
Frederik Heber <frederik.heber@…> (07/03/17 15:07:28)
Message:

Extracted getMinMaxTrajectories() into FormatParser_common.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/PdbParser.cpp

    refc80e ref8667  
    198198
    199199  // check for maximum number of time steps
    200   size_t max_timesteps = 0;
    201   for (vector<const atom *>::const_iterator atomIt = AtomList.begin();
    202       atomIt != AtomList.end(); atomIt++) {
    203     const atom * _atom = *atomIt;
    204     LOG(4, "INFO: Atom " << _atom->getName() << " "
    205         << *dynamic_cast<const AtomInfo *>(_atom) << ".");
    206     if (_atom->getTrajectorySize() > max_timesteps)
    207       max_timesteps = _atom->getTrajectorySize();
    208   }
    209   LOG(2,"INFO: Found a maximum of " << max_timesteps << " time steps to store.");
     200  std::pair<size_t, size_t> minmax_trajectories =
     201      getMinMaxTrajectories(AtomList);
     202  LOG(2, "INFO: There are " << minmax_trajectories.second << " steps to save.");
    210203
    211204  // re-distribute serials
     
    222215
    223216  // store all time steps (always do first step)
    224   for (size_t step = 0; (step == 0) || (step < max_timesteps); ++step) {
     217  for (size_t step = 0; (step == 0) || (step < minmax_trajectories.second); ++step) {
    225218    {
    226219      // add initial remark
Note: See TracChangeset for help on using the changeset viewer.