00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OST_QA_TORSION_POTENTIAL_HH
00020 #define OST_QA_TORSION_POTENTIAL_HH
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include <ost/qa/torsion_statistics.hh>
00032 #include <boost/shared_ptr.hpp>
00033 #include <vector>
00034 #include <boost/scoped_ptr.hpp>
00035
00036 namespace ost { namespace qa {
00037
00038 typedef std::vector<AminoAcidSet> AminoAcidAlphabet;
00039
00044 struct DLLEXPORT_OST_QA TorsionPotentialOpts {
00049 TorsionPotentialOpts();
00050
00052 int prev_angular_bucket_size;
00053 int central_angular_bucket_size;
00054 int next_angular_bucket_size;
00056 AminoAcidAlphabet alphabet;
00058 Real sigma;
00060 template <typename DS>
00061 void Serialize(DS& ds);
00062 };
00063
00064 class TorsionPotential;
00065 typedef boost::shared_ptr<TorsionPotential> TorsionPotentialPtr;
00066
00070 class DLLEXPORT_OST_QA TorsionPotential {
00071 public:
00077 static TorsionPotentialPtr Create(TorsionStatisticsPtr statistics,
00078 const TorsionPotentialOpts& opts,
00079 bool calculate_average_energy_flag);
00081 static TorsionPotentialPtr LoadFromFile(const String& path);
00082
00084 Real GetTotalEnergy(mol::EntityHandle entity);
00085
00088 Real GetTotalEnergy(mol::EntityView view);
00089
00091 int GetEnergyCounts() const;
00092
00096 void SaveToFile(const String& path);
00097
00099 template <typename DS>
00100 void Serialize(DS& ds);
00101
00102
00103 public:
00106 typedef MultiClassifier<float, int, Real, Real,
00107 Real, Real, Real, Real> TorsionEnergies;
00108 private:
00109 void Fill(const TorsionStatisticsPtr& stat,
00110 bool calculate_average_energy_flag);
00111
00112 TorsionPotentialOpts options_;
00113 TorsionEnergies energies_;
00114 int num_torsions_;
00115 };
00116
00117
00118 }}
00119
00120 #endif