Ignore:
Timestamp:
Jun 21, 2017, 10:02:50 PM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_SelectAtomByNameAction, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, AutomationFragmentation_failures, Candidate_v1.6.1, ChangeBugEmailaddress, ChemicalSpaceEvaluator, EmpiricalPotential_contain_HomologyGraph_documentation, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, Fix_Verbose_Codepatterns, ForceAnnealing_oldresults, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, Gui_displays_atomic_force_velocity, IndependentFragmentGrids_IntegrationTest, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, StoppableMakroAction, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps
Children:
310445
Parents:
be848d (diff), 101d2d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'Docu_Python_wait' into Candidate_v1.6.1

Conflicts:

tests/Python/AllActions/options.dat

  • two options introduced at same place, both get in.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/WorldAction/StepWorldTimeAction.cpp

    rbe848d r78ea3c  
    4747using namespace MoleCuilder;
    4848
    49 // if both are given, we use backwards
    50 static int getSteps(const unsigned int _forward, const unsigned int _backward)
    51 {
    52   int steps = 0;
    53   if (_backward > 0)
    54     steps = -_backward;
    55   else
    56     steps = _forward;
    57 
    58   return steps;
    59 }
    60 
    6149// and construct the stuff
    6250#include "StepWorldTimeAction.def"
     
    6957  WorldStepWorldTimeState *UndoState = new WorldStepWorldTimeState(oldtime, params);
    7058
    71   const int steps = getSteps(params.steps_forward.get(), params.steps_backward.get());
    72 
    73   if ((oldtime + steps) < 0) {
     59  if ((oldtime + params.steps.get()) < 0) {
    7460    ELOG(1, "Cannot step back before time step #0.");
    7561    delete UndoState;
    7662    return Action::failure;
    7763  }
    78   World::getInstance().setTime(oldtime+steps);
     64  World::getInstance().setTime(oldtime+params.steps.get());
    7965  LOG(0, "Current time step is now: " << WorldTime::getTime() << ".");
    8066  return ActionState::ptr(UndoState);
     
    9379  WorldStepWorldTimeState *state = assert_cast<WorldStepWorldTimeState*>(_state.get());
    9480
    95   const int steps = getSteps(
    96       state->params.steps_forward.get(),
    97       state->params.steps_backward.get());
    98 
    99   World::getInstance().setTime(state->oldtime+steps);
     81  World::getInstance().setTime(state->oldtime+state->params.steps.get());
    10082  LOG(0, "Current time step is now: " << WorldTime::getTime() << ".");
    10183
Note: See TracChangeset for help on using the changeset viewer.