ElfPSP_AntColony
Protein Structure Prediction using Ant Colony Optimization
config.h
Go to the documentation of this file.
1 #ifndef _CONFIG_H
2 #define _CONFIG_H
3 
6 #include <string>
7 
11 class Config {
12  static const char *sFilename;
16  std::string dHPChain;
17  int dCycles;
18  int dNAnts;
19  double dAcoAlpha;
20  double dAcoBeta;
24  int dRandSeed;
25  std::string dFilename;
28 public:
30  Config();
31 
33  const std::string&
34  hp_chain() const { return dHPChain; }
35 
37  int cycles() const { return dCycles; }
38 
40  int n_ants() const { return dNAnts; }
41 
43  double aco_alpha() const { return dAcoAlpha; }
44 
46  double aco_beta() const { return dAcoBeta; }
47 
49  double aco_evaporation() const { return dAcoEvaporation; }
50 
52  int ls_frequency() const { return dLSFrequency; }
53 
55  int exchanged_ants() const { return dExchangedAnts; }
56 
60  int random_seed() const { return dRandSeed; }
61 
63  const std::string &filename() const { return dFilename; }
64 
65  void set_hp_chain(std::string chain) { dHPChain = chain; }
66 
67  void set_cycles(int cycles) { dCycles = cycles; }
68 
69  void set_nants(int nants) { dNAnts = nants; }
70 };
71 
72 #endif
int random_seed() const
Random seed defined by the user.
Definition: config.h:60
void set_cycles(int cycles)
See getters.
Definition: config.h:67
int dRandSeed
See getters.
Definition: config.h:24
std::string dFilename
See getters.
Definition: config.h:25
const std::string & hp_chain() const
HP chain of the protein to be predicted.
Definition: config.h:34
double dAcoAlpha
See getters.
Definition: config.h:19
static const char * sFilename
Name of the configuration file.
Definition: config.h:12
int dCycles
See getters.
Definition: config.h:17
double aco_beta() const
Parameter beta of the ACO probability calculation formula.
Definition: config.h:46
Reads the configuration file (eg configuration.yml) and stores the configuration parameters as intern...
Definition: config.h:11
void set_nants(int nants)
See getters.
Definition: config.h:69
std::string dHPChain
See getters.
Definition: config.h:16
int cycles() const
Number of cycles that the ant colony must perform.
Definition: config.h:37
int ls_frequency() const
Local search frequency.
Definition: config.h:52
const std::string & filename() const
Output filename for structural information of the protein.
Definition: config.h:63
int exchanged_ants() const
Number of ants that MPI nodes should exchange at every cycle.
Definition: config.h:55
int dExchangedAnts
See getters.
Definition: config.h:23
double aco_evaporation() const
Evaporation rate of pheromones.
Definition: config.h:49
int dLSFrequency
See getters.
Definition: config.h:22
void set_hp_chain(std::string chain)
See getters.
Definition: config.h:65
double dAcoEvaporation
See getters.
Definition: config.h:21
double aco_alpha() const
Parameter alpha of the ACO probability calculation formula.
Definition: config.h:43
double dAcoBeta
See getters.
Definition: config.h:20
int n_ants() const
Number of ants in the colony.
Definition: config.h:40
int dNAnts
See getters.
Definition: config.h:18
Config()
The configuration file is read upon construction.
Definition: config.cc:12