Home > Mateda2.0 > functions > protein > EvaluateEnergy.m

# EvaluateEnergy

## PURPOSE

EvaluateEnergy: Evaluates the energy corresponding to the sequence lattice configuration determined by the lattice in vector.

## SYNOPSIS

function[energy] = EvaluateEnergy(vector)

## DESCRIPTION

     EvaluateEnergy:    Evaluates  the energy corresponding to the sequence lattice configuration determined by the lattice in vector.
     From the residues positions, the interaction energies are calculated by the energy function
     For reference on the  HP model see:
    --- R. Santana, P. Larra�aga, and J. A. Lozano (2004) Protein folding in 2-dimensional lattices with estimation of distribution algorithms.
    --- In Proceedings of the First International Symposium on Biological and Medical Data Analysis,
    --- Volume 3337 of Lecture Notes in Computer Science, pages 388-398, Barcelona, Spain, 2004. Springer Verlag.
     INPUTS
     vector: Sequence of residues ( (H)ydrophobic or (P)olar, respectively represented by zero and one)
     OUTPUTS
     energy: Energy evaluation.

     Last version 4/15/2009. Roberto Santana (roberto.santana@ehu.es)

## CROSS-REFERENCE INFORMATION

This function calls:

- EvalChain [Collisions,Overlappings,Pos] = EvalChain(vector)

This function is called by:

## SOURCE CODE

    0001 function[energy] =  EvaluateEnergy(vector)
    0002 % EvaluateEnergy:    Evaluates  the energy corresponding to the sequence lattice configuration determined by the lattice in vector.
    0003 % From the residues positions, the interaction energies are calculated by the energy function
    0004 % For reference on the  HP model see:
    0005 %--- R. Santana, P. Larra�aga, and J. A. Lozano (2004) Protein folding in 2-dimensional lattices with estimation of distribution algorithms.
    0006 %--- In Proceedings of the First International Symposium on Biological and Medical Data Analysis,
    0007 %--- Volume 3337 of Lecture Notes in Computer Science, pages 388-398, Barcelona, Spain, 2004. Springer Verlag.
    0008 % INPUTS
    0009 % vector: Sequence of residues ( (H)ydrophobic or (P)olar, respectively represented by zero and one)
    0010 % OUTPUTS
    0011 % energy: Energy evaluation.
    0012 %
    0013 % Last version 4/15/2009. Roberto Santana (roberto.santana@ehu.es)
    0014
    0015
    0016 global HPInitConf;
    0017
    0018
    0019 [Collisions,Overlappings,Pos] =  EvalChain(vector);
    0020
    0021
    0022 if Collisions<0
    0023  energy = Collisions*(Overlappings+1);
    0024 else
    0025  energy = Collisions/(Overlappings+1);
    0026 end
    0027
    0028
    0029