- Timestamp:
- Apr 23, 2021, 8:53:22 PM (5 years ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- ff2c52
- Parents:
- 1be100
- git-author:
- Frederik Heber <frederik.heber@…> (03/27/21 22:52:52)
- git-committer:
- Frederik Heber <frederik.heber@…> (04/23/21 20:53:22)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/GraphAction/ChemicalSpaceEvaluatorAction.cpp
r1be100 r9171d8 300 300 301 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 302 308 ActionState::ptr GraphChemicalSpaceEvaluatorAction::performCall() { 303 309 /// 1. create boost::graph from graph6 string … … 530 536 ELOG(1, "Cannot find fragment graph " << nodes_graph << " to graph " << elementnumbers); 531 537 } else { 532 // list first energy 533 LOG(1, "Fragment graph " << nodes_graph << " has contribution " << range.first->second.energy); 534 total_energy += range.first->second.energy; 538 // list lowest energy 539 const HomologyContainer::const_iterator lowest_contribution_graph = 540 std::min_element(range.first, range.second, compareEnergyContribution); 541 const HomologyContainer::const_iterator highest_contribution_graph = 542 std::max_element(range.first, range.second, compareEnergyContribution); 543 LOG(2, "INFO: Fragment graph " << nodes_graph << " has energy contributions from " 544 << lowest_contribution_graph->second.energy << " Ht till " 545 << highest_contribution_graph->second.energy << " Ht, picking lowest."); 546 total_energy += lowest_contribution_graph->second.energy; 535 547 } 536 548 }
Note:
See TracChangeset
for help on using the changeset viewer.
