26 #include <RamachandranData.h>
27 #include <LoopTableEntry.h>
30 namespace Victor {
namespace Lobo {
39 unsigned int index1, index2;
42 return (_sqe.dev < dev);
63 virtual unsigned int size();
68 unsigned int currentSelection = 1);
70 unsigned int num,
unsigned int nAmino);
86 virtual void read(
const string&);
87 virtual void cluster(
double cutoff);
88 virtual void write(
const string&);
89 void writeASCII(
const string&,
unsigned long num = 0,
90 unsigned int wEntry = 0,
unsigned int wDim = 0);
101 static unsigned int MAX_FACTOR;
111 vector<vector<LoopTableEntry> >& table);
112 unsigned int pGetBin(
const vgVector3<float>& e);
114 priority_queue<solutionQueueElem>& solutionQueue,
122 unsigned short code(
const double,
const double,
const double);
123 double decode(
const unsigned short,
const double,
const double);
132 unsigned int nAminoAcid;
136 vector<vector<LoopTableEntry> > entry;
146 vgVector3<float> psiNormal;
148 unsigned long nextIndex;
149 unsigned long stepWidth;
151 static unsigned int MAX_BINS;
152 static double BOND_ANGLE_AT_CPRIME_TO_N;
153 static double BOND_LENGTH_N_TO_CALPHA;
154 static double BOND_ANGLE_AT_N_TO_CALPHA;
158 void printTable(
LoopTable&,
int num = -1);
200 unsigned int count = 0;
201 for (
unsigned int i = 0; i < entry.size(); i++)
202 count += entry[i].
size();
253 unsigned int count = MAX_BINS + 1;
254 for (
unsigned int i = 0; i < entry.size(); i++) {
255 if (n >= entry[i].
size())
256 n -= entry[i].
size();
263 if ((count >= MAX_BINS + 1) || (entry.size() == 0))
264 ERROR(
"LoopTable::operator[] : Argument out of scope.", exception);
266 return entry[count][n];
274 unsigned int count = MAX_BINS + 1;
275 for (
unsigned int i = 0; i < entry.size(); i++) {
276 if (n >= entry[i].
size())
277 n -= entry[i].
size();
283 if ((count >= MAX_BINS + 1) || (entry.size() == 0))
284 ERROR(
"LoopTable::operator[] : Argument out of scope.", exception);
285 return entry[count][n];
297 unsigned int numBin =
pGetBin(elem.endPoint);
298 if (numBin >= MAX_BINS)
299 ERROR(
"LoopTable::pInsertElem : element out of scope.", exception);
301 table[numBin].push_back(elem);
310 double dist = sqrt(sqr(e.x) + sqr(e.y) + sqr(e.z));
311 if (dist < lowerLimit)
313 if (dist >= upperLimit)
316 return static_cast<unsigned int> ((dist - lowerLimit) / stepLimit);
326 priority_queue<solutionQueueElem>& solutionQueue,
const LoopTableEntry& dest) {
328 for (
unsigned int i = 0; i < entry[offset].size(); i++) {
329 sqe.dev = entry[offset][i].calculateDeviation(dest, nAminoAcid);
332 solutionQueue.push(sqe);
338 #endif //_LOOPTABLE_H_
void writeASCII(const string &, unsigned long num=0, unsigned int wEntry=0, unsigned int wDim=0)
Definition: LoopTable.cc:455
virtual LoopTableEntry & operator[](unsigned int n)
Definition: LoopTable.h:251
void pAddToSolutionQueue(unsigned int offset, priority_queue< solutionQueueElem > &solutionQueue, const LoopTableEntry &dest)
Definition: LoopTable.h:325
LoopTableEntry getMin()
Definition: LoopTable.h:172
Struct that contains a queue element.
Definition: LoopTable.h:37
void concatenate(LoopTable &, LoopTable &, unsigned long, unsigned long)
Definition: LoopTable.cc:245
LoopTable()
Definition: LoopTable.cc:61
void setToSingleAminoAcid()
Definition: LoopTable.cc:230
Defines a table of possible amino chain end points and end directions after k amino acids have been c...
Definition: LoopTable.h:51
void showDistribution()
Definition: LoopTable.cc:101
unsigned short code(const double, const double, const double)
Definition: LoopTable.cc:620
double decode(const unsigned short, const double, const double)
Definition: LoopTable.cc:641
LoopTable & operator=(const LoopTable &orig)
Definition: LoopTable.cc:497
void setRama(RamachandranData *r)
Definition: LoopTable.h:231
unsigned int pGetBin(const vgVector3< float > &e)
Definition: LoopTable.h:309
double pEstimateSimilarityCutoff(const LoopTableEntry &le, unsigned int num)
Definition: LoopTable.cc:511
RamachandranData * getRama()
Definition: LoopTable.h:190
void initOccurrence(const unsigned long)
Definition: LoopTable.cc:559
void pInsertElem(LoopTableEntry &elem, vector< vector< LoopTableEntry > > &table)
Definition: LoopTable.h:296
LoopTableEntry getMax()
Definition: LoopTable.h:181
virtual vector< LoopTableEntry > getNClosest(const LoopTableEntry &le, unsigned int num, unsigned int nAmino)
Definition: LoopTable.cc:147
virtual ~LoopTable()
Definition: LoopTable.cc:90
Implements an entry for the loop table (equivalent to the old "ProteinTableEntry" from the previous v...
Definition: LoopTableEntry.h:41
virtual void cluster(double cutoff)
Definition: LoopTable.cc:366
virtual unsigned int size()
Definition: LoopTable.h:199
virtual LoopTableEntry getClosest(const LoopTableEntry &le, unsigned int currentSelection=1)
Definition: LoopTable.cc:116
virtual void store(const LoopTableEntry &)
Definition: LoopTable.cc:533
unsigned int getMaxBins()
Definition: LoopTable.h:220
void copy(const LoopTable &orig)
Definition: LoopTable.cc:203
This struct implements the container for ramachandran plot-like phi/psi angle combinations for the Lo...
Definition: RamachandranData.h:42
LoopTableEntry selectOccurrence()
Definition: LoopTable.cc:575
unsigned int getLength()
Definition: LoopTable.h:211
virtual void write(const string &)
Definition: LoopTable.cc:406
virtual void adjustTable()
Definition: LoopTable.cc:274
void setLength(unsigned int l)
Definition: LoopTable.h:240
virtual void read(const string &)
Definition: LoopTable.cc:295
void printTable(unsigned int)
Definition: LoopTable.cc:657