Changeset fdd121 for src


Ignore:
Timestamp:
Nov 5, 2017, 1:55:28 AM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
ForceAnnealing_with_BondGraph_continued_betteresults
Children:
d79ef32
Parents:
5b6afad
git-author:
Frederik Heber <frederik.heber@…> (05/24/17 09:55:56)
git-committer:
Frederik Heber <frederik.heber@…> (11/05/17 01:55:28)
Message:

Added damping-factor as another option to ForceAnnealing for proper testing of bond graph change effectiveness.

Location:
src
Files:
3 edited

Legend:

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

    r5b6afad rfdd121  
    9494      true,
    9595      params.steps.get(),
    96       params.MaxDistance.get());
     96      params.MaxDistance.get(),
     97      params.DampingFactor.get());
    9798  // parse forces into next step
    9899  if (!params.forcesfile.get().string().empty()) {
  • src/Actions/MoleculeAction/ForceAnnealingAction.def

    r5b6afad rfdd121  
    1212#include "Parameters/Validators/GenericValidators.hpp"
    1313#include "Parameters/Validators/Ops_Validator.hpp"
     14#include "Parameters/Validators/RangeValidator.hpp"
    1415
    1516// i.e. there is an integer with variable name Z that can be found in
    1617// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    1718// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    18 #define paramtypes (boost::filesystem::path)(unsigned int)(bool)(int)
    19 #define paramtokens ("forces-file")("steps")("output-every-step")("max-distance")
    20 #define paramdescriptions ("file containing")("fixed number of optimization steps to be performed")("whether WorldTime should be increased and output written after every step, useful if optimization might hang")("maximum distance to which bond graph is taken into account")
    21 #define paramdefaults (PARAM_DEFAULT(""))(NOPARAM_DEFAULT)(PARAM_DEFAULT("0"))(PARAM_DEFAULT(0))
    22 #define paramreferences (forcesfile)(steps)(DoOutput)(MaxDistance)
     19#define paramtypes (boost::filesystem::path)(unsigned int)(bool)(int)(double)
     20#define paramtokens ("forces-file")("steps")("output-every-step")("max-distance")("damping-factor")
     21#define paramdescriptions ("file containing")("fixed number of optimization steps to be performed")("whether WorldTime should be increased and output written after every step, useful if optimization might hang")("maximum distance to which bond graph is taken into account")("damping factor for decreasing the shift with bond graph distance from the causing site")
     22#define paramdefaults (PARAM_DEFAULT(""))(NOPARAM_DEFAULT)(PARAM_DEFAULT("0"))(PARAM_DEFAULT(0))(PARAM_DEFAULT(0.5))
     23#define paramreferences (forcesfile)(steps)(DoOutput)(MaxDistance)(DampingFactor)
    2324#define paramvalids \
    2425(DummyValidator< boost::filesystem::path >()) \
    2526(NotZeroValidator< unsigned int >()) \
    2627(DummyValidator<bool>()) \
    27 (DummyValidator< int >())
     28(DummyValidator< int >()) \
     29(RangeValidator< double >(0,1))
    2830
    2931#define statetypes (std::vector<AtomicInfo>)(std::vector<AtomicInfo>)
  • src/Dynamics/ForceAnnealing.hpp

    r5b6afad rfdd121  
    6262      bool _IsAngstroem,
    6363      const size_t _maxSteps,
    64       const int _max_distance) :
     64      const int _max_distance,
     65      const double _damping_factor) :
    6566    AtomicForceManipulator<T>(_atoms, 1., _IsAngstroem),
    6667    maxSteps(_maxSteps),
    6768    max_distance(_max_distance),
    68     damping_factor(0.5)
     69    damping_factor(_damping_factor)
    6970  {}
    7071  /** Destructor of class ForceAnnealing.
Note: See TracChangeset for help on using the changeset viewer.