src/ell/rna/RNAFreeEnergy.hh
Go to the documentation of this file.00001 #ifndef RNAFREEENERGY_HH_ 00002 #define RNAFREEENERGY_HH_ 00003 00004 00005 #include <biu/RNAStructure.hh> 00006 00007 namespace ell 00008 { 00009 00018 class RNAFreeEnergy : public biu::RNAStructure 00019 { 00020 protected: 00024 static const biu::AllowedBasePairs COMMON_BPAIRS; 00025 00029 static const biu::Alphabet COMMON_ALPHABET; 00030 00032 static const double ENERGY_INF; 00033 00035 mutable double energy; 00036 00037 public: 00041 typedef std::pair<size_t, size_t> SingleMove; 00042 00043 RNAFreeEnergy( const std::string& rnaSeqStr, 00044 const std::string& rnaStructBracketDotStr); 00045 00046 RNAFreeEnergy( biu::Sequence* rnaSeq, 00047 const biu::Structure* const rnaStructBracketDot, 00048 const bool seqIsShared = false); 00049 00050 RNAFreeEnergy(const RNAFreeEnergy& rnaFreeEnerg); 00051 virtual ~RNAFreeEnergy(); 00052 00058 void applySingleMoveInPlace(const SingleMove& move); 00059 00065 bool isValidSingleMove(const SingleMove& move) const; 00066 00074 size_t nextCompatibleSingleMovePos(const size_t pos) const; 00075 00076 static const biu::Alphabet* getSequenceAlphabet() { 00077 return &COMMON_ALPHABET; 00078 } 00079 00080 // abstract functions (BioMolecule) 00081 00087 virtual double getEnergy() const; 00088 00089 RNAFreeEnergy& operator= (const RNAFreeEnergy& rnaStruct2); 00090 00094 virtual void setStructure(const biu::Structure& str); 00095 00096 protected: 00097 00100 virtual void moleculeChanged(); 00101 }; 00102 00103 } // namespace biu 00104 00105 #endif /*RNAFREEENERGY_HH_*/