Changeset 866dec for src/Dynamics


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:
2bb3be
Parents:
216840
git-author:
Frederik Heber <frederik.heber@…> (06/27/17 21:10:02)
git-committer:
Frederik Heber <frederik.heber@…> (04/10/18 06:43:11)
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.
  • TESTFIX: data files for regression test AnalyseFragmentResults OBC and PBC changed because of modified way of resetting forces.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Dynamics/ForceAnnealing.hpp

    r216840 r866dec  
    187187      //std::cout << "Id of atom is " << (*iter)->getId() << std::endl;
    188188//        (*iter)->VelocityVerletUpdateU((*iter)->getId(), CurrentTimeStep-1, Deltat, IsAngstroem);
    189 
    190       // reset force vector for next step except on final one
    191       if (currentStep != maxSteps)
    192         (*iter)->setAtomicForce(zeroVec);
    193     }
    194 
    195     LOG(1, "STATUS: Largest remaining force components at step #"
    196         << currentStep << " are " << maxComponents);
    197 
    198     // are we in final step? Remember to reset static entities
    199     if (currentStep == maxSteps) {
    200       LOG(2, "DEBUG: Final step, resetting values");
    201       reset();
    202189    }
    203190  }
     
    327314        if (currentGradient[i] > maxComponents[i])
    328315          maxComponents[i] = currentGradient[i];
    329 
    330       // reset force vector for next step except on final one
    331       if (currentStep != maxSteps)
    332         (*iter)->setAtomicForce(zeroVec);
    333316    }
    334317    // apply the gathered updates
     
    340323      ASSERT( walker != NULL,
    341324          "ForceAnnealing() - walker with id "+toString(atomid)+" has suddenly disappeared.");
     325      LOG(3, "DEBUG: Applying update " << update << " to atom #" << atomid
     326          << ", namely " << *walker);
    342327      walker->setPosition( walker->getPosition() + update );
    343       walker->setAtomicVelocity(update);
    344       LOG(3, "DEBUG: Applying update " << update << " to atom " << *walker);
    345328    }
    346329  }
     
    353336    currentDeltat = 0.;
    354337    currentStep = 0;
    355 
    356     // reset (artifical) velocities
    357     for(typename AtomSetMixin<T>::iterator iter = AtomicForceManipulator<T>::atoms.begin();
    358         iter != AtomicForceManipulator<T>::atoms.end(); ++iter)
    359       (*iter)->setAtomicVelocity(zeroVec);
    360338  }
    361339
Note: See TracChangeset for help on using the changeset viewer.