HPFold implements an Ant Colony Optimisation (ACO) algorithm for the 2D hydrophobic polar protein folding problem. It is based on an article by Alena Shmygelska and Holger H Hoos, see Links section below.
HPFold is written in C, and should compile on any Unix system. Unpack
the source code (tar xvfz hpfold-X.Y.tar.gz), change
directory to the hpfold-X.Y/ directory and run
make. A hpfold executable will be built in
the bin/ subdirectory.
HPFold allows for configuration of a number settings, ex.:
# hpfold --help
Usage: hpfold [OPTION]... <SEQ>
Fold SEQ.
-r, --runs=NUM number of runs (default: 10)
-i, --iterations=NUM number of iterations (default: 50000)
-a, --ants=NUM number of ants (default: 100)
-o, --optimal=NUM optimal (or approximated) energy
-l, --improving-ants=NUM fraction of ants performing local search
-e, --elitist-ants=NUM fraction of ants updating pheromone trails
-s, --search-length=NUM maximum number of local search iterations
not producing improvements (default: 1000)
-c, --cpu-seconds=NUM maximum number of CPU seconds per run.
-v, --verbose increase output verbosity.
--alpha=NUM pheromone importance (default: 1.0)
--beta=NUM heuristics importance (default: 2.0)
--rho=NUM pheromone persistence (default: 0.8)
--theta=NUM pheromone threshold (default: 0.05)
--version display version information and exit
--help display this help and exit
However, the default settings are reasonably sensible, and only the optimal
(or approximated) energy -o as well as a sequence must be provided.
Using default settings will result in 10 runs using a maximum of 120 CPU
seconds per run, ex.: # hpfold -o -21 hhphphphphhhhphppphppphpppphppphppphphhhhphphphphh Parameter settings: =================== number of runs = 10 number of iterations = 50000 number of ants = 100 optimal energy = -21 maximum CPU seconds per run = 120 local search length = 1000 local search ant percentage = 0.500000 elitists percentage = 0.010000 pheromone importance (alpha) = 1.000000 heuristics importance (beta) = 2.000000 pheromone persistence (rho) = 0.800000 pheromone threshold (theta) = 0.050000 sequence = hhphphphphhhhphppphppphpppphppphppphphhhhphphphphh sequence length = 50 24 hydrophobes (8 hydrophobe contacts) run = 1; iterations = 2; energy = -21; fold = frrfrfrlrrlrllrllfrfllrfffffflfrllfrllflrrfrlrfrr; cpu = 2.276 run = 2; iterations = 6; energy = -21; fold = frrfrlrfrrlffrllffffffrfllfffllrffffrfrrllrlflfll; cpu = 8.813 run = 3; iterations = 3; energy = -21; fold = frrfrlrfrrllrrlfrrllrflfrrflfrflrrflrrllrrfrlrfrr; cpu = 3.200 run = 4; iterations = 2; energy = -21; fold = frrfrlrfrrlfllrfllrflfffffffflfrllfrllrrllflrlfll; cpu = 1.900 run = 5; iterations = 3; energy = -21; fold = fllflflrllrlrrlffflfrrlfrrflfrrllrfrlfllrrlrfrfrr; cpu = 4.436 run = 6; iterations = 2; energy = -21; fold = fllflrlfllrrllrfllrflfffrrffflfrllfrllflrrfrlrfrr; cpu = 2.668 run = 7; iterations = 2; energy = -21; fold = frrfrlrfrrllrrlfrrllrflfrrflfrflrrflrrfrllflrlfll; cpu = 1.892 run = 8; iterations = 2; energy = -21; fold = fllflrlfllrrllrfllrflfrfllfrlrfrllfrllflrrfrlrfrr; cpu = 2.576 run = 9; iterations = 14; energy = -21; fold = frrfrlrfrrllrrlfrrllrflfrrflfrflrrflrrfrllflrlfll; cpu = 19.821 run = 10; iterations = 2; energy = -21; fold = frrfrlrfrrllrrllrfrfllrfllfrfllrfrllrrfrllflrlfll; cpu = 1.692