Changes in / [a6c11a:3e334e]


Ignore:
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • doc/userguide/userguide.xml

    ra6c11a r3e334e  
    24642464        stepwidth  we do not need any 'deltat' parameters. If the computed
    24652465        step width is zero, we use a default step width of 1.</para>
     2466       
     2467        <section xml:id="dynamics.optimize-structure.bondgraph">
     2468          <title xml:id="dynamics.optimize-structure.bondgraph.title">... using the bond graph</title>
     2469          <para>A more efficient optimization, especially for larger molecules
     2470          is obtained, if the bond graph is taken into account. To this end,
     2471          the structure optimization can be called as follows:</para>
     2472      <programlisting>... --optimize-structure \
     2473      --keep-bondgraph 1 \
     2474      --output-every-step 1 \
     2475      --steps 100 \
     2476      --order 3 \
     2477      --distance 3. \
     2478      --deltat 0.5 \
     2479      --keep-fixed-CenterOfMass 1 \
     2480      --fragment-executable mpqc \
     2481      --use-bondgraph 1 \
     2482      --damping-factor 0.5 \
     2483      --max-distance 8
     2484            </programlisting>
     2485            <para>Note that two additional arguments <emphasis role="bold">use-bondgraph</emphasis>,
     2486            <emphasis role="bold">damping-factor</emphasis>and
     2487            <emphasis role="bold">max-distance</emphasis>. The first will
     2488            switch on using the bond graph while the latter two are parameters
     2489            controlling its behavior.</para>
     2490            <para>Let us briefly sketch the central idea of using the bond graph:
     2491            If a specific atom has a non-zero gradient, then this gradient will
     2492            cause the atom to be shifted into its negative direction. The
     2493            gradient however is a sum of forces acting on this atom from all
     2494            other atoms. The gradient therefore states the net effect on the
     2495            toal energy if the atom (and only the atom) would be moved according
     2496            to its negative direction. In other words, the force on one side of
     2497            the atom are stronger than those on the other side, where the
     2498            sides are defined by the plane with the gradient as its normal
     2499            vector.</para>
     2500            <para>The idea now is to not only move the atom itself but also
     2501            all atoms in the direction of the negative gradient by a fraction
     2502            as well. The underlying notion is that if there is a misplacement
     2503            of the said atom under consideration, then this misplacement
     2504            will faster spread out to the edges of the molecule and dissipate
     2505            there. If we move only the atom, this will cause a lot of
     2506            oscillations that will take a while to settle. One might think of
     2507            it like the smoothing step of a multigrid solver.
     2508            Essentially, we consider the gradient as a local error that is
     2509            smoothed out by powers of <emphasis role="bold">damping-factor</emphasis>
     2510            the further out we go in the bond graph from the respective
     2511            atom till <emphasis role="bold">max-distance</emphasis>. Note that
     2512            the distance is here to be understood in the sense of a graph, i.e.
     2513            stepping from one atom to a bond neighbor in the bond graph
     2514            is a distance of 1.</para>
     2515            <note>The truncated power series of the <emphasis role="bold">max-distance</emphasis>
     2516            should sum to 1, i.e. values between 0.5 and 1 work well.</note>
     2517            <note>Hydrogens due to their typically much ligher mass compared
     2518            to other nuclei are excluded from this procedure. They feel the
     2519            dampened gradients of others but their gradient acts only on
     2520            themselves</note>
     2521            <note>Barzilai-Borwein step width sometimes tends to overshoot
     2522            as it is a approximation to the secant and assumes linearity. To
     2523            counter this, we cap the step width at 0.2 angstroem.</note>
     2524          </section>
    24662525        </section>
    24672526        <section xml:id="dynamics.step-world-time">
  • src/Dynamics/ForceAnnealing.hpp

    ra6c11a r3e334e  
    1717#include <functional>
    1818#include <iterator>
     19#include <math.h>
    1920
    2021#include <boost/bind.hpp>
     
    167168  {
    168169    double stepwidth = 0.;
    169     if (_GradientDifference.NormSquared() > MYEPSILON)
     170    if (_GradientDifference.Norm() > MYEPSILON)
    170171      stepwidth = fabs(_PositionDifference.ScalarProduct(_GradientDifference))/
    171172          _GradientDifference.NormSquared();
     
    176177      stepwidth = currentDeltat;
    177178    }
    178     return stepwidth;
     179    return std::min(1., stepwidth);
    179180  }
    180181
     
    200201        iter != AtomicForceManipulator<T>::atoms.end(); ++iter) {
    201202      // atom's force vector gives steepest descent direction
    202       const Vector currentPosition = (*iter)->getPositionAtStep(CurrentTimeStep);
    203       const Vector currentGradient = (*iter)->getAtomicForceAtStep(CurrentTimeStep);
     203      const Vector &currentPosition = (*iter)->getPositionAtStep(CurrentTimeStep);
     204      const Vector &currentGradient = (*iter)->getAtomicForceAtStep(CurrentTimeStep);
    204205      LOG(4, "DEBUG: currentPosition for atom #" << (*iter)->getId() << " is " << currentPosition);
    205206      LOG(4, "DEBUG: currentGradient for atom #" << (*iter)->getId() << " is " << currentGradient);
     
    248249  }
    249250
     251  /** Performs Gradient optimization on a single atom using BarzilaiBorwein step width.
     252   *
     253   * \param _atom atom to anneal
     254   * \param OldTimeStep old time step
     255   * \param CurrentTimeStep current time step whose gradient we've just calculated
     256   * \param TimeStepToSet time step to update (i.e. \f$ t + \Delta t \f$ in the sense of the velocity verlet)
     257   */
     258  void annealAtom_BarzilaiBorwein(
     259      atom * const _atom,
     260      const int &OldTimeStep,
     261      const int &CurrentTimeStep,
     262      const int &TimeStepToSet
     263      )
     264  {
     265    // atom's force vector gives steepest descent direction
     266    const Vector &oldPosition = _atom->getPositionAtStep(OldTimeStep);
     267    const Vector &currentPosition = _atom->getPositionAtStep(CurrentTimeStep);
     268    const Vector &oldGradient = _atom->getAtomicForceAtStep(OldTimeStep);
     269    const Vector &currentGradient = _atom->getAtomicForceAtStep(CurrentTimeStep);
     270    LOG(4, "DEBUG: oldPosition for atom #" << _atom->getId() << " is " << oldPosition);
     271    LOG(4, "DEBUG: currentPosition for atom #" << _atom->getId() << " is " << currentPosition);
     272    LOG(4, "DEBUG: oldGradient for atom #" << _atom->getId() << " is " << oldGradient);
     273    LOG(4, "DEBUG: currentGradient for atom #" << _atom->getId() << " is " << currentGradient);
     274//      LOG(4, "DEBUG: Force for atom #" << _atom->getId() << " is " << currentGradient);
     275
     276    // we use Barzilai-Borwein update with position reversed to get descent
     277    const Vector PositionDifference = currentPosition - oldPosition;
     278    const Vector GradientDifference = (currentGradient - oldGradient);
     279    double stepwidth = getBarzilaiBorweinStepwidth(PositionDifference, GradientDifference);
     280    Vector PositionUpdate = stepwidth * currentGradient;
     281    LOG(3, "DEBUG: Update would be " << stepwidth << "*" << currentGradient << " = " << PositionUpdate);
     282
     283    // finally set new values
     284    _atom->setPositionAtStep(TimeStepToSet, currentPosition + PositionUpdate);
     285  }
     286
    250287  /** Performs Gradient optimization on the atoms using BarzilaiBorwein step width.
    251288   *
    252289   * \note this can only be called when there are at least two optimization
    253    * time steps present, i.e. this must be preceeded by a simple anneal().
     290   * time steps present, i.e. this must be preceded by a simple anneal().
    254291   *
    255292   * We assume that forces have just been calculated.
     
    271308
    272309    Vector maxComponents;
    273     bool deltat_decreased = false;
    274310    for(typename AtomSetMixin<T>::iterator iter = AtomicForceManipulator<T>::atoms.begin();
    275311        iter != AtomicForceManipulator<T>::atoms.end(); ++iter) {
    276       // atom's force vector gives steepest descent direction
    277       const Vector &oldPosition = (*iter)->getPositionAtStep(OldTimeStep);
    278       const Vector &currentPosition = (*iter)->getPositionAtStep(CurrentTimeStep);
    279       const Vector &oldGradient = (*iter)->getAtomicForceAtStep(OldTimeStep);
     312
     313      annealAtom_BarzilaiBorwein(*iter, OldTimeStep, CurrentTimeStep, _TimeStep);
     314
     315      // extract largest components for showing progress of annealing
    280316      const Vector &currentGradient = (*iter)->getAtomicForceAtStep(CurrentTimeStep);
    281       LOG(4, "DEBUG: oldPosition for atom #" << (*iter)->getId() << " is " << oldPosition);
    282       LOG(4, "DEBUG: currentPosition for atom #" << (*iter)->getId() << " is " << currentPosition);
    283       LOG(4, "DEBUG: oldGradient for atom #" << (*iter)->getId() << " is " << oldGradient);
    284       LOG(4, "DEBUG: currentGradient for atom #" << (*iter)->getId() << " is " << currentGradient);
    285 //      LOG(4, "DEBUG: Force for atom #" << (*iter)->getId() << " is " << currentGradient);
    286 
    287       // we use Barzilai-Borwein update with position reversed to get descent
    288       const Vector PositionDifference = currentPosition - oldPosition;
    289       const Vector GradientDifference = (currentGradient - oldGradient);
    290       double stepwidth = getBarzilaiBorweinStepwidth(PositionDifference, GradientDifference);
    291       Vector PositionUpdate = stepwidth * currentGradient;
    292       LOG(3, "DEBUG: Update would be " << stepwidth << "*" << currentGradient << " = " << PositionUpdate);
    293 
    294       // extract largest components for showing progress of annealing
    295317      for(size_t i=0;i<NDIM;++i)
    296318        maxComponents[i] = std::max(maxComponents[i], fabs(currentGradient[i]));
    297 
    298 //      // steps may go back and forth again (updates are of same magnitude but
    299 //      // have different sign: Check whether this is the case and one step with
    300 //      // deltat to interrupt this sequence
    301 //      if (!PositionDifference.IsZero())
    302 //        if ((PositionUpdate.ScalarProduct(PositionDifference) < 0)
    303 //            && (fabs(PositionUpdate.NormSquared()-PositionDifference.NormSquared()) < 1e-3)) {
    304 //          // for convergence we want a null sequence here, too
    305 //          if (!deltat_decreased) {
    306 //            deltat_decreased = true;
    307 //            currentDeltat = .5*currentDeltat;
    308 //          }
    309 //          LOG(2, "DEBUG: Upgrade in other direction: " << PositionUpdate
    310 //              << " > " << PositionDifference
    311 //              << ", using deltat: " << currentDeltat);
    312 //          PositionUpdate = currentDeltat * currentGradient;
    313 //      }
    314 
    315       // finally set new values
    316       (*iter)->setPositionAtStep(_TimeStep, currentPosition + PositionUpdate);
    317319    }
    318320
    319321    return maxComponents;
    320322  }
     323
     324        /** Helper function to insert \a PositionUpdate into a map for every atom.
     325         *
     326         * \param _GatheredUpdates map of updates per atom
     327         * \param _LargestUpdate_per_Atom map with the largest update per atom for checking
     328         * \param _atomno key for map
     329         * \param _PositionUpdate update to add
     330         * \param _factor optional dampening factor
     331         */
     332        void updateInserter(
     333            std::map<atomId_t, Vector> &_GatheredUpdates,
     334            std::map<atomId_t, double> &_LargestUpdate_per_Atom,
     335            const atomId_t _atomno,
     336            const Vector &_PositionUpdate,
     337            const double _factor = 1.
     338            )
     339        {
     340          if (_GatheredUpdates.count(_atomno)) {
     341            _GatheredUpdates[_atomno] += _factor*_PositionUpdate;
     342            _LargestUpdate_per_Atom[_atomno] =
     343                std::max(_LargestUpdate_per_Atom[_atomno], _factor*_PositionUpdate.Norm());
     344          } else {
     345            _GatheredUpdates.insert(
     346                std::make_pair(
     347                    _atomno,
     348                    _factor*_PositionUpdate) );
     349            _LargestUpdate_per_Atom.insert(
     350                std::make_pair(
     351                    _atomno,
     352                    _PositionUpdate.Norm()) );
     353          }
     354        }
    321355
    322356  /** Performs Gradient optimization on the bonds with BarzilaiBorwein stepwdith.
     
    416450
    417451    std::map<atomId_t, Vector> GatheredUpdates; //!< gathers all updates which are applied at the end
     452    std::map<atomId_t, double> LargestUpdate_per_Atom; //!< check whether updates cancelled each other
    418453    for(typename AtomSetMixin<T>::iterator iter = AtomicForceManipulator<T>::atoms.begin();
    419454        iter != AtomicForceManipulator<T>::atoms.end(); ++iter) {
     
    434469      const Vector PositionDifference = currentPosition - oldPosition;
    435470      const Vector GradientDifference = (currentGradient - oldGradient);
    436       double stepwidth = 0.;
    437       if (GradientDifference.Norm() > MYEPSILON)
    438         stepwidth = fabs(PositionDifference.ScalarProduct(GradientDifference))/
    439             GradientDifference.NormSquared();
    440       if (fabs(stepwidth) < 1e-10) {
    441         // dont' warn in first step, deltat usage normal
    442         if (currentStep != 1)
    443           ELOG(1, "INFO: Barzilai-Borwein stepwidth is zero, using deltat " << currentDeltat << " instead.");
    444         stepwidth = currentDeltat;
    445       }
     471      double stepwidth = getBarzilaiBorweinStepwidth(PositionDifference, GradientDifference);
    446472      Vector PositionUpdate = stepwidth * currentGradient;
     473      // cap updates (if non-zero) at 0.2 angstroem. BB tends to overshoot.
     474      for (size_t i=0;i<NDIM;++i)
     475        if (fabs(PositionUpdate[i]) > MYEPSILON)
     476          PositionUpdate[i] = std::min(0.2, fabs(PositionUpdate[i]))*PositionUpdate[i]/fabs(PositionUpdate[i]);
    447477      LOG(3, "DEBUG: Update would be " << stepwidth << "*" << currentGradient << " = " << PositionUpdate);
    448478
    449       /** for each atom, we imagine a plane at the position of the atom with
    450        * its atomic gradient as the normal vector. We go through all its bonds
    451        * and check on which side of the plane the bond is. This defines whether
    452        * the bond is contracting (+) or expanding (-) with respect to this atom.
    453        *
    454        * A bond has two atoms, however. Hence, we do this for either atom and
    455        * look at the combination: Is it in sum contracting or expanding given
    456        * both projected_forces?
    457        */
    458 
    459       /** go through all bonds and check projected_forces and side of plane
    460        * the idea is that if all bonds on one side are contracting ones or expanding,
    461        * respectively, then we may shift not only the atom with respect to its
    462        * gradient but also its neighbors (towards contraction or towards
    463        * expansion depending on direction of gradient).
    464        * if they are mixed on both sides of the plane, then we simply shift
    465        * only the atom itself.
    466        * if they are not mixed on either side, then we also only shift the
    467        * atom, namely away from expanding and towards contracting bonds.
    468        *
    469        * We may get this information right away by looking at the projected_forces.
    470        * They give the atomic gradient of either atom projected onto the BondVector
    471        * with an additional weight in [0,1].
    472        */
    473 
    474       // sign encodes side of plane and also encodes contracting(-) or expanding(+)
    475       typedef std::vector<int> sides_t;
    476       typedef std::vector<int> types_t;
    477       sides_t sides;
    478       types_t types;
    479       const BondList& ListOfBonds = walker.getListOfBonds();
    480       for(BondList::const_iterator bonditer = ListOfBonds.begin();
    481           bonditer != ListOfBonds.end(); ++bonditer) {
    482         const bond::ptr &current_bond = *bonditer;
    483 
    484         // BondVector goes from bond::rightatom to bond::leftatom
    485         const size_t index = bv.getIndexForBond(current_bond);
    486         std::vector<double> &forcelist = (&walker == current_bond->leftatom) ?
    487             projected_forces[BondVectors::leftside] : projected_forces[BondVectors::rightside];
    488         // note that projected_forces has sign such as to indicate whether
    489         // atomic gradient wants bond to contract (-) or expand (+).
    490         // This goes into sides: Minus side points away from gradient, plus side point
    491         // towards gradient.
    492         //
    493         // the sum of both bond sides goes into types, depending on which is
    494         // stronger if either wants a different thing
    495         const double &temp = forcelist[index];
    496         sides.push_back( -1.*temp/fabs(temp) ); // BondVectors has exactly opposite sign for sides decision
    497         const double sum =
    498             projected_forces[BondVectors::leftside][index]+projected_forces[BondVectors::rightside][index];
    499         types.push_back( sum/fabs(sum) );
    500         LOG(4, "DEBUG: Bond " << *current_bond << " is on side " << sides.back()
    501             << " and has type " << types.back());
    502       }
    503 //      /// check whether both conditions are compatible:
    504 //      // i.e. either we have ++/-- for all entries in sides and types
    505 //      // or we have +-/-+ for all entries
    506 //      // hence, multiplying and taking the sum and its absolute value
    507 //      // should be equal to the maximum number of entries
    508 //      sides_t results;
    509 //      std::transform(
    510 //          sides.begin(), sides.end(),
    511 //          types.begin(),
    512 //          std::back_inserter(results),
    513 //          std::multiplies<int>);
    514 //      int result = abs(std::accumulate(results.begin(), results.end(), 0, std::plus<int>));
    515 
    516       std::vector<size_t> first_per_side(2, (size_t)-1); //!< mark down one representative from either side
    517       std::vector< std::vector<int> > types_per_side(2); //!< gather all types on each side
    518       types_t::const_iterator typesiter = types.begin();
    519       for (sides_t::const_iterator sidesiter = sides.begin();
    520           sidesiter != sides.end(); ++sidesiter, ++typesiter) {
    521         const size_t index = (*sidesiter+1)/2;
    522         types_per_side[index].push_back(*typesiter);
    523         if (first_per_side[index] == (size_t)-1)
    524           first_per_side[index] = std::distance(const_cast<const sides_t &>(sides).begin(), sidesiter);
    525       }
    526       LOG(4, "DEBUG: First on side minus is " << first_per_side[0] << ", and first on side plus is "
    527           << first_per_side[1]);
    528       //!> enumerate types per side with a little witching with the numbers to allow easy setting from types
    529       enum whichtypes_t {
    530         contracting=0,
    531         unset=1,
    532         expanding=2,
    533         mixed
    534       };
    535       std::vector<int> typeside(2, unset);
    536       for(size_t i=0;i<2;++i) {
    537         for (std::vector<int>::const_iterator tpsiter = types_per_side[i].begin();
    538             tpsiter != types_per_side[i].end(); ++tpsiter) {
    539           if (typeside[i] == unset) {
    540             typeside[i] = *tpsiter+1; //contracting(0) or expanding(2)
    541           } else {
    542             if (typeside[i] != (*tpsiter+1)) // no longer he same type
    543               typeside[i] = mixed;
     479      if (walker.getElementNo() != 1) {
     480        /** for each atom, we imagine a plane at the position of the atom with
     481         * its atomic gradient as the normal vector. We go through all its bonds
     482         * and check on which side of the plane the bond is. This defines whether
     483         * the bond is contracting (+) or expanding (-) with respect to this atom.
     484         *
     485         * A bond has two atoms, however. Hence, we do this for either atom and
     486         * look at the combination: Is it in sum contracting or expanding given
     487         * both projected_forces?
     488         */
     489
     490        /** go through all bonds and check projected_forces and side of plane
     491         * the idea is that if all bonds on one side are contracting ones or expanding,
     492         * respectively, then we may shift not only the atom with respect to its
     493         * gradient but also its neighbors (towards contraction or towards
     494         * expansion depending on direction of gradient).
     495         * if they are mixed on both sides of the plane, then we simply shift
     496         * only the atom itself.
     497         * if they are not mixed on either side, then we also only shift the
     498         * atom, namely away from expanding and towards contracting bonds.
     499         *
     500         * We may get this information right away by looking at the projected_forces.
     501         * They give the atomic gradient of either atom projected onto the BondVector
     502         * with an additional weight in [0,1].
     503         */
     504
     505        // sign encodes side of plane and also encodes contracting(-) or expanding(+)
     506        typedef std::vector<int> sides_t;
     507        typedef std::vector<int> types_t;
     508        sides_t sides;
     509        types_t types;
     510        const BondList& ListOfBonds = walker.getListOfBonds();
     511        for(BondList::const_iterator bonditer = ListOfBonds.begin();
     512            bonditer != ListOfBonds.end(); ++bonditer) {
     513          const bond::ptr &current_bond = *bonditer;
     514
     515          // BondVector goes from bond::rightatom to bond::leftatom
     516          const size_t index = bv.getIndexForBond(current_bond);
     517          std::vector<double> &forcelist = (&walker == current_bond->leftatom) ?
     518              projected_forces[BondVectors::leftside] : projected_forces[BondVectors::rightside];
     519          // note that projected_forces has sign such as to indicate whether
     520          // atomic gradient wants bond to contract (-) or expand (+).
     521          // This goes into sides: Minus side points away from gradient, plus side point
     522          // towards gradient.
     523          //
     524          // the sum of both bond sides goes into types, depending on which is
     525          // stronger if either wants a different thing
     526          const double &temp = forcelist[index];
     527          if (fabs(temp) < MYEPSILON)
     528            sides.push_back(1);
     529          else
     530            sides.push_back( -1.*temp/fabs(temp) ); // BondVectors has exactly opposite sign for sides decision
     531          ASSERT( (sides.back() == 1) || (sides.back() == -1),
     532              "ForceAnnealing() - sides is not in {-1,1}.");
     533          const double sum =
     534              projected_forces[BondVectors::leftside][index]+projected_forces[BondVectors::rightside][index];
     535          types.push_back( sum/fabs(sum) );
     536          LOG(4, "DEBUG: Bond " << *current_bond << " is on side " << sides.back()
     537              << " and has type " << types.back());
     538        }
     539  //      /// check whether both conditions are compatible:
     540  //      // i.e. either we have ++/-- for all entries in sides and types
     541  //      // or we have +-/-+ for all entries
     542  //      // hence, multiplying and taking the sum and its absolute value
     543  //      // should be equal to the maximum number of entries
     544  //      sides_t results;
     545  //      std::transform(
     546  //          sides.begin(), sides.end(),
     547  //          types.begin(),
     548  //          std::back_inserter(results),
     549  //          std::multiplies<int>);
     550  //      int result = abs(std::accumulate(results.begin(), results.end(), 0, std::plus<int>));
     551
     552        std::vector<size_t> first_per_side(2, (size_t)-1); //!< mark down one representative from either side
     553        std::vector< std::vector<int> > types_per_side(2); //!< gather all types on each side
     554        types_t::const_iterator typesiter = types.begin();
     555        for (sides_t::const_iterator sidesiter = sides.begin();
     556            sidesiter != sides.end(); ++sidesiter, ++typesiter) {
     557          const size_t index = (*sidesiter+1)/2;
     558          types_per_side[index].push_back(*typesiter);
     559          if (first_per_side[index] == (size_t)-1)
     560            first_per_side[index] = std::distance(const_cast<const sides_t &>(sides).begin(), sidesiter);
     561        }
     562        LOG(4, "DEBUG: First on side minus is " << first_per_side[0] << ", and first on side plus is "
     563            << first_per_side[1]);
     564        //!> enumerate types per side with a little witching with the numbers to allow easy setting from types
     565        enum whichtypes_t {
     566          contracting=0,
     567          unset=1,
     568          expanding=2,
     569          mixed
     570        };
     571        std::vector<int> typeside(2, unset);
     572        for(size_t i=0;i<2;++i) {
     573          for (std::vector<int>::const_iterator tpsiter = types_per_side[i].begin();
     574              tpsiter != types_per_side[i].end(); ++tpsiter) {
     575            if (typeside[i] == unset) {
     576              typeside[i] = *tpsiter+1; //contracting(0) or expanding(2)
     577            } else {
     578              if (typeside[i] != (*tpsiter+1)) // no longer he same type
     579                typeside[i] = mixed;
     580            }
    544581          }
    545582        }
    546       }
    547       LOG(4, "DEBUG: Minus side is " << typeside[0] << " and plus side is " << typeside[1]);
    548 
    549       typedef std::vector< std::pair<atomId_t, atomId_t> > RemovedEdges_t;
    550       if ((typeside[0] != mixed) || (typeside[1] != mixed)) {
    551         const size_t sideno = ((typeside[0] != mixed) && (typeside[0] != unset)) ? 0 : 1;
    552         LOG(4, "DEBUG: Chosen side is " << sideno << " with type " << typeside[sideno]);
    553         ASSERT( (typeside[sideno] == contracting) || (typeside[sideno] == expanding),
    554             "annealWithBondGraph_BB() - chosen side is neither expanding nor contracting.");
    555         // one side is not mixed, all bonds on one side are of same type
    556         // hence, find out which bonds to exclude
    557         const BondList& ListOfBonds = walker.getListOfBonds();
    558 
    559         // sideno is away (0) or in direction (1) of gradient
    560         // tpyes[first_per_side[sideno]] is either contracting (-1) or expanding (+1)
    561         // : side (i), where (i) means which bonds we keep for the BFS, bonds
    562         // on side (-i) are removed
    563         // If all bonds on side away (0) want expansion (+1), move towards side with atom: side 1
    564         // if all bonds side towards (1) want contraction (-1), move away side with atom : side -1
    565 
    566         // unsure whether this or do nothing in the remaining cases:
    567         // If all bonds on side toward (1) want expansion (+1), move away side with atom : side -1
    568         //    (the reasoning is that the bond's other atom must have a stronger
    569         //     gradient in the same direction and they push along atoms in
    570         //     gradient direction: we don't want to interface with those.
    571         //     Hence, move atoms along on away side
    572         // if all bonds side away (0) want contraction (-1), move towards side with atom: side 1
    573         //    (the reasoning is the same, don't interfere with update from
    574         //     stronger gradient)
    575         // hence, the decision is only based on sides once we have picked a side
    576         // depending on all bonds associated with have same good type.
    577         const double sign = sides[first_per_side[sideno]];
    578         LOG(4, "DEBUG: Removing edges from side with sign " << sign);
    579         BondList::const_iterator bonditer = ListOfBonds.begin();
    580         RemovedEdges_t RemovedEdges;
    581         for (sides_t::const_iterator sidesiter = sides.begin();
    582             sidesiter != sides.end(); ++sidesiter, ++bonditer) {
    583           if (*sidesiter == sign) {
    584             // remove the edge
    585             const bond::ptr &current_bond = *bonditer;
    586             LOG(5, "DEBUG: Removing edge " << *current_bond);
    587             RemovedEdges.push_back( std::make_pair(
    588                 current_bond->leftatom->getId(),
    589                 current_bond->rightatom->getId())
    590             );
    591 #ifndef NDEBUG
    592             const bool status =
    593 #endif
    594                 BGcreator.removeEdge(RemovedEdges.back());
    595             ASSERT( status, "ForceAnnealing() - edge to found bond is not present?");
     583        LOG(4, "DEBUG: Minus side is " << typeside[0] << " and plus side is " << typeside[1]);
     584
     585        typedef std::vector< std::pair<atomId_t, atomId_t> > RemovedEdges_t;
     586        if ((typeside[0] != mixed) || (typeside[1] != mixed)) {
     587          const size_t sideno = ((typeside[0] != mixed) && (typeside[0] != unset)) ? 0 : 1;
     588          LOG(4, "DEBUG: Chosen side is " << sideno << " with type " << typeside[sideno]);
     589          ASSERT( (typeside[sideno] == contracting) || (typeside[sideno] == expanding),
     590              "annealWithBondGraph_BB() - chosen side is neither expanding nor contracting.");
     591          // one side is not mixed, all bonds on one side are of same type
     592          // hence, find out which bonds to exclude
     593          const BondList& ListOfBonds = walker.getListOfBonds();
     594
     595          // sideno is away (0) or in direction (1) of gradient
     596          // tpyes[first_per_side[sideno]] is either contracting (-1) or expanding (+1)
     597          // : side (i), where (i) means which bonds we keep for the BFS, bonds
     598          // on side (-i) are removed
     599          // If all bonds on side away (0) want expansion (+1), move towards side with atom: side 1
     600          // if all bonds side towards (1) want contraction (-1), move away side with atom : side -1
     601
     602          // unsure whether this or do nothing in the remaining cases:
     603          // If all bonds on side toward (1) want expansion (+1), move away side with atom : side -1
     604          //    (the reasoning is that the bond's other atom must have a stronger
     605          //     gradient in the same direction and they push along atoms in
     606          //     gradient direction: we don't want to interface with those.
     607          //     Hence, move atoms along on away side
     608          // if all bonds side away (0) want contraction (-1), move towards side with atom: side 1
     609          //    (the reasoning is the same, don't interfere with update from
     610          //     stronger gradient)
     611          // hence, the decision is only based on sides once we have picked a side
     612          // depending on all bonds associated with have same good type.
     613
     614          // away from gradient (minus) and contracting
     615          // or towards gradient (plus) and expanding
     616          // gather all on same side and remove
     617          const double sign =
     618              (sides[first_per_side[sideno]] == types[first_per_side[sideno]])
     619              ? sides[first_per_side[sideno]] : -1.*sides[first_per_side[sideno]];
     620
     621          LOG(4, "DEBUG: Removing edges from side with sign " << sign);
     622          BondList::const_iterator bonditer = ListOfBonds.begin();
     623          RemovedEdges_t RemovedEdges;
     624          for (sides_t::const_iterator sidesiter = sides.begin();
     625              sidesiter != sides.end(); ++sidesiter, ++bonditer) {
     626            if (*sidesiter == sign) {
     627              // remove the edge
     628              const bond::ptr &current_bond = *bonditer;
     629              LOG(5, "DEBUG: Removing edge " << *current_bond);
     630              RemovedEdges.push_back( std::make_pair(
     631                  current_bond->leftatom->getId(),
     632                  current_bond->rightatom->getId())
     633              );
     634  #ifndef NDEBUG
     635              const bool status =
     636  #endif
     637                  BGcreator.removeEdge(RemovedEdges.back());
     638              ASSERT( status, "ForceAnnealing() - edge to found bond is not present?");
     639            }
    596640          }
    597         }
    598         // perform limited-horizon BFS
    599         BoostGraphHelpers::Nodeset_t bondside_set;
    600         BreadthFirstSearchGatherer::distance_map_t distance_map;
    601         bondside_set = NodeGatherer(walker.getId(), max_distance);
    602         distance_map = NodeGatherer.getDistances();
    603         std::sort(bondside_set.begin(), bondside_set.end());
    604 
    605         // re-add edge
    606         for (RemovedEdges_t::const_iterator edgeiter = RemovedEdges.begin();
    607             edgeiter != RemovedEdges.end(); ++edgeiter)
    608           BGcreator.addEdge(edgeiter->first, edgeiter->second);
    609 
    610         // update position with dampening factor on the discovered bonds
    611         for (BoostGraphHelpers::Nodeset_t::const_iterator setiter = bondside_set.begin();
    612             setiter != bondside_set.end(); ++setiter) {
    613           const BreadthFirstSearchGatherer::distance_map_t::const_iterator diter
    614             = distance_map.find(*setiter);
    615           ASSERT( diter != distance_map.end(),
    616               "ForceAnnealing() - could not find distance to an atom.");
    617           const double factor = pow(damping_factor, diter->second+1);
    618           LOG(3, "DEBUG: Update for atom #" << *setiter << " will be "
    619               << factor << "*" << PositionUpdate);
    620           if (GatheredUpdates.count((*setiter))) {
    621             GatheredUpdates[(*setiter)] += factor*PositionUpdate;
    622           } else {
    623             GatheredUpdates.insert(
    624                 std::make_pair(
    625                     (*setiter),
    626                     factor*PositionUpdate) );
     641          // perform limited-horizon BFS
     642          BoostGraphHelpers::Nodeset_t bondside_set;
     643          BreadthFirstSearchGatherer::distance_map_t distance_map;
     644          bondside_set = NodeGatherer(walker.getId(), max_distance);
     645          distance_map = NodeGatherer.getDistances();
     646          std::sort(bondside_set.begin(), bondside_set.end());
     647
     648          // re-add edge
     649          for (RemovedEdges_t::const_iterator edgeiter = RemovedEdges.begin();
     650              edgeiter != RemovedEdges.end(); ++edgeiter)
     651            BGcreator.addEdge(edgeiter->first, edgeiter->second);
     652
     653          // update position with dampening factor on the discovered bonds
     654          for (BoostGraphHelpers::Nodeset_t::const_iterator setiter = bondside_set.begin();
     655              setiter != bondside_set.end(); ++setiter) {
     656            const BreadthFirstSearchGatherer::distance_map_t::const_iterator diter
     657              = distance_map.find(*setiter);
     658            ASSERT( diter != distance_map.end(),
     659                "ForceAnnealing() - could not find distance to an atom.");
     660            const double factor = pow(damping_factor, diter->second+1);
     661            LOG(3, "DEBUG: Update for atom #" << *setiter << " will be "
     662                << factor << "*" << PositionUpdate);
     663            updateInserter(GatheredUpdates, LargestUpdate_per_Atom, *setiter, PositionUpdate, factor);
    627664          }
     665        } else {
     666          // simple atomic annealing, i.e. damping factor of 1
     667          updateInserter(GatheredUpdates, LargestUpdate_per_Atom, walker.getId(), PositionUpdate);
    628668        }
    629669      } else {
    630         // simple atomic annealing, i.e. damping factor of 1
    631         LOG(3, "DEBUG: Update for atom #" << walker.getId() << " will be " << PositionUpdate);
    632         GatheredUpdates.insert(
    633             std::make_pair(
    634                 walker.getId(),
    635                 PositionUpdate) );
     670        // hydrogens (are light-weighted and therefore) are always updated normally
     671        LOG(3, "DEBUG: Update for hydrogen #" << walker.getId() << " will be " << PositionUpdate);
     672        updateInserter(GatheredUpdates, LargestUpdate_per_Atom, walker.getId(), PositionUpdate);
    636673      }
    637674    }
     
    641678      atom &walker = *(*iter);
    642679      // extract largest components for showing progress of annealing
    643       const Vector currentGradient = walker.getAtomicForceAtStep(CurrentTimeStep);
     680      const Vector &currentGradient = walker.getAtomicForceAtStep(CurrentTimeStep);
    644681      for(size_t i=0;i<NDIM;++i)
    645682        maxComponents[i] = std::max(maxComponents[i], fabs(currentGradient[i]));
     
    670707      for (size_t i=0;i<NDIM;++i)
    671708        LargestUpdate[i] = std::max(LargestUpdate[i], fabs(update[i]));
    672       walker->setPositionAtStep(_TimeStep,
    673           walker->getPositionAtStep(CurrentTimeStep) + update); // - CommonTranslation);
     709
     710      std::map<atomId_t, double>::const_iterator largestiter = LargestUpdate_per_Atom.find(atomid);
     711      ASSERT( largestiter != LargestUpdate_per_Atom.end(),
     712          "ForceAnnealing() - walker with id "+toString(atomid)+" not in LargestUpdates.");
     713      // if we had large updates but their sum is very small
     714      if (update.Norm()/largestiter->second > MYEPSILON) {
     715        walker->setPositionAtStep(_TimeStep,
     716            walker->getPositionAtStep(CurrentTimeStep) + update); // - CommonTranslation);
     717      } else {
     718        // then recalc update with simple anneal
     719        LOG(2, "WARNING: Updates on atom " << *iter << " cancel themselves, performing simple anneal step.");
     720        annealAtom_BarzilaiBorwein(walker, OldTimeStep, CurrentTimeStep, _TimeStep);
     721      }
    674722    }
    675723    LOG(1, "STATUS: Largest absolute update components are " << LargestUpdate);
  • tests/Python/ForceAnnealing/post/five_carbon_test_bondgraph.data

    ra6c11a r3e334e  
    1313C       5       12.4    10      10      0       0       0       -0.0140232      0       0       4       0       0       0       
    1414# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    15 C       1       5.97149 10      10      0       0       0       -0.0379738      0       0       2       0       0       0       
    16 C       2       7.49973 10      10      0       0       0       -0.0373017      0       0       1       3       0       0       
    17 C       3       8.95748 10      10      0       0       0       0.150588        0       0       2       4       0       0       
    18 C       4       10.6998 10      10      0       0       0       -0.0373705      0       0       3       5       0       0       
    19 C       5       12.3715 10      10      0       0       0       -0.037942       0       0       4       0       0       0       
     15C       1       6.0272  10      10      0       0       0       -0.0269616      0       0       2       0       0       0       
     16C       2       7.57625 10      10      0       0       0       -0.156181       0       0       1       3       0       0       
     17C       3       8.83016 10      10      0       0       0       0.33054 0       0       2       4       0       0       
     18C       4       10.7087 10      10      0       0       0       -0.117287       0       0       3       5       0       0       
     19C       5       12.3656 10      10      0       0       0       -0.0301102      0       0       4       0       0       0       
    2020# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    21 C       1       5.93924 10      10      0       0       0       -0.0255169      0       0       2       0       0       0       
    22 C       2       7.49102 10      10      0       0       0       -0.00179391     0       0       1       3       0       0       
    23 C       3       9.03941 10      10      0       0       0       0.054664        0       0       2       4       0       0       
    24 C       4       10.6911 10      10      0       0       0       -0.00189975     0       0       3       5       0       0       
    25 C       5       12.3392 10      10      0       0       0       -0.0254534      0       0       4       0       0       0       
     21C       1       6.04114 10      10      0       0       0       -0.00806995     0       0       2       0       0       0       
     22C       2       7.62589 10      10      0       0       0       -0.147588       0       0       1       3       0       0       
     23C       3       8.93174 10      10      0       0       0       0.225858        0       0       2       4       0       0       
     24C       4       10.6644 10      10      0       0       0       -0.0370742      0       0       3       5       0       0       
     25C       5       12.327  10      10      0       0       0       -0.0331265      0       0       4       0       0       0       
    2626# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    27 C       1       5.90802 10      10      0       0       0       -0.0043763      0       0       2       0       0       0       
    28 C       2       7.49975 10      10      0       0       0       -0.00381008     0       0       1       3       0       0       
    29 C       3       9.08428 10      10      0       0       0       0.0163992       0       0       2       4       0       0       
    30 C       4       10.6998 10      10      0       0       0       -0.00376774     0       0       3       5       0       0       
    31 C       5       12.3082 10      10      0       0       0       -0.00444509     0       0       4       0       0       0       
     27C       1       6.06597 10      10      0       0       0       -0.0332429      0       0       2       0       0       0       
     28C       2       7.60315 10      10      0       0       0       -0.0764926      0       0       1       3       0       0       
     29C       3       8.99578 10      10      0       0       0       0.129484        0       0       2       4       0       0       
     30C       4       10.6331 10      10      0       0       0       0.0122663       0       0       3       5       0       0       
     31C       5       12.2936 10      10      0       0       0       -0.0320152      0       0       4       0       0       0       
    3232# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    33 C       1       5.90803 10      10      0       0       0       -0.00860971     0       0       2       0       0       0       
    34 C       2       7.49176 10      10      0       0       0       0.013748        0       0       1       3       0       0       
    35 C       3       9.10147 10      10      0       0       0       -0.0107846      0       0       2       4       0       0       
    36 C       4       10.6908 10      10      0       0       0       0.0146953       0       0       3       5       0       0       
    37 C       5       12.3079 10      10      0       0       0       -0.00904893     0       0       4       0       0       0       
     33C       1       6.05977 10      10      0       0       0       -0.0256492      0       0       2       0       0       0       
     34C       2       7.6113  10      10      0       0       0       -0.0706293      0       0       1       3       0       0       
     35C       3       9.02936 10      10      0       0       0       0.0940242       0       0       2       4       0       0       
     36C       4       10.6251 10      10      0       0       0       0.0298773       0       0       3       5       0       0       
     37C       5       12.2773 10      10      0       0       0       -0.0276231      0       0       4       0       0       0       
    3838# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    39 C       1       5.90707 10      10      0       0       0       -0.00627604     0       0       2       0       0       0       
    40 C       2       7.49521 10      10      0       0       0       0.00658296      0       0       1       3       0       0       
    41 C       3       9.09579 10      10      0       0       0       -0.000672055    0       0       2       4       0       0       
    42 C       4       10.6951 10      10      0       0       0       0.00660942      0       0       3       5       0       0       
    43 C       5       12.3069 10      10      0       0       0       -0.00624429     0       0       4       0       0       0       
     39C       1       6.06029 10      10      0       0       0       -0.0336927      0       0       2       0       0       0       
     40C       2       7.59662 10      10      0       0       0       -0.0424771      0       0       1       3       0       0       
     41C       3       9.05268 10      10      0       0       0       0.0561775       0       0       2       4       0       0       
     42C       4       10.6149 10      10      0       0       0       0.044652        0       0       3       5       0       0       
     43C       5       12.2615 10      10      0       0       0       -0.0246597      0       0       4       0       0       0       
    4444# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    45 C       1       5.90506 10      10      0       0       0       -0.0041805      0       0       2       0       0       0       
    46 C       2       7.49716 10      10      0       0       0       0.00328619      0       0       1       3       0       0       
    47 C       3       9.09547 10      10      0       0       0       0.0018627       0       0       2       4       0       0       
    48 C       4       10.6973 10      10      0       0       0       0.00310627      0       0       3       5       0       0       
    49 C       5       12.305  10      10      0       0       0       -0.00407466     0       0       4       0       0       0       
     45C       1       6.06307 10      10      0       0       0       -0.0372594      0       0       2       0       0       0       
     46C       2       7.59266 10      10      0       0       0       -0.0322851      0       0       1       3       0       0       
     47C       3       9.06124 10      10      0       0       0       0.0483562       0       0       2       4       0       0       
     48C       4       10.6212 10      10      0       0       0       0.039339        0       0       3       5       0       0       
     49C       5       12.2555 10      10      0       0       0       -0.0181508      0       0       4       0       0       0       
    5050# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    51 C       1       5.90296 10      10      0       0       0       -0.00220138     0       0       2       0       0       0       
    52 C       2       7.4988  10      10      0       0       0       0.00074614      0       0       1       3       0       0       
    53 C       3       9.09605 10      10      0       0       0       0.00296339      0       0       2       4       0       0       
    54 C       4       10.6989 10      10      0       0       0       0.000820225     0       0       3       5       0       0       
    55 C       5       12.3033 10      10      0       0       0       -0.00232838     0       0       4       0       0       0       
     51C       1       6.05413 10      10      0       0       0       -0.0338621      0       0       2       0       0       0       
     52C       2       7.59014 10      10      0       0       0       -0.0262525      0       0       1       3       0       0       
     53C       3       9.07654 10      10      0       0       0       0.03718 0       0       2       4       0       0       
     54C       4       10.6332 10      10      0       0       0       0.0346294       0       0       3       5       0       0       
     55C       5       12.2553 10      10      0       0       0       -0.0116948      0       0       4       0       0       0       
    5656# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    57 C       1       5.90167 10      10      0       0       0       -0.00123827     0       0       2       0       0       0       
    58 C       2       7.49933 10      10      0       0       0       0.00026988      0       0       1       3       0       0       
    59 C       3       9.0975  10      10      0       0       0       0.00207967      0       0       2       4       0       0       
    60 C       4       10.6996 10      10      0       0       0       0.000158753     0       0       3       5       0       0       
    61 C       5       12.302  10      10      0       0       0       -0.00127003     0       0       4       0       0       0       
     57C       1       6.04174 10      10      0       0       0       -0.0298615      0       0       2       0       0       0       
     58C       2       7.58531 10      10      0       0       0       -0.0215798      0       0       1       3       0       0       
     59C       3       9.0881  10      10      0       0       0       0.0297451       0       0       2       4       0       0       
     60C       4       10.6471 10      10      0       0       0       0.0297927       0       0       3       5       0       0       
     61C       5       12.2624 10      10      0       0       0       -0.00809641     0       0       4       0       0       0       
    6262# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    63 C       1       5.90028 10      10      0       0       0       -0.00041805     0       0       2       0       0       0       
    64 C       2       7.49949 10      10      0       0       0       0.000719681     0       0       1       3       0       0       
    65 C       3       9.10006 10      10      0       0       0       -0.000545053    0       0       2       4       0       0       
    66 C       4       10.6996 10      10      0       0       0       0.000772599     0       0       3       5       0       0       
    67 C       5       12.3006 10      10      0       0       0       -0.000529177    0       0       4       0       0       0       
     63C       1       6.03225 10      10      0       0       0       -0.0288878      0       0       2       0       0       0       
     64C       2       7.57766 10      10      0       0       0       -0.0119753      0       0       1       3       0       0       
     65C       3       9.10044 10      10      0       0       0       0.0169231       0       0       2       4       0       0       
     66C       4       10.6552 10      10      0       0       0       0.0240987       0       0       3       5       0       0       
     67C       5       12.2555 10      10      0       0       0       -0.000158753    0       0       4       0       0       0       
    6868# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    69 C       1       5.90018 10      10      0       0       0       -0.000158753    0       0       2       0       0       0       
    70 C       2       7.49988 10      10      0       0       0       0.00014817      0       0       1       3       0       0       
    71 C       3       9.09986 10      10      0       0       0       -2.11671e-05    0       0       2       4       0       0       
    72 C       4       10.6998 10      10      0       0       0       0.000296339     0       0       3       5       0       0       
    73 C       5       12.3003 10      10      0       0       0       -0.000264589    0       0       4       0       0       0       
     69C       1       6.02128 10      10      0       0       0       -0.0257233      0       0       2       0       0       0       
     70C       2       7.57267 10      10      0       0       0       -0.00809641     0       0       1       3       0       0       
     71C       3       9.10876 10      10      0       0       0       0.0102396       0       0       2       4       0       0       
     72C       4       10.6642 10      10      0       0       0       0.0180238       0       0       3       5       0       0       
     73C       5       12.2537 10      10      0       0       0       0.00555636      0       0       4       0       0       0       
    7474# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    75 C       1       5.90014 10      10      0       0       0       -9.52519e-05    0       0       2       0       0       0       
    76 C       2       7.49996 10      10      0       0       0       4.7626e-05      0       0       1       3       0       0       
    77 C       3       9.09987 10      10      0       0       0       6.35013e-05     0       0       2       4       0       0       
    78 C       4       10.6999 10      10      0       0       0       0.000142878     0       0       3       5       0       0       
    79 C       5       12.3002 10      10      0       0       0       -0.000158753    0       0       4       0       0       0       
     75C       1       6.01067 10      10      0       0       0       -0.0232044      0       0       2       0       0       0       
     76C       2       7.56682 10      10      0       0       0       -0.00519652     0       0       1       3       0       0       
     77C       3       9.11315 10      10      0       0       0       0.00588445      0       0       2       4       0       0       
     78C       4       10.6706 10      10      0       0       0       0.013203        0       0       3       5       0       0       
     79C       5       12.253  10      10      0       0       0       0.00931352      0       0       4       0       0       0       
    8080# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    81 C       1       5.90011 10      10      0       0       0       -5.82095e-05    0       0       2       0       0       0       
    82 C       2       7.5     10      10      0       0       0       0       0       0       1       3       0       0       
    83 C       3       9.09989 10      10      0       0       0       0.000116419     0       0       2       4       0       0       
    84 C       4       10.7    10      10      0       0       0       -5.29177e-06    0       0       3       5       0       0       
    85 C       5       12.3001 10      10      0       0       0       -5.29177e-05    0       0       4       0       0       0       
     81C       1       6.00041 10      10      0       0       0       -0.0206961      0       0       2       0       0       0       
     82C       2       7.5613  10      10      0       0       0       -0.00374128     0       0       1       3       0       0       
     83C       3       9.11512 10      10      0       0       0       0.00320681      0       0       2       4       0       0       
     84C       4       10.675  10      10      0       0       0       0.00937702      0       0       3       5       0       0       
     85C       5       12.2526 10      10      0       0       0       0.0118536       0       0       4       0       0       0       
    8686# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    87 C       1       5.90008 10      10      0       0       0       -4.23342e-05    0       0       2       0       0       0       
    88 C       2       7.5     10      10      0       0       0       5.29177e-06     0       0       1       3       0       0       
    89 C       3       9.09993 10      10      0       0       0       7.40848e-05     0       0       2       4       0       0       
    90 C       4       10.7    10      10      0       0       0       -3.70424e-05    0       0       3       5       0       0       
    91 C       5       12.3    10      10      0       0       0       1.35525e-21     0       0       4       0       0       0       
     87C       1       5.99076 10      10      0       0       0       -0.0184524      0       0       2       0       0       0       
     88C       2       7.55589 10      10      0       0       0       -0.00304806     0       0       1       3       0       0       
     89C       3       9.11526 10      10      0       0       0       0.00204792      0       0       2       4       0       0       
     90C       4       10.6785 10      10      0       0       0       0.00574686      0       0       3       5       0       0       
     91C       5       12.2526 10      10      0       0       0       0.0137057       0       0       4       0       0       0       
    9292# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    93 C       1       5.90004 10      10      0       0       0       0       0       0       2       0       0       0       
    94 C       2       7.50001 10      10      0       0       0       0       0       0       1       3       0       0       
    95 C       3       9.09999 10      10      0       0       0       0       0       0       2       4       0       0       
    96 C       4       10.6999 10      10      0       0       0       0       0       0       3       5       0       0       
    97 C       5       12.3    10      10      0       0       0       0       0       0       4       0       0       0       
     93C       1       5.98163 10      10      0       0       0       -0.0166426      0       0       2       0       0       0       
     94C       2       7.55018 10      10      0       0       0       -0.00277289     0       0       1       3       0       0       
     95C       3       9.11349 10      10      0       0       0       0.0014817       0       0       2       4       0       0       
     96C       4       10.6796 10      10      0       0       0       0.00327561      0       0       3       5       0       0       
     97C       5       12.2519 10      10      0       0       0       0.0146582       0       0       4       0       0       0       
     98# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     99C       1       5.97375 10      10      0       0       0       -0.0148328      0       0       2       0       0       0       
     100C       2       7.54572 10      10      0       0       0       -0.00236542     0       0       1       3       0       0       
     101C       3       9.11322 10      10      0       0       0       0.000624429     0       0       2       4       0       0       
     102C       4       10.6819 10      10      0       0       0       0.00345024      0       0       3       5       0       0       
     103C       5       12.2571 10      10      0       0       0       0.0131236       0       0       4       0       0       0       
     104# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     105C       1       5.96682 10      10      0       0       0       -0.0131448      0       0       2       0       0       0       
     106C       2       7.54198 10      10      0       0       0       -0.001995       0       0       1       3       0       0       
     107C       3       9.11337 10      10      0       0       0       0.000550344     0       0       2       4       0       0       
     108C       4       10.6858 10      10      0       0       0       0.00263001      0       0       3       5       0       0       
     109C       5       12.2632 10      10      0       0       0       0.0119594       0       0       4       0       0       0       
     110# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     111C       1       5.96072 10      10      0       0       0       -0.0116049      0       0       2       0       0       0       
     112C       2       7.53879 10      10      0       0       0       -0.00168808     0       0       1       3       0       0       
     113C       3       9.11367 10      10      0       0       0       0.000343965     0       0       2       4       0       0       
     114C       4       10.6892 10      10      0       0       0       0.00210083      0       0       3       5       0       0       
     115C       5       12.2687 10      10      0       0       0       0.0108481       0       0       4       0       0       0       
     116# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     117C       1       5.95531 10      10      0       0       0       -0.0102343      0       0       2       0       0       0       
     118C       2       7.53597 10      10      0       0       0       -0.00147111     0       0       1       3       0       0       
     119C       3       9.11385 10      10      0       0       0       0.000195796     0       0       2       4       0       0       
     120C       4       10.6921 10      10      0       0       0       0.00182566      0       0       3       5       0       0       
     121C       5       12.2738 10      10      0       0       0       0.00968394      0       0       4       0       0       0       
     122# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     123C       1       5.95052 10      10      0       0       0       -0.00902776     0       0       2       0       0       0       
     124C       2       7.53346 10      10      0       0       0       -0.0012859      0       0       1       3       0       0       
     125C       3       9.11397 10      10      0       0       0       0.000116419     0       0       2       4       0       0       
     126C       4       10.6947 10      10      0       0       0       0.00151874      0       0       3       5       0       0       
     127C       5       12.2783 10      10      0       0       0       0.00867851      0       0       4       0       0       0       
     128# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     129C       1       5.94629 10      10      0       0       0       -0.00796941     0       0       2       0       0       0       
     130C       2       7.53123 10      10      0       0       0       -0.00112715     0       0       1       3       0       0       
     131C       3       9.11404 10      10      0       0       0       7.93766e-05     0       0       2       4       0       0       
     132C       4       10.697  10      10      0       0       0       0.00129119      0       0       3       5       0       0       
     133C       5       12.2824 10      10      0       0       0       0.00772599      0       0       4       0       0       0       
     134# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     135C       1       5.94255 10      10      0       0       0       -0.00703277     0       0       2       0       0       0       
     136C       2       7.52926 10      10      0       0       0       -0.000989561    0       0       1       3       0       0       
     137C       3       9.1141  10      10      0       0       0       3.17506e-05     0       0       2       4       0       0       
     138C       4       10.699  10      10      0       0       0       0.00111127      0       0       3       5       0       0       
     139C       5       12.286  10      10      0       0       0       0.0068793       0       0       4       0       0       0       
     140# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     141C       1       5.93925 10      10      0       0       0       -0.00620725     0       0       2       0       0       0       
     142C       2       7.52752 10      10      0       0       0       -0.000883726    0       0       1       3       0       0       
     143C       3       9.11412 10      10      0       0       0       4.23342e-05     0       0       2       4       0       0       
     144C       4       10.7008 10      10      0       0       0       0.000963103     0       0       3       5       0       0       
     145C       5       12.2893 10      10      0       0       0       0.00608554      0       0       4       0       0       0       
     146# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     147C       1       5.93633 10      10      0       0       0       -0.00547698     0       0       2       0       0       0       
     148C       2       7.52598 10      10      0       0       0       -0.000783182    0       0       1       3       0       0       
     149C       3       9.11415 10      10      0       0       0       4.23342e-05     0       0       2       4       0       0       
     150C       4       10.7024 10      10      0       0       0       0.000767307     0       0       3       5       0       0       
     151C       5       12.2921 10      10      0       0       0       0.00545053      0       0       4       0       0       0       
     152# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     153C       1       5.93375 10      10      0       0       0       -0.00484197     0       0       2       0       0       0       
     154C       2       7.5246  10      10      0       0       0       -0.000693222    0       0       1       3       0       0       
     155C       3       9.11414 10      10      0       0       0       1.05835e-05     0       0       2       4       0       0       
     156C       4       10.7037 10      10      0       0       0       0.000762015     0       0       3       5       0       0       
     157C       5       12.2947 10      10      0       0       0       0.0047626       0       0       4       0       0       0       
     158# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     159C       1       5.93147 10      10      0       0       0       -0.00427575     0       0       2       0       0       0       
     160C       2       7.52339 10      10      0       0       0       -0.000613846    0       0       1       3       0       0       
     161C       3       9.11415 10      10      0       0       0       -5.29177e-06    0       0       2       4       0       0       
     162C       4       10.7049 10      10      0       0       0       0.000661472     0       0       3       5       0       0       
     163C       5       12.2969 10      10      0       0       0       0.00423342      0       0       4       0       0       0       
     164# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     165C       1       5.92946 10      10      0       0       0       -0.00377833     0       0       2       0       0       0       
     166C       2       7.52232 10      10      0       0       0       -0.000539761    0       0       1       3       0       0       
     167C       3       9.11416 10      10      0       0       0       -8.67362e-20    0       0       2       4       0       0       
     168C       4       10.706  10      10      0       0       0       0.000560928     0       0       3       5       0       0       
     169C       5       12.2989 10      10      0       0       0       0.00375716      0       0       4       0       0       0       
     170# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     171C       1       5.92768 10      10      0       0       0       -0.00333911     0       0       2       0       0       0       
     172C       2       7.52137 10      10      0       0       0       -0.00047626     0       0       1       3       0       0       
     173C       3       9.11416 10      10      0       0       0       2.64589e-05     0       0       2       4       0       0       
     174C       4       10.707  10      10      0       0       0       0.000455092     0       0       3       5       0       0       
     175C       5       12.3007 10      10      0       0       0       0.00333382      0       0       4       0       0       0       
     176# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     177C       1       5.92611 10      10      0       0       0       -0.00295281     0       0       2       0       0       0       
     178C       2       7.52053 10      10      0       0       0       -0.00041805     0       0       1       3       0       0       
     179C       3       9.11416 10      10      0       0       0       5.29177e-06     0       0       2       4       0       0       
     180C       4       10.7078 10      10      0       0       0       0.000455092     0       0       3       5       0       0       
     181C       5       12.3023 10      10      0       0       0       0.00291047      0       0       4       0       0       0       
     182# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
     183C       1       5.92469 10      10      0       0       0       0       0       0       2       0       0       0       
     184C       2       7.51974 10      10      0       0       0       0       0       0       1       3       0       0       
     185C       3       9.11405 10      10      0       0       0       0       0       0       2       4       0       0       
     186C       4       10.7083 10      10      0       0       0       0       0       0       3       5       0       0       
     187C       5       12.3036 10      10      0       0       0       0       0       0       4       0       0       0       
  • tests/Python/ForceAnnealing/post/five_carbon_test_no-bondgraph.data

    ra6c11a r3e334e  
    2525C       5       12.3968 10      10      0       0       0       -0.0554578      0       0       4       0       0       0       
    2626# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    27 C       1       5.98683 10      10      0       0       0       0.0968606       0       0       2       0       0       0       
    28 C       2       7.76987 10      10      0       0       0       -0.226176       0       0       1       3       0       0       
    29 C       3       9.1255  10      10      0       0       0       0.259281        0       0       2       4       0       0       
    30 C       4       10.9711 10      10      0       0       0       -0.227493       0       0       3       5       0       0       
    31 C       5       12.3868 10      10      0       0       0       0.0975274       0       0       4       0       0       0       
     27C       1       5.98683 10      10      0       0       0       -0.0286179      0       0       2       0       0       0       
     28C       2       7.53275 10      10      0       0       0       0.00789532      0       0       1       3       0       0       
     29C       3       9.09359 10      10      0       0       0       0.0414187       0       0       2       4       0       0       
     30C       4       10.7327 10      10      0       0       0       0.00793237      0       0       3       5       0       0       
     31C       5       12.3868 10      10      0       0       0       -0.0286285      0       0       4       0       0       0       
    3232# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    33 C       1       5.99318 10      10      0       0       0       -0.0310892      0       0       2       0       0       0       
    34 C       2       7.53443 10      10      0       0       0       0.0629615       0       0       1       3       0       0       
    35 C       3       9.19466 10      10      0       0       0       -0.0637606      0       0       2       4       0       0       
    36 C       4       10.7344 10      10      0       0       0       0.0630038       0       0       3       5       0       0       
    37 C       5       12.3932 10      10      0       0       0       -0.0311156      0       0       4       0       0       0       
     33C       1       5.9762  10      10      0       0       0       -0.0188123      0       0       2       0       0       0       
     34C       2       7.54065 10      10      0       0       0       0.0158277       0       0       1       3       0       0       
     35C       3       9.13501 10      10      0       0       0       0.00599558      0       0       2       4       0       0       
     36C       4       10.7407 10      10      0       0       0       0.0157219       0       0       3       5       0       0       
     37C       5       12.3761 10      10      0       0       0       -0.0187329      0       0       4       0       0       0       
    3838# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    39 C       1       5.99164 10      10      0       0       0       -0.00314331     0       0       2       0       0       0       
    40 C       2       7.5857  10      10      0       0       0       0.000661472     0       0       1       3       0       0       
    41 C       3       9.18101 10      10      0       0       0       0.00496368      0       0       2       4       0       0       
    42 C       4       10.7857 10      10      0       0       0       0.000640304     0       0       3       5       0       0       
    43 C       5       12.3916 10      10      0       0       0       -0.00312215     0       0       4       0       0       0       
     39C       1       5.95739 10      10      0       0       0       -0.000523885    0       0       2       0       0       0       
     40C       2       7.5564  10      10      0       0       0       -0.00762015     0       0       1       3       0       0       
     41C       3       9.14101 10      10      0       0       0       0.0162881       0       0       2       4       0       0       
     42C       4       10.7564 10      10      0       0       0       -0.00761486     0       0       3       5       0       0       
     43C       5       12.3574 10      10      0       0       0       -0.000529177    0       0       4       0       0       0       
    4444# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    45 C       1       5.99146 10      10      0       0       0       -0.00276231     0       0       2       0       0       0       
    46 C       2       7.58624 10      10      0       0       0       0.000513302     0       0       1       3       0       0       
    47 C       3       9.18199 10      10      0       0       0       0.00447684      0       0       2       4       0       0       
    48 C       4       10.7862 10      10      0       0       0       0.000576803     0       0       3       5       0       0       
    49 C       5       12.3915 10      10      0       0       0       -0.00280464     0       0       4       0       0       0       
     45C       1       5.95686 10      10      0       0       0       -0.00295281     0       0       2       0       0       0       
     46C       2       7.55128 10      10      0       0       0       0.00253476      0       0       1       3       0       0       
     47C       3       9.15049 10      10      0       0       0       0.000846684     0       0       2       4       0       0       
     48C       4       10.7513 10      10      0       0       0       0.00253476      0       0       3       5       0       0       
     49C       5       12.3569 10      10      0       0       0       -0.00296339     0       0       4       0       0       0       
    5050# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    51 C       1       5.99021 10      10      0       0       0       -0.00110069     0       0       2       0       0       0       
    52 C       2       7.58813 10      10      0       0       0       0.00265118      0       0       1       3       0       0       
    53 C       3       9.19106 10      10      0       0       0       -0.00158224     0       0       2       4       0       0       
    54 C       4       10.791  10      10      0       0       0       -0.000497427    0       0       3       5       0       0       
    55 C       5       12.39   10      10      0       0       0       0.000529177     0       0       4       0       0       0       
     51C       1       5.95623 10      10      0       0       0       -0.00194208     0       0       2       0       0       0       
     52C       2       7.55256 10      10      0       0       0       0.00112186      0       0       1       3       0       0       
     53C       3       9.15101 10      10      0       0       0       0.0016087       0       0       2       4       0       0       
     54C       4       10.7525 10      10      0       0       0       0.00116948      0       0       3       5       0       0       
     55C       5       12.3562 10      10      0       0       0       -0.00195796     0       0       4       0       0       0       
    5656# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    57 C       1       5.98937 10      10      0       0       0       0.000582095     0       0       2       0       0       0       
    58 C       2       7.59047 10      10      0       0       0       -0.00152403     0       0       1       3       0       0       
    59 C       3       9.18869 10      10      0       0       0       0.00100015      0       0       2       4       0       0       
    60 C       4       10.7888 10      10      0       0       0       0.000682639     0       0       3       5       0       0       
    61 C       5       12.3902 10      10      0       0       0       -0.000740848    0       0       4       0       0       0       
     57C       1       5.955   10      10      0       0       0       -0.000751432    0       0       2       0       0       0       
     58C       2       7.55358 10      10      0       0       0       -2.64589e-05    0       0       1       3       0       0       
     59C       3       9.15211 10      10      0       0       0       0.00156636      0       0       2       4       0       0       
     60C       4       10.7536 10      10      0       0       0       -4.7626e-05     0       0       3       5       0       0       
     61C       5       12.355  10      10      0       0       0       -0.000740848    0       0       4       0       0       0       
    6262# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    63 C       1       5.98966 10      10      0       0       0       -2.64589e-05    0       0       2       0       0       0       
    64 C       2       7.58961 10      10      0       0       0       2.64589e-05     0       0       1       3       0       0       
    65 C       3       9.18961 10      10      0       0       0       0.000259297     0       0       2       4       0       0       
    66 C       4       10.7901 10      10      0       0       0       -0.000259297    0       0       3       5       0       0       
    67 C       5       12.3901 10      10      0       0       0       0       0       0       4       0       0       0       
     63C       1       5.95425 10      10      0       0       0       -0.000370424    0       0       2       0       0       0       
     64C       2       7.55355 10      10      0       0       0       0.000439217     0       0       1       3       0       0       
     65C       3       9.15368 10      10      0       0       0       -0.000111127    0       0       2       4       0       0       
     66C       4       10.7536 10      10      0       0       0       0.000359841     0       0       3       5       0       0       
     67C       5       12.3542 10      10      0       0       0       -0.000317506    0       0       4       0       0       0       
    6868# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    69 C       1       5.98965 10      10      0       0       0       -1.05835e-05    0       0       2       0       0       0       
    70 C       2       7.58963 10      10      0       0       0       0.000169337     0       0       1       3       0       0       
    71 C       3       9.18993 10      10      0       0       0       -0.000280464    0       0       2       4       0       0       
    72 C       4       10.7897 10      10      0       0       0       0.000333382     0       0       3       5       0       0       
    73 C       5       12.3901 10      10      0       0       0       -0.000211671    0       0       4       0       0       0       
     69C       1       5.95388 10      10      0       0       0       -0.000164045    0       0       2       0       0       0       
     70C       2       7.55357 10      10      0       0       0       0.000169337     0       0       1       3       0       0       
     71C       3       9.15358 10      10      0       0       0       5.29177e-06     0       0       2       4       0       0       
     72C       4       10.7536 10      10      0       0       0       0.00014817      0       0       3       5       0       0       
     73C       5       12.3539 10      10      0       0       0       -0.000158753    0       0       4       0       0       0       
    7474# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    75 C       1       5.98964 10      10      0       0       0       1.35525e-21     0       0       2       0       0       0       
    76 C       2       7.58964 10      10      0       0       0       6.35013e-05     0       0       1       3       0       0       
    77 C       3       9.18976 10      10      0       0       0       1.05835e-05     0       0       2       4       0       0       
    78 C       4       10.7899 10      10      0       0       0       -2.11671e-05    0       0       3       5       0       0       
    79 C       5       12.39   10      10      0       0       0       -5.29177e-05    0       0       4       0       0       0       
     75C       1       5.95372 10      10      0       0       0       -6.8793e-05     0       0       2       0       0       0       
     76C       2       7.55359 10      10      0       0       0       6.35013e-05     0       0       1       3       0       0       
     77C       3       9.15358 10      10      0       0       0       6.8793e-05      0       0       2       4       0       0       
     78C       4       10.7537 10      10      0       0       0       -1.05835e-05    0       0       3       5       0       0       
     79C       5       12.3538 10      10      0       0       0       -5.29177e-05    0       0       4       0       0       0       
    8080# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    81 C       1       5.98964 10      10      0       0       0       5.29177e-06     0       0       2       0       0       0       
    82 C       2       7.58965 10      10      0       0       0       5.82095e-05     0       0       1       3       0       0       
    83 C       3       9.18977 10      10      0       0       0       5.29177e-06     0       0       2       4       0       0       
    84 C       4       10.7899 10      10      0       0       0       -1.58753e-05    0       0       3       5       0       0       
    85 C       5       12.39   10      10      0       0       0       -5.29177e-05    0       0       4       0       0       0       
     81C       1       5.95365 10      10      0       0       0       -2.64589e-05    0       0       2       0       0       0       
     82C       2       7.5536  10      10      0       0       0       2.11671e-05     0       0       1       3       0       0       
     83C       3       9.15359 10      10      0       0       0       6.35013e-05     0       0       2       4       0       0       
     84C       4       10.7537 10      10      0       0       0       -5.82095e-05    0       0       3       5       0       0       
     85C       5       12.3537 10      10      0       0       0       1.35525e-21     0       0       4       0       0       0       
    8686# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    87 C       1       5.98964 10      10      0       0       0       6.8793e-05      0       0       2       0       0       0       
    88 C       2       7.58977 10      10      0       0       0       -6.8793e-05     0       0       1       3       0       0       
    89 C       3       9.18977 10      10      0       0       0       6.8793e-05      0       0       2       4       0       0       
    90 C       4       10.7899 10      10      0       0       0       -1.58753e-05    0       0       3       5       0       0       
    91 C       5       12.39   10      10      0       0       0       -5.29177e-05    0       0       4       0       0       0       
     87C       1       5.95362 10      10      0       0       0       -1.05835e-05    0       0       2       0       0       0       
     88C       2       7.5536  10      10      0       0       0       3.70424e-05     0       0       1       3       0       0       
     89C       3       9.15365 10      10      0       0       0       2.03288e-21     0       0       2       4       0       0       
     90C       4       10.7537 10      10      0       0       0       -2.64589e-05    0       0       3       5       0       0       
     91C       5       12.3537 10      10      0       0       0       2.03288e-21     0       0       4       0       0       0       
    9292# ATOMDATA      type    Id      x=3     u=3     F=3     neighbors=4
    93 C       1       5.98964 10      10      0       0       0       0       0       0       2       0       0       0       
    94 C       2       7.58971 10      10      0       0       0       0       0       0       1       3       0       0       
    95 C       3       9.18978 10      10      0       0       0       0       0       0       2       4       0       0       
    96 C       4       10.7899 10      10      0       0       0       0       0       0       3       5       0       0       
    97 C       5       12.39   10      10      0       0       0       0       0       0       4       0       0       0       
     93C       1       5.95361 10      10      0       0       0       0       0       0       2       0       0       0       
     94C       2       7.55361 10      10      0       0       0       0       0       0       1       3       0       0       
     95C       3       9.15365 10      10      0       0       0       0       0       0       2       4       0       0       
     96C       4       10.7536 10      10      0       0       0       0       0       0       3       5       0       0       
     97C       5       12.3537 10      10      0       0       0       0       0       0       4       0       0       0       
  • tests/Python/ForceAnnealing/testsuite-python-forceannealing-ising.at

    ra6c11a r3e334e  
    4444AT_SETUP([Python externalization - Force Annealing with bondgraph on 2-body Ising model])
    4545AT_KEYWORDS([python force-annealing ising bondgraph])
    46 AT_SKIP_IF([/bin/true])
    47 #AT_SKIP_IF([../../run ${abs_top_srcdir}/tests/Python/numpy_check.py])
     46AT_SKIP_IF([../../run ${abs_top_srcdir}/tests/Python/numpy_check.py])
    4847
    4948# we use forces from a simple Ising model with 2 "carbon" atoms in a row along the x axis
     
    5857AT_SETUP([Python externalization - Force Annealing with bondgraph on 5-body Ising model])
    5958AT_KEYWORDS([python force-annealing ising bondgraph])
    60 AT_SKIP_IF([/bin/true])
    61 #AT_SKIP_IF([../../run ${abs_top_srcdir}/tests/Python/numpy_check.py])
     59AT_SKIP_IF([../../run ${abs_top_srcdir}/tests/Python/numpy_check.py])
    6260
    6361# we use forces from a simple Ising model with 5 "carbon" atoms in a row along the x axis
    6462
    6563file=five_carbon_test.data
    66 AT_CHECK([../../run ${abs_top_srcdir}/tests/Python/ForceAnnealing/pre/ising_model_chain.py ./$file ./ 15 5 "1"], 0, [stdout], [ignore])
    67 AT_CHECK([grep "Largest remaining force components.*e-05" stdout], 0, [ignore], [ignore])
     64AT_CHECK([../../run ${abs_top_srcdir}/tests/Python/ForceAnnealing/pre/ising_model_chain.py ./$file ./ 30 5 "1"], 0, [stdout], [ignore])
     65AT_CHECK([grep "Largest remaining force components.*0.00" stdout], 0, [ignore], [ignore])
    6866AT_CHECK([diff $file ${abs_top_srcdir}/tests/Python/ForceAnnealing/post/five_carbon_test_bondgraph.data], 0, [ignore], [ignore])
    6967
  • tests/integration/StructureOptimization/testsuite-integration-structureoptimization-ethane.at

    ra6c11a r3e334e  
    2121AT_SETUP([Structure Optimization - ethane])
    2222AT_KEYWORDS([optimize-structure ethane])
    23 AT_SKIP_IF([/bin/true])
    2423
    2524# check that ports are unique over all tests such that they may run in parallel
  • tests/integration/StructureOptimization/testsuite-integration-structureoptimization-methane.at

    ra6c11a r3e334e  
    2121AT_SETUP([Structure Optimization - methane])
    2222AT_KEYWORDS([optimize-structure methane])
    23 AT_SKIP_IF([/bin/true])
    2423
    2524# check that ports are unique over all tests such that they may run in parallel
     
    7372components=`grep "at step #30 are (.*,.*,.*)" stdout | sed -e "s#.*(\(.*\),\(.*\),\(.*\)).*#\1\t\2\t\3#"`
    7473echo "remaining components are ($components)"
    75 threshold="1.2e-3"
    76 AT_CHECK([echo "$components" | awk -v threshold="$threshold" -F"\t" '{ for (i=0;i<3;++i) { if (($i > threshold) || ($i < -threshold)) exit 5} }'], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
     74threshold="2e-4"
     75AT_CHECK([echo "$components" | awk -v threshold="$threshold" -F"\t" '{ for (i=0;i<3;++i) { if ((($i+0.) > (threshold+0.)) || (($i+0.) < (-threshold+0.))) exit 5} }'], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
    7776
    7877# send removeall to server such that all workers shutdown
  • tests/integration/StructureOptimization/testsuite-integration-structureoptimization-water.at

    ra6c11a r3e334e  
    2121AT_SETUP([Structure Optimization - water])
    2222AT_KEYWORDS([optimize-structure water])
    23 AT_SKIP_IF([/bin/true])
    2423
    2524# check that ports are unique over all tests such that they may run in parallel
     
    7372components=`grep "at step #30 are (.*,.*,.*)" stdout | sed -e "s#.*(\(.*\),\(.*\),\(.*\)).*#\1\t\2\t\3#"`
    7473echo "remaining components are ($components)"
    75 threshold="6e-4"
    76 AT_CHECK([echo "$components" | awk -v threshold="$threshold" -F"\t" '{ for (i=0;i<3;++i) { if (($i > threshold) || ($i < -threshold)) exit 5} }'], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
     74threshold="3e-5"
     75AT_CHECK([echo "$components" | awk -v threshold="$threshold" -F"\t" '{ for (i=0;i<3;++i) { if ((($i+0.) > (threshold+0.)) || (($i+0.) < (-threshold+0.))) exit 5} }'], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
    7776
    7877# send removeall to server such that all workers shutdown
  • tests/integration/testsuite-integration.at

    ra6c11a r3e334e  
    2525
    2626# check integration of structure optimization
    27 #m4_include([StructureOptimization/testsuite-integration-structureoptimization.at])
     27m4_include([StructureOptimization/testsuite-integration-structureoptimization.at])
    2828
    2929# check integration of potential fitting
Note: See TracChangeset for help on using the changeset viewer.