/* * StabilityEvaluator.hpp * * Created on: Apr 18, 2021 * Author: heber */ #ifndef FRAGMENTATION_EVALUATION_STABILITYEVALUATOR_HPP_ #define FRAGMENTATION_EVALUATION_STABILITYEVALUATOR_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #include class HomologyContainer; class HomologyGraph; class molecule; /** * Evaluates the stability for a given molecule by removing each bond * and computing the energy of the products. */ class StabilityEvaluator { public: StabilityEvaluator(const molecule * _mol); /** * Contains all information on a single removed bond. */ struct StabilityCriterion { std::string formula_educt1; std::string formula_educt2; double energy_educts; std::string formula_product1; std::string formula_product2; double energy_products; bool isStable; //!< states whether energy_educts < energy_products }; typedef std::vector stabilities_t; stabilities_t operator()() const; private: double getLowestEnergyFromHomologyContainer(const HomologyGraph &nodes_graph) const; private: const molecule * mol; const HomologyContainer &container; }; std::ostream& operator<<(std::ostream &ost, const StabilityEvaluator::StabilityCriterion &_stability); #endif /* FRAGMENTATION_EVALUATION_STABILITYEVALUATOR_HPP_ */