Changeset ecfcf6 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:
b2acca
Parents:
8ddd07
git-author:
Frederik Heber <frederik.heber@…> (06/27/17 21:03:16)
git-committer:
Frederik Heber <frederik.heber@…> (04/10/18 06:43:11)
Message:

FIX: ForceAnnealing would not reset force components prior to loading forces from file.

File:
1 edited

Legend:

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

    r8ddd07 recfcf6  
    9595      Walker->setPositionAtStep(CurrentStep+1,
    9696          Walker->getPositionAtStep(CurrentStep));
    97       Walker->setAtomicVelocityAtStep(CurrentStep+1,
    98           Walker->getAtomicVelocityAtStep(CurrentStep));
    99       Walker->setAtomicForceAtStep(CurrentStep+1,
    100           Walker->getAtomicForceAtStep(CurrentStep));
     97      if (!params.forcesfile.get().string().empty()) {
     98        // don't use forces or velocities from old step
     99        Walker->setAtomicVelocityAtStep(CurrentStep+1, zeroVec);
     100        Walker->setAtomicForceAtStep(CurrentStep+1, zeroVec);
     101      } else {
     102        // force have already been calculated, hence copy them
     103        Walker->setAtomicVelocityAtStep(CurrentStep+1,
     104            Walker->getAtomicVelocityAtStep(CurrentStep));
     105        Walker->setAtomicForceAtStep(CurrentStep+1,
     106            Walker->getAtomicForceAtStep(CurrentStep));
     107      }
    101108    }
    102109    // increment to next time step: re-creates bond graph
Note: See TracChangeset for help on using the changeset viewer.