Generated on Tue Dec 16 13:34:01 2008 for ell-3.0.0 by doxygen 1.5.1

src/ell/rna/RNAFreeEnergy_TB.hh

Go to the documentation of this file.
00001 #ifndef RNAFREEENERGY_TB_HH_
00002 #define RNAFREEENERGY_TB_HH_
00003 
00004 
00005 #include <biu/RNAStructure_TB.hh>
00006 
00007 namespace ell
00008 {
00009 
00019     class RNAFreeEnergy_TB : public biu::RNAStructure_TB
00020     {
00021     protected:
00025         static const biu::AllowedBasePairs      COMMON_BPAIRS;
00026 
00030         static const biu::Alphabet              COMMON_ALPHABET;
00031         
00033         static const double ENERGY_INF; 
00034         
00036         mutable double energy;
00037         
00038         short* seqVienna;
00039         short* pairTable;
00040 
00041     public:
00042         
00046         static bool calculateEnergyChanges;
00047         
00051         typedef std::pair<size_t, size_t> SingleMove;
00052 
00053         RNAFreeEnergy_TB(   const std::string& rnaSeqStr
00054                             , const std::string& rnaStructBracketDotStr
00055                             , const double energy = ENERGY_INF );
00056 
00057         RNAFreeEnergy_TB(   biu::Sequence* rnaSeq
00058                             , const biu::Structure* const rnaStructBracketDot
00059                             , const bool seqIsShared = false
00060                             , const double energy = ENERGY_INF );
00061 
00062         RNAFreeEnergy_TB(const RNAFreeEnergy_TB& rnaFreeEnerg);
00063         
00064         virtual ~RNAFreeEnergy_TB();
00065         
00071         void applySingleMoveInPlace(const SingleMove& move);
00072         
00078         bool isValidSingleMove(const SingleMove& move) const;
00079         
00080         static const biu::Alphabet* getSequenceAlphabet() {
00081             return &COMMON_ALPHABET;
00082         }
00083 
00084     // abstract functions (BioMolecule)
00085         
00091         virtual double  getEnergy( void ) const;
00092         
00105     virtual void setEnergy( const double energy );
00106 
00107         RNAFreeEnergy_TB&   operator= (const RNAFreeEnergy_TB& rnaStruct2);
00108 
00112     virtual void setStructure(const biu::Structure& str);
00113 
00114     protected:
00115         
00118         virtual void moleculeChanged();
00119         
00124         virtual void updateSeqVienna();
00125         
00126     protected:
00127         
00130         static bool ViennaFoldParamsSet;
00131         
00134         static void setViennaFoldParams(void);
00135         
00136     };
00137 
00138 } // namespace biu
00139 
00140   // include definitions
00141 #include "ell/rna/RNAFreeEnergy_TB.icc"
00142 
00143 #endif /*RNAFREEENERGY_TB_HH_*/