Changeset 9171d8
- 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)
- Files:
-
- 2 edited
-
doc/userguide/userguide.xml (modified) (1 diff)
-
src/Actions/GraphAction/ChemicalSpaceEvaluatorAction.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/userguide/userguide.xml
r1be100 r9171d8 1345 1345 whether the molecule candidate is stable or not. Note that this requires 1346 1346 that a suitable homology container file has been loaded first that contains 1347 all necessary fragments.</para> 1347 all necessary fragments. If multiple entries and thus multiple energies 1348 are present for a given fragment, then the lowest energy is taken for the 1349 summation.</para> 1348 1350 <note>The graph is automatically saturated with hydrogens in obeying 1349 1351 the octet rule, i.e. hydrogen should not be given in the list of elements.</note> -
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.
