Ignore:
Timestamp:
Apr 10, 2018, 6:43:12 AM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
AutomationFragmentation_failures, Candidate_v1.6.1, Candidate_v1.7.0, 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, stable
Children:
c87d6e
Parents:
8c6b68
git-author:
Frederik Heber <frederik.heber@…> (08/03/17 10:47:26)
git-committer:
Frederik Heber <frederik.heber@…> (04/10/18 06:43:12)
Message:

FIX: ForceAnnealingAction's Undo is again working.

  • AtomicInfo::setAtom() and SetAtomsFromAtomicInfo() now accept a time step. This allows to undo changes to the old state (where forces might have been passed to) and the current state (modified by time integration).
  • TESTFIX: ForceAnnealing's undo test.conf was no longer valid since the additional time stepping is extracted (and the tests were changed already). I.e. the extra trajectory step is because of step-world-time and not because of force-annealing. Hence, it should not be undone here.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/UndoRedoHelpers.cpp

    r8c6b68 r6145577  
    145145}
    146146
    147 void MoleCuilder::SetAtomsFromAtomicInfo(const std::vector<AtomicInfo> &_movedatoms)
     147void MoleCuilder::SetAtomsFromAtomicInfo(
     148    const std::vector<AtomicInfo> &_movedatoms,
     149    const unsigned int _step)
    148150{
    149151  BOOST_FOREACH( const AtomicInfo &_atominfo, _movedatoms) {
     
    153155        "MoleCuilder::SetAtomsFromAtomicInfo() - cannot find atom with id "
    154156        +toString(id)+" in the world.");
    155     _atominfo.setAtom( *_atom );
     157    _atominfo.setAtom( *_atom, _step );
    156158  }
    157159}
Note: See TracChangeset for help on using the changeset viewer.