Changeset 8ddd07 for src/Actions


Ignore:
Timestamp:
Apr 10, 2018, 6:43:11 AM (7 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
AutomationFragmentation_failures, Candidate_v1.6.1, ChemicalSpaceEvaluator, Enhanced_StructuralOptimization_continued, Exclude_Hydrogens_annealWithBondGraph, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_contraction-expansion, Gui_displays_atomic_force_velocity, PythonUI_with_named_parameters, StoppableMakroAction, TremoloParser_IncreasedPrecision
Children:
ecfcf6
Parents:
0477b0
git-author:
Frederik Heber <frederik.heber@…> (06/27/17 21:02:47)
git-committer:
Frederik Heber <frederik.heber@…> (04/10/18 06:43:11)
Message:

Sorting given selected atoms by ids in ForceAnnealing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/MoleculeAction/ForceAnnealingAction.cpp

    r0477b0 r8ddd07  
    7171    return Action::failure;
    7272  }
     73  // first, we need to sort the mixin according to their ids (as selected atoms are sorted
     74  // according to their arbitrary address in memory)
     75  set.sortByIds();
     76
     77  // create undo state for all selected atoms (undo info)
     78  std::vector<AtomicInfo> UndoInfo;
     79  UndoInfo.reserve(set.size());
     80  {
     81    for (World::AtomSelectionConstIterator iter = World::getInstance().beginAtomSelection();
     82        iter != World::getInstance().endAtomSelection();
     83        ++iter)
     84      UndoInfo.push_back(AtomicInfo(*(iter->second)));
     85  }
     86
    7387  // we always operate relative to current time step, except on single debug output
    7488  size_t CurrentStep = WorldTime::getInstance().getTime();
     
    103117    else
    104118      LOG(2, "File " << params.forcesfile.get() << " found and parsed.");
    105   }
    106 
    107   // create undo state for all selected atoms (undo info)
    108   std::vector<AtomicInfo> UndoInfo;
    109   UndoInfo.reserve(set.size());
    110   {
    111     for (World::AtomSelectionConstIterator iter = World::getInstance().beginAtomSelection();
    112         iter != World::getInstance().endAtomSelection();
    113         ++iter)
    114       UndoInfo.push_back(AtomicInfo(*(iter->second)));
    115119  }
    116120
Note: See TracChangeset for help on using the changeset viewer.