Changeset 3a5de5 for src/Dynamics


Ignore:
Timestamp:
Jul 20, 2017, 9:38:38 AM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
ForceAnnealing_with_BondGraph_continued
Children:
b7fe6e
Parents:
6dfa37
git-author:
Frederik Heber <frederik.heber@…> (06/27/17 21:10:02)
git-committer:
Frederik Heber <frederik.heber@…> (07/20/17 09:38:38)
Message:

ForceAnnealing no longer resets forces, AnalyseFragmentResults now sets forces.

  • before we added onto force vector in AnalyseFragmentResults.
  • if we do not reset forces in ForceAnnealing we can inspect the force components in the output file along the annealing run.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Dynamics/ForceAnnealing.hpp

    r6dfa37 r3a5de5  
    197197                        //std::cout << "Id of atom is " << (*iter)->getId() << std::endl;
    198198//        (*iter)->VelocityVerletUpdateU((*iter)->getId(), CurrentTimeStep-1, Deltat, IsAngstroem);
    199 
    200                         // reset force vector for next step except on final one
    201                         if (currentStep != maxSteps)
    202                           (*iter)->setAtomicForce(zeroVec);
    203                 }
    204 
    205                 LOG(1, "STATUS: Largest remaining force components at step #"
    206                     << currentStep << " are " << maxComponents);
    207 
    208                 // are we in final step? Remember to reset static entities
    209                 if (currentStep == maxSteps) {
    210                   LOG(2, "DEBUG: Final step, resetting values");
    211                   reset();
    212199                }
    213200  }
     
    503490        if (currentGradient[i] > maxComponents[i])
    504491          maxComponents[i] = currentGradient[i];
    505 
    506       // reset force vector for next step except on final one
    507       if (currentStep != maxSteps)
    508         walker.setAtomicForce(zeroVec);
    509492    }
    510493
     
    517500      ASSERT( walker != NULL,
    518501          "ForceAnnealing() - walker with id "+toString(atomid)+" has suddenly disappeared.");
     502      LOG(3, "DEBUG: Applying update " << update << " to atom #" << atomid
     503          << ", namely " << *walker);
    519504      walker->setPosition( walker->getPosition() + update );
    520       walker->setAtomicVelocity(update);
    521       LOG(3, "DEBUG: Applying update " << update << " to atom " << *walker);
    522505    }
    523506  }
     
    530513    currentDeltat = 0.;
    531514    currentStep = 0;
    532 
    533     // reset (artifical) velocities
    534     for(typename AtomSetMixin<T>::iterator iter = AtomicForceManipulator<T>::atoms.begin();
    535         iter != AtomicForceManipulator<T>::atoms.end(); ++iter)
    536       (*iter)->setAtomicVelocity(zeroVec);
    537515  }
    538516
Note: See TracChangeset for help on using the changeset viewer.