39 double random(
int tid = 0);
41 const std::vector<
vec3<int>> &possiblePos,
44 std::vector<double>
get_probabilities(
int movIndex, std::vector<double> heuristics)
const;
59 void perform_cycle(std::vector<ACOSolution> &antsSolutions,
int *nContacts);
88 for(
unsigned i = 0; i < directions.size(); i++){
Encapsulates a string representing an HP chain.
Definition: hpchain.h:8
ACOSolution dBestSol
Holds the best solution found by this colony.
Definition: acopredictor.h:35
Encapsulates the whole process of performing Ant Colony Optimization to find a protein conformation w...
Definition: acopredictor.h:14
double * dPheromone
Pheromone matrix.
Definition: acopredictor.h:31
Represents a triple (x, y, z) of any type.
Definition: vec3.h:12
int dNMovElems
Stores the number of moviments performed by an ant; its value is N-2 where N is the number of beads i...
Definition: acopredictor.h:29
int dHCount
Stores the number of hydrophobic (H) beads in the protein.
Definition: acopredictor.h:30
void ant_deposit_pheromone(const std::vector< char > &directions, int nContacts)
Deposits pheromones along the trail followed by the given ant.
Definition: acopredictor.h:87
ACOSolution solution
Best protein obtained by the ACO algorithm.
Definition: acopredictor.h:72
std::vector< double > get_heuristics(const std::vector< vec3< int >> &possiblePos, const std::vector< vec3< int >> &beadVector)
Returns a vector V with 5 heuristics.
Definition: acopredictor.cc:63
~ACOPredictor()
The destructor frees memory allocated for holding internal data structures.
Definition: acopredictor.cc:56
ACOSolution ant_develop_solution(int tid=0)
Makes an ant develop a solution, beginning from the start.
Definition: acopredictor_backtracking.cc:18
Reads the configuration file (eg configuration.yml) and stores the configuration parameters as intern...
Definition: config.h:11
HPChain dHPChain
See the user configuration file for documentation.
Definition: acopredictor.h:17
std::vector< std::mt19937 > dRandGen
Random number generators used throughout the ACO algorithm.
Definition: acopredictor.h:32
int dCycles
See the user configuration file for documentation.
Definition: acopredictor.h:18
int dBestContacts
Holds the num of contacts in the best solution.
Definition: acopredictor.h:36
int dLSFreq
See the user configuration file for documentation.
Definition: acopredictor.h:23
Structures used to return results to the callee.
Definition: acopredictor.h:71
int dNAnts
See the user configuration file for documentation.
Definition: acopredictor.h:19
int contacts
Number of H-H contacts within solution.
Definition: acopredictor.h:73
double dBeta
See the user configuration file for documentation.
Definition: acopredictor.h:21
void perform_cycle(std::vector< ACOSolution > &antsSolutions, int *nContacts)
Performs a cycle of the ant colony.
Definition: acopredictor_ant_cycle.cc:13
struct Results predict()
Runs the ACO optimization to predict the protein structure.
Definition: acopredictor_predict_mpi.cc:115
double dAlpha
See the user configuration file for documentation.
Definition: acopredictor.h:20
std::vector< double > get_probabilities(int movIndex, std::vector< double > heuristics) const
Return a vector V with 5 probabilities.
Definition: acopredictor.cc:110
double & pheromone(int i, int d) const
Returns the pheromone at step i and direction d.
Definition: acopredictor.h:94
int dRandSeed
See the user configuration file for documentation.
Definition: acopredictor.h:25
int dExchangedAnts
See the user configuration file for documentation.
Definition: acopredictor.h:24
ACOPredictor(const Config &config)
Constructor from configuration file.
Definition: acopredictor.cc:16
std::uniform_real_distribution dRandDist
Random distribution that uses dRandGen to generate random numbers.
Definition: acopredictor.h:33
double dEvap
See the user configuration file for documentation.
Definition: acopredictor.h:22
Encapsulates a solution that is built by an ant.
Definition: acosolution.h:12
double random(int tid=0)
Returns a random number in [0,1).
Definition: acopredictor.h:99