ElfPSP_AntColony
Protein Structure Prediction using Ant Colony Optimization
|
Functions | |
__global__ void | HostToDevice::ant_develop_solution (double *pheromone, int nMovElems, int3 *solutions, int3 *moreSolutions, int nCoords, char *relDirections, char *moreRelDirections, int *contacts, char *hpChain, int lsFreq, double alpha, double beta) |
Launches threads such that each thread executes the work of an ant. More... | |
__global__ void | HostToDevice::find_best_solution (int *contacts, int nContacts, char *directions, int nMovElems, char *outDirections, int *outBestContact) |
Finds the best solution among those produced by ant_develop_solution . More... | |
__global__ void | HostToDevice::evaporate_pheromones (double *pheromones, int nMovElems, double evapRate) |
Evaporates pheromones in the pheromone matrix. More... | |
__global__ void | HostToDevice::deposit_pheromones (double *pheromones, int nMovElems, char *directions, int *contacts, int hCount) |
Deposits pheromones in the pheromone matrix, according the each protein's quality. More... | |
__global__ void HostToDevice::ant_develop_solution | ( | double * | pheromone, |
int | nMovElems, | ||
int3 * | solutions, | ||
int3 * | moreSolutions, | ||
int | nCoords, | ||
char * | relDirections, | ||
char * | moreRelDirections, | ||
int * | contacts, | ||
char * | hpChain, | ||
int | lsFreq, | ||
double | alpha, | ||
double | beta | ||
) |
Launches threads such that each thread executes the work of an ant.
An ant develops a solution by deciding relative directions, using the pheromone matrix as a guide. The ant is also in charge of performing local search by generating small perturbations on the developed protein, and checking if the perturbed one is better.
pheromone | Matrix of pheromones. | |
nMovElems | Number of relative movements per protein conformation (probably equal the number of aminoacids minus 2). | |
solutions | Memory region that can hold all protein solutions of all threads. | |
moreSolutions | Memory region with same size as solutions . Will be used as temporary storage. | |
nCoords | Number of coordinates that a protein has (probably equal the number of aminoacids). | |
relDirections | Memory region that can hold all arrays of relative directions, one for each launched thread. | |
moreRelDirections | Memory region with same size as relDirections . Will be used as temporary storage. | |
[out] | contacts | Memory region to which we can store the number of contacts for each protein developed by each thread. |
hpChain | The HP chain of the protein being predicted. | |
lsFreq | Local Search Frequency, determines the number of protein perturbations to generate after the ant develops the first protein using the pheromones. | |
alpha | Alpha parameter of the ACO algorithm. | |
beta | Beta parameter of the ACO algortihm. |
__global__ void HostToDevice::deposit_pheromones | ( | double * | pheromones, |
int | nMovElems, | ||
char * | directions, | ||
int * | contacts, | ||
int | hCount | ||
) |
Deposits pheromones in the pheromone matrix, according the each protein's quality.
pheromones | Pheromone matrix. |
nMovElems | Number of relative directions per protein. |
directions | Array containing relative directions for all proteins produced by ant_develop_solution . |
contacts | Array of contacts produced by ant_develop_solution . |
hCount | Number of H beads within the HP chain of the protein being predicted. |
__global__ void HostToDevice::evaporate_pheromones | ( | double * | pheromones, |
int | nMovElems, | ||
double | evapRate | ||
) |
Evaporates pheromones in the pheromone matrix.
[in,out] | pheromones | Pheromone matrix. |
nMovElems | Number of relative directions per protein. | |
evapRate | Rate of evaporation of pheromones. Each pheromone is multiplied by (1-evapRate). |
__global__ void HostToDevice::find_best_solution | ( | int * | contacts, |
int | nContacts, | ||
char * | directions, | ||
int | nMovElems, | ||
char * | outDirections, | ||
int * | outBestContact | ||
) |
Finds the best solution among those produced by ant_develop_solution
.
contacts | Array of contacts produced by ant_develop_solution . | |
nContacts | number of contacts in contacts . | |
directions | Array containing relative directions for all proteins produced by ant_develop_solution . | |
nMovElems | Number of relative directions per protein. | |
[out] | outDirections | Memory region where we can store the relative directions of the best protein identified. |
[out] | outBestContact | Memory region (an integer) to which we can store the number of contacts of the best protein identified. |