ElfPSP_AntColony
Protein Structure Prediction using Ant Colony Optimization
Functions
Acopredictor_ant_cycle_cuda_cuh

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...
 

Detailed Description

Function Documentation

◆ ant_develop_solution()

__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.

Parameters
pheromoneMatrix of pheromones.
nMovElemsNumber of relative movements per protein conformation (probably equal the number of aminoacids minus 2).
solutionsMemory region that can hold all protein solutions of all threads.
moreSolutionsMemory region with same size as solutions. Will be used as temporary storage.
nCoordsNumber of coordinates that a protein has (probably equal the number of aminoacids).
relDirectionsMemory region that can hold all arrays of relative directions, one for each launched thread.
moreRelDirectionsMemory region with same size as relDirections. Will be used as temporary storage.
[out]contactsMemory region to which we can store the number of contacts for each protein developed by each thread.
hpChainThe HP chain of the protein being predicted.
lsFreqLocal Search Frequency, determines the number of protein perturbations to generate after the ant develops the first protein using the pheromones.
alphaAlpha parameter of the ACO algorithm.
betaBeta parameter of the ACO algortihm.

◆ deposit_pheromones()

__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.

Parameters
pheromonesPheromone matrix.
nMovElemsNumber of relative directions per protein.
directionsArray containing relative directions for all proteins produced by ant_develop_solution.
contactsArray of contacts produced by ant_develop_solution.
hCountNumber of H beads within the HP chain of the protein being predicted.

◆ evaporate_pheromones()

__global__ void HostToDevice::evaporate_pheromones ( double *  pheromones,
int  nMovElems,
double  evapRate 
)

Evaporates pheromones in the pheromone matrix.

Parameters
[in,out]pheromonesPheromone matrix.
nMovElemsNumber of relative directions per protein.
evapRateRate of evaporation of pheromones. Each pheromone is multiplied by (1-evapRate).

◆ find_best_solution()

__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.

Parameters
contactsArray of contacts produced by ant_develop_solution.
nContactsnumber of contacts in contacts.
directionsArray containing relative directions for all proteins produced by ant_develop_solution.
nMovElemsNumber of relative directions per protein.
[out]outDirectionsMemory region where we can store the relative directions of the best protein identified.
[out]outBestContactMemory region (an integer) to which we can store the number of contacts of the best protein identified.