Changeset ff2c52


Ignore:
Timestamp:
Apr 23, 2021, 8:55:19 PM (5 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
5196ca
Parents:
9171d8
git-author:
Frederik Heber <frederik.heber@…> (03/28/21 11:47:07)
git-committer:
Frederik Heber <frederik.heber@…> (04/23/21 20:55:19)
Message:

ParseHomologies action lists values and their energy range per key.

  • i.e. we get how many values are stored per homology graph.
  • DOCU: Added note in userguide.
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • doc/userguide/userguide.xml

    r9171d8 rff2c52  
    22422242        <para>This parses the all homologies contained in the file
    22432243        <filename>homologies.dat</filename> and <emphasis role="italic">appends</emphasis> them to the homology
    2244         container.</para>
     2244        container. It will also print all found homology graphs and the range
     2245        of energies calculated for them if the <link linkend="various.verbose">verbosity</link>
     2246        is suitably set.</para>
    22452247        <programlisting>... --save-homologies homologies.dat</programlisting>
    22462248        <para>Complementary, this stores the current contents of the homology
  • src/Actions/GraphAction/ChemicalSpaceEvaluatorAction.cpp

    r9171d8 rff2c52  
    299299}
    300300
    301 
    302 bool compareEnergyContribution(
    303       const std::pair<const HomologyGraph, HomologyContainer::value_t> &a,
    304       const std::pair<const HomologyGraph, HomologyContainer::value_t> &b) {
    305   return a.second.energy < b.second.energy;
    306 }
    307 
    308301ActionState::ptr GraphChemicalSpaceEvaluatorAction::performCall() {
    309302  /// 1. create boost::graph from graph6 string
     
    538531        // list lowest energy
    539532        const HomologyContainer::const_iterator lowest_contribution_graph =
    540             std::min_element(range.first, range.second, compareEnergyContribution);
     533            std::min_element(range.first, range.second, HomologyContainer::compareEnergyContribution);
    541534        const HomologyContainer::const_iterator highest_contribution_graph =
    542             std::max_element(range.first, range.second, compareEnergyContribution);
     535            std::max_element(range.first, range.second, HomologyContainer::compareEnergyContribution);
    543536        LOG(2, "INFO: Fragment graph " << nodes_graph << " has energy contributions from "
    544537            << lowest_contribution_graph->second.energy << " Ht till "
  • src/Actions/PotentialAction/ParseHomologiesAction.cpp

    r9171d8 rff2c52  
    7878                  // if it's the same as the old one, skip it
    7979                  if (olditer == iter)
    80                         continue;
    81                   else
    82                         olditer = iter;
    83                   LOG(3, "DEBUG: " << *iter);
     80                    continue;
     81                  else {
     82              const HomologyContainer::range_t range = homology_container.getHomologousGraphs(*iter);
     83              LOG(2, "DEBUG: " << *iter << " with " << std::distance(range.first, range.second) << " values.");
     84        const HomologyContainer::const_iterator lowest_contribution_graph =
     85            std::min_element(range.first, range.second, HomologyContainer::compareEnergyContribution);
     86        const HomologyContainer::const_iterator highest_contribution_graph =
     87            std::max_element(range.first, range.second, HomologyContainer::compareEnergyContribution);
     88        LOG(3, "DEBUG: Energy contributions range from "
     89            <<  lowest_contribution_graph->second.energy << " Ht to "
     90            << highest_contribution_graph->second.energy << " Ht.");
     91                    olditer = iter;
     92                  }
    8493                }
    8594    }
  • src/Fragmentation/Homology/HomologyContainer.cpp

    r9171d8 rff2c52  
    114114}
    115115
     116bool HomologyContainer::compareEnergyContribution(
     117      const std::pair<const HomologyGraph, HomologyContainer::value_t> &a,
     118      const std::pair<const HomologyGraph, HomologyContainer::value_t> &b) {
     119  return a.second.energy < b.second.energy;
     120}
     121
    116122// we need to explicitly instantiate the serialization functions
    117123BOOST_CLASS_EXPORT_IMPLEMENT(HomologyContainer)
  • src/Fragmentation/Homology/HomologyContainer.hpp

    r9171d8 rff2c52  
    9292  };
    9393
     94  static bool compareEnergyContribution(
     95      const std::pair<const HomologyGraph, HomologyContainer::value_t> &a,
     96      const std::pair<const HomologyGraph, HomologyContainer::value_t> &b);
     97
    9498public:
    9599  typedef std::multimap< HomologyGraph, value_t> container_t;
Note: See TracChangeset for help on using the changeset viewer.