Encapsulates the whole process of performing Ant Colony Optimization to find a protein conformation with low free energy.
More...
#include <acopredictor.h>
|
struct | Results |
| Structures used to return results to the callee. More...
|
|
|
int | dNMovElems |
| Stores the number of moviments performed by an ant; its value is N-2 where N is the number of beads in the protein. More...
|
|
int | dHCount |
| Stores the number of hydrophobic (H) beads in the protein.
|
|
double * | dPheromone |
| Pheromone matrix. More...
|
|
std::vector< std::mt19937 > | dRandGen |
| Random number generators used throughout the ACO algorithm. More...
|
|
std::uniform_real_distribution | dRandDist |
| Random distribution that uses dRandGen to generate random numbers. More...
|
|
ACOSolution | dBestSol |
| Holds the best solution found by this colony. More...
|
|
int | dBestContacts |
| Holds the num of contacts in the best solution. More...
|
|
|
HPChain | dHPChain |
| See the user configuration file for documentation. More...
|
|
int | dCycles |
| See the user configuration file for documentation. More...
|
|
int | dNAnts |
| See the user configuration file for documentation. More...
|
|
double | dAlpha |
| See the user configuration file for documentation. More...
|
|
double | dBeta |
| See the user configuration file for documentation. More...
|
|
double | dEvap |
| See the user configuration file for documentation. More...
|
|
int | dLSFreq |
| See the user configuration file for documentation. More...
|
|
int | dExchangedAnts |
| See the user configuration file for documentation. More...
|
|
int | dRandSeed |
| See the user configuration file for documentation. More...
|
|
Encapsulates the whole process of performing Ant Colony Optimization to find a protein conformation with low free energy.
◆ ACOPredictor()
ACOPredictor::ACOPredictor |
( |
const Config & |
config | ) |
|
Constructor from configuration file.
- Parameters
-
config | The configuration file object from which we can read user configured-parameters. |
◆ ~ACOPredictor()
ACOPredictor::~ACOPredictor |
( |
| ) |
|
The destructor frees memory allocated for holding internal data structures.
◆ ant_deposit_pheromone()
void ACOPredictor::ant_deposit_pheromone |
( |
const std::vector< char > & |
directions, |
|
|
int |
nContacts |
|
) |
| |
|
inlineprivate |
Deposits pheromones along the trail followed by the given ant.
- Parameters
-
directions | Vector of directions followed by the ant. |
nContacts | Number of H-H contacts in the protein built by the given ant. |
◆ ant_develop_solution()
ACOSolution ACOPredictor::ant_develop_solution |
( |
int |
tid = 0 | ) |
|
|
private |
Makes an ant develop a solution, beginning from the start.
Returns the developed solution.
◆ get_heuristics()
vector< double > ACOPredictor::get_heuristics |
( |
const std::vector< vec3< int >> & |
possiblePos, |
|
|
const std::vector< vec3< int >> & |
beadVector |
|
) |
| |
|
private |
Returns a vector V with 5 heuristics.
V[d] is the heuristic associated with direction d.
◆ get_probabilities()
vector< double > ACOPredictor::get_probabilities |
( |
int |
movIndex, |
|
|
std::vector< double > |
heuristics |
|
) |
| const |
|
private |
Return a vector V with 5 probabilities.
V[d] is the probability of going to direction d.
◆ perform_cycle()
void ACOPredictor::perform_cycle |
( |
std::vector< ACOSolution > & |
antsSolutions, |
|
|
int * |
nContacts |
|
) |
| |
|
private |
Performs a cycle of the ant colony.
A cycle consitst of each:
- ant developing a solution,
- calculating the solution contacts,
- performing local search in each solution,
- finding the best solution generated,
- evaporating pheromones and finally
- depositing pheromones.
This function is the one parallelized for multiple parallel programming models, in the files acopredictor_ant_cycle[...].
◆ pheromone()
double & ACOPredictor::pheromone |
( |
int |
i, |
|
|
int |
d |
|
) |
| const |
|
inlineprivate |
Returns the pheromone at step i and direction d.
◆ predict()
Runs the ACO optimization to predict the protein structure.
- Returns
- the best solution found by the optimization algorithm.
◆ random()
double ACOPredictor::random |
( |
int |
tid = 0 | ) |
|
|
inlineprivate |
Returns a random number in [0,1).
◆ dAlpha
double ACOPredictor::dAlpha |
|
private |
See the user configuration file for documentation.
◆ dBestContacts
int ACOPredictor::dBestContacts |
|
private |
Holds the num of contacts in the best solution.
◆ dBestSol
Holds the best solution found by this colony.
◆ dBeta
double ACOPredictor::dBeta |
|
private |
See the user configuration file for documentation.
◆ dCycles
int ACOPredictor::dCycles |
|
private |
See the user configuration file for documentation.
◆ dEvap
double ACOPredictor::dEvap |
|
private |
See the user configuration file for documentation.
◆ dExchangedAnts
int ACOPredictor::dExchangedAnts |
|
private |
See the user configuration file for documentation.
◆ dHPChain
See the user configuration file for documentation.
◆ dLSFreq
int ACOPredictor::dLSFreq |
|
private |
See the user configuration file for documentation.
◆ dNAnts
See the user configuration file for documentation.
◆ dNMovElems
int ACOPredictor::dNMovElems |
|
private |
Stores the number of moviments performed by an ant; its value is N-2 where N is the number of beads in the protein.
◆ dPheromone
double* ACOPredictor::dPheromone |
|
private |
◆ dRandDist
std::uniform_real_distribution ACOPredictor::dRandDist |
|
private |
Random distribution that uses dRandGen
to generate random numbers.
◆ dRandGen
std::vector<std::mt19937> ACOPredictor::dRandGen |
|
private |
Random number generators used throughout the ACO algorithm.
◆ dRandSeed
int ACOPredictor::dRandSeed |
|
private |
See the user configuration file for documentation.
The documentation for this class was generated from the following files: