Victor
 All Data Structures Functions Variables Friends Pages
LoopTable Class Reference

Defines a table of possible amino chain end points and end directions after k amino acids have been concatenated. More...

Public Member Functions

 LoopTable ()
 
 LoopTable (const LoopTable &orig)
 
virtual ~LoopTable ()
 
virtual void adjustTable ()
 
virtual void cluster (double cutoff)
 
void concatenate (LoopTable &, LoopTable &, unsigned long, unsigned long)
 
void copy (const LoopTable &orig)
 
virtual LoopTableEntry getClosest (const LoopTableEntry &le, unsigned int currentSelection=1)
 
unsigned int getLength ()
 
LoopTableEntry getMax ()
 
unsigned int getMaxBins ()
 
LoopTableEntry getMin ()
 
virtual vector< LoopTableEntrygetNClosest (const LoopTableEntry &le, unsigned int num, unsigned int nAmino)
 
RamachandranDatagetRama ()
 
LoopTableoperator= (const LoopTable &orig)
 
virtual LoopTableEntryoperator[] (unsigned int n)
 
virtual const LoopTableEntryoperator[] (unsigned int n) const
 
void printTable (unsigned int)
 
virtual void read (const string &)
 
void setLength (unsigned int l)
 
void setRama (RamachandranData *r)
 
void setToSingleAminoAcid ()
 
void showDistribution ()
 
virtual unsigned int size ()
 
virtual void write (const string &)
 
void writeASCII (const string &, unsigned long num=0, unsigned int wEntry=0, unsigned int wDim=0)
 

Protected Member Functions

unsigned short code (const double, const double, const double)
 
double decode (const unsigned short, const double, const double)
 
void initOccurrence (const unsigned long)
 
void pAddToSolutionQueue (unsigned int offset, priority_queue< solutionQueueElem > &solutionQueue, const LoopTableEntry &dest)
 
double pEstimateSimilarityCutoff (const LoopTableEntry &le, unsigned int num)
 
unsigned int pGetBin (const vgVector3< float > &e)
 
void pInsertElem (LoopTableEntry &elem, vector< vector< LoopTableEntry > > &table)
 
LoopTableEntry selectOccurrence ()
 
virtual void store (const LoopTableEntry &)
 

Detailed Description

Defines a table of possible amino chain end points and end directions after k amino acids have been concatenated.

Constructor & Destructor Documentation

LoopTable ( )

basic constructor

LoopTable ( const LoopTable orig)

constructor base from the copy of another object

Parameters
referenceto the original object (const LoopTable&)
~LoopTable ( )
virtual

basic destructor

Member Function Documentation

void adjustTable ( )
virtual

Adjusts the hash table representation, distributing its contents among all bins, according to a min -> max distribution with uniform sampling.

Parameters
none
Returns
changes are made internally(void)
void cluster ( double  cutoff)
virtual

Clusters entries below cutoff, leaving only a single representative.

Parameters
cutoffvalue(double)
Returns
changes are made internally(void)
unsigned short code ( const double  value,
const double  min,
const double  max 
)
protected

The function codes an ieee32 value as the 1 byte wide offset between min and max.

Parameters
valueto consider ( const unsigned ),min and max value( const doubl,const doubl))
Returns
the corresponding value (unsigned short)
void concatenate ( LoopTable src1,
LoopTable src2,
unsigned long  nSrc1,
unsigned long  nSrc2 
)

The function concatenates two protein tables (src1, src2) and stores the result in this. Adds the src to the vector entry.

Parameters
referenceto the loop tables(LoopTable& ,LoopTable& )src sizes(unsigned long,unsigned long)
Returns
changes are made internally(void)
void copy ( const LoopTable orig)

copies the original object into a new one

Parameters
referenceto the original object(const LoopTable& )
Returns
changes are made internally(void)
double decode ( const unsigned short  value,
const double  min,
const double  max 
)
protected

The three functions below decode a ProteinTableEntry, vector or ieee32 respectively into its uncompressed form.

Parameters
valueto consider ( const unsigned ),min and max value( const doubl,const doubl))
Returns
the corresponding value (double)
LoopTableEntry getClosest ( const LoopTableEntry dest,
unsigned int  currentSelection = 1 
)
virtual

Find a matching entry with "minimal" deviation from destination (EP, ED, EN) and return it.

Parameters
referenceto the destination loop table entry(const LoopTableEntry&), index of the current selection (unsigned int)
Returns
the new loop table entry(LoopTableEntry)
unsigned int getLength ( )

return the amino acids number

Parameters
none
Returns
corresponding value ( unsigned int)
LoopTableEntry getMax ( )

returns the maximum value for each coordinate

Parameters
none
Returns
corresponding loop entry table( LoopTableEntry)
unsigned int getMaxBins ( )

return the maximum bindings

Parameters
none
Returns
corresponding value ( unsigned int)
LoopTableEntry getMin ( )

returns the minimum value for each coordinate

Parameters
none
Returns
corresponding loop entry table( LoopTableEntry)
vector< LoopTableEntry > getNClosest ( const LoopTableEntry dest,
unsigned int  num,
unsigned int  nAmino 
)
virtual

Gets the closest N

Parameters
referenceto the table( LoopTableEntry&), value of N(unsigned int ), number of amino acids (unsigned int )
Returns
vector containing the loop entry tables(vector<LoopTableEntry> )
RamachandranData * getRama ( )

return the Ramachandran Data

Parameters
none
Returns
pointer to the data( RamachandranData* )
void initOccurrence ( const unsigned long  nSelect)
protected

The function initializes the SuS selection mechanism.

Parameters
(constunsigned long)
Returns
changes are made internally(void)
LoopTable & operator= ( const LoopTable orig)

Assigns one object into another

Parameters
referenceto the original object(const LoopTable&)
Returns
the reference to the the one(LoopTable&)
LoopTableEntry & operator[] ( unsigned int  n)
virtual

returns the corresponding table entry for the given index

Parameters
index(unsignedint )
Returns
reference to the loop entry table( LoopTableEntry&)
const LoopTableEntry & operator[] ( unsigned int  n) const
virtual

returns the corresponding table entry for the given index

Parameters
index(unsignedint )
Returns
reference to the loop entry table( LoopTableEntry&)
void pAddToSolutionQueue ( unsigned int  offset,
priority_queue< solutionQueueElem > &  solutionQueue,
const LoopTableEntry dest 
)
protected

Adds the data into the solution queue

Parameters
offset(unsignedint),reference to the solutions queue(priority_queue<solutionQueueElem>&), reference to the loop entry table(const LoopTableEntry&)
Returns
changes are made internally(void)
double pEstimateSimilarityCutoff ( const LoopTableEntry le,
unsigned int  num 
)
protected

calculates the esptimate similarity cutoff

Parameters
referenceto the loop table entry (const LoopTableEntry& ),value to consider (unsigned int)
Returns
the corresponding value(double)
unsigned int pGetBin ( const vgVector3< float > &  e)
protected

returns the corresponding binding

Parameters
referencefor the coordenate values (const vgVector3<float>&)
Returns
corresponding binding value( unsigned int)
void pInsertElem ( LoopTableEntry elem,
vector< vector< LoopTableEntry > > &  table 
)
protected

Inserts a single element in table.

Parameters
referecnceto the Loop Entry table(LoopTableEntry&), reference to the loop table entry table ( vector<vector<LoopTableEntry>&)
Returns
changes are made internally(void)
void printTable ( unsigned int  num)

print the table statistics (min, max):

Parameters
indexentry(unsigned int)
void read ( const string &  filename)
virtual

Reads the table contents from a file.

Parameters
referenceto the file name(const string&)
Returns
changes are made internally(void)
LoopTableEntry selectOccurrence ( )
protected

The function selects the next (random) table entry to be employed, using a SuS selection mechanism. A special case occurs if nAminoAcid = 1, see below.

Parameters
none
Returns
new table entry (LoopTableEntry)
void setLength ( unsigned int  l)

Sets the length

Parameters
lengthvalue(unsigned int)
Returns
changes are made internally(void)
void setRama ( RamachandranData r)

Sets the Ramachandran Data

Parameters
pointerto the RamachandranData(RamachandranData*)
Returns
changes are made internally(void)
void setToSingleAminoAcid ( )

Defaults the protein table to the simple case where nAminoacid = 1.

Parameters
none
Returns
changes are made internally(void)
void showDistribution ( )

Prints the loop table distribution

Parameters
none
unsigned int size ( )
virtual

return the entries total size

Parameters
none
Returns
corresponding value ( unsigned int)
void store ( const LoopTableEntry src)
protectedvirtual

Adds the src to the vector entry. stores the results in the table

Parameters
referenceto the loop table entry(const LoopTableEntry&)
Returns
changes are made internally(void)
void write ( const string &  filename)
virtual

Writes the table contents to file.

Parameters
referenceto the file name(const string& )
Returns
changes are made internally(void)
void writeASCII ( const string &  filename,
unsigned long  num = 0,
unsigned int  wEntry = 0,
unsigned int  wDim = 0 
)

Writes the table contents to file in ASCII format. (Useful for viewing with GNU Plot)

Parameters
referenceto the file name (const string& ), size(unsigned long), entry weigth( unsigned int) ,entry dimension( unsigned int)
Returns
changes are made internally(void)

The documentation for this class was generated from the following files: