source: src/Fragmentation/Evaluation/StabilityEvaluator.hpp

stable v1.7.0
Last change on this file was 999eaf, checked in by Frederik Heber <frederik.heber@…>, 5 years ago

Added EvaluateStabilityAction to estimate a molecule's stability.

  • removes every bond and checks the energies of the products against the educt equipped with enough hydrogen molecules to compensate for the cut bond times its degree.
  • outputs a CSV file with entries per bond.
  • extended HomologyGraph to allow direct use of AtomIdSet, i.e. atomic ids coming from a selection in the World or from the molecule.
  • DOCU: Added subsection on this action to section homology.
  • TEST: Added regression test case.
  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 * StabilityEvaluator.hpp
3 *
4 * Created on: Apr 18, 2021
5 * Author: heber
6 */
7
8
9#ifndef FRAGMENTATION_EVALUATION_STABILITYEVALUATOR_HPP_
10#define FRAGMENTATION_EVALUATION_STABILITYEVALUATOR_HPP_
11
12// include config.h
13#ifdef HAVE_CONFIG_H
14#include <config.h>
15#endif
16
17#include <iosfwd>
18#include <string>
19#include <vector>
20
21class HomologyContainer;
22class HomologyGraph;
23class molecule;
24
25/**
26 * Evaluates the stability for a given molecule by removing each bond
27 * and computing the energy of the products.
28 */
29class StabilityEvaluator {
30public:
31 StabilityEvaluator(const molecule * _mol);
32
33 /**
34 * Contains all information on a single removed bond.
35 */
36 struct StabilityCriterion {
37 std::string formula_educt1;
38 std::string formula_educt2;
39 double energy_educts;
40 std::string formula_product1;
41 std::string formula_product2;
42 double energy_products;
43 bool isStable; //!< states whether energy_educts < energy_products
44 };
45
46 typedef std::vector<StabilityCriterion> stabilities_t;
47
48 stabilities_t operator()() const;
49
50private:
51 double getLowestEnergyFromHomologyContainer(const HomologyGraph &nodes_graph) const;
52
53
54private:
55 const molecule * mol;
56
57 const HomologyContainer &container;
58};
59
60std::ostream& operator<<(std::ostream &ost, const StabilityEvaluator::StabilityCriterion &_stability);
61
62#endif /* FRAGMENTATION_EVALUATION_STABILITYEVALUATOR_HPP_ */
Note: See TracBrowser for help on using the repository browser.