indigoX
electron_optimisation.hpp
Go to the documentation of this file.
1 //
2 // electron_optimisation.hpp
3 // indigox
4 //
5 // Created by Welsh, Ivan on 12/09/17.
6 // Copyright © 2017 Allison Group. All rights reserved.
7 //
8 
9 #ifndef ELECTRON_OPTIMISATION_HPP
10 #define ELECTRON_OPTIMISATION_HPP
11 
12 #include "../classes/electron_graph.hpp"
13 #include "../classes/molecular_graph.hpp"
14 
15 #include <cstdint>
16 #include <string>
17 #include <unordered_map>
18 #include <vector>
19 
20 namespace indigox {
21  namespace algorithm {
22  class ElectronOptimisationAlgorithm;
23  class LocalOptimisation;
24  class AStarOptimisation;
25  class FPTOptimisation;
26  } // namespace algorithm
27 
28  class ElectronOpt {
33 
34  public:
35  uint32_t electronsToAdd_;
36  std::vector<MolVertPair> possibleLocations_;
37  MolecularGraph molGraph_;
39  std::unordered_map<uint32_t, FCSCORE> scores_;
40  std::shared_ptr<algorithm::ElectronOptimisationAlgorithm> algo_;
41  FCSCORE finalScore_;
42 
43  public:
44  ElectronOpt();
45  ElectronOpt(MolecularGraph G);
46 
47  public:
48  void SetMolecularGraph(MolecularGraph G);
49  size_t Run();
50  inline FCSCORE GetMinimisedEnergy() { return finalScore_; }
51  bool ApplyElectronAssigment(size_t);
52 
53  private:
54  void DetermineElectronsToAdd();
55  void DeterminePotentialElectronLocations();
56  void LoadScores();
57  void SortPotentialLocations();
58  };
59 } // namespace indigox
60 
61 #endif /* ELECTRON_OPTIMISATION_HPP */
MolecularGraph molGraph_
Definition: electron_optimisation.hpp:37
std::shared_ptr< _ElectronGraph > ElectronGraph
Definition: electron_graph.hpp:54
friend class indigox::algorithm::FPTOptimisation
Definition: electron_optimisation.hpp:32
std::unordered_map< uint32_t, FCSCORE > scores_
Definition: electron_optimisation.hpp:39
Namespace for all graph related functionality.
Definition: access.hpp:7
friend class indigox::algorithm::LocalOptimisation
Definition: electron_optimisation.hpp:30
friend class indigox::algorithm::ElectronOptimisationAlgorithm
Definition: electron_optimisation.hpp:29
void SetMolecularGraph(MolecularGraph G)
FCSCORE GetMinimisedEnergy()
Definition: electron_optimisation.hpp:50
FCSCORE finalScore_
Definition: electron_optimisation.hpp:41
std::vector< MolVertPair > possibleLocations_
Definition: electron_optimisation.hpp:36
Definition: electron_optimisation.hpp:28
std::shared_ptr< algorithm::ElectronOptimisationAlgorithm > algo_
Definition: electron_optimisation.hpp:40
uint32_t electronsToAdd_
Definition: electron_optimisation.hpp:35
ElectronGraph elnGraph_
Definition: electron_optimisation.hpp:38
friend class indigox::algorithm::AStarOptimisation
Definition: electron_optimisation.hpp:31
bool ApplyElectronAssigment(size_t)