Changeset 1c8a80 for src


Ignore:
Timestamp:
Nov 5, 2017, 1:55:28 AM (7 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
ForceAnnealing_with_BondGraph_continued_betteresults
Children:
93effb
Parents:
c459c4
git-author:
Frederik Heber <frederik.heber@…> (06/27/17 21:03:16)
git-committer:
Frederik Heber <frederik.heber@…> (11/05/17 01:55:28)
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

    rc459c4 r1c8a80  
    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.