Home > Mateda2.0 > ScriptsMateda > OptimizationScripts > GaussianUMDA_OfflineHPProtein.m

# GaussianUMDA_OfflineHPProtein

## PURPOSE

EXAMPLE 7: Gaussian UMDA for the Offline HP Model continuous function

## SYNOPSIS

This is a script file.

## DESCRIPTION

     EXAMPLE 7:  Gaussian UMDA for  the Offline HP Model continuous function
     For reference on the Offline HP model see:
    -- H. P. Hsu, V. Mehra and  P. Grassberger (2003)  Structure optimization in an off-lattice protein model.
    -- Phys Rev E Stat Nonlin Soft Matter Phys. 2003 Sep;68(3 Pt 2):037703. Epub 2003 Sep 30.
    -- http://scitation.aip.org/getabs/servlet/GetabsServlet?prog=normal&id=PLEEE8000068000003037703000001&idtype=cvips&gifs=yes

## CROSS-REFERENCE INFORMATION

This function calls:

- RunEDA [AllStat,Cache]=RunEDA(PopSize,n,F,Card,cache,edaparams)
- CreateFibbInitConf Translates the vector to the positions in the grid

This function is called by:

## SOURCE CODE

    0001  % EXAMPLE 7:  Gaussian UMDA for  the Offline HP Model continuous function
    0002  % For reference on the Offline HP model see:
    0003  %-- H. P. Hsu, V. Mehra and  P. Grassberger (2003)  Structure optimization in an off-lattice protein model.
    0004  %-- Phys Rev E Stat Nonlin Soft Matter Phys. 2003 Sep;68(3 Pt 2):037703. Epub 2003 Sep 30.
    0005  %-- http://scitation.aip.org/getabs/servlet/GetabsServlet?prog=normal&id=PLEEE8000068000003037703000001&idtype=cvips&gifs=yes
    0006
    0007  Fibbonacci_n = 7; % Fibbonacci_n: Value n for the construction of the Fibbonacci sequence. NumbVar = F(n)
    0008  global HPInitConf;
    0009  HPInitConf = CreateFibbInitConf(Fibbonacci_n); % HP Fibbonacci configuration
    0010  NumbVar = size(HPInitConf,2);
    0011  PopSize = 1000;
    0012  F = 'EvaluateOffHPProtein';
    0013  cache  = [0,0,0,0,0]; Card = [zeros(1,NumbVar);2*pi*ones(1,NumbVar)];
    0014  edaparams{1} = {'learning_method','LearnGaussianUnivModel',{}};
    0015  edaparams{2} = {'sampling_method','SampleGaussianUnivModel',{PopSize,3}};
    0016  edaparams{3} = {'replacement_method','elitism',{1,'fitness_ordering'}};
    0017  edaparams{4} = {'selection_method','prop_selection',{2}};
    0018  edaparams{5} = {'repairing_method','SetInBounds_repairing',{}};
    0019  [AllStat,Cache]=RunEDA(PopSize,NumbVar,F,Card,cache,edaparams)
    0020  % To draw the resulting solution use function OffPrintProtein(vector),
    0021  % where vector is the best solution found.