00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OST_QA_ALL_ATOM_POTENTIAL_HH
00020 #define OST_QA_ALL_ATOM_POTENTIAL_HH
00021
00022
00023
00024
00025 #include <boost/shared_ptr.hpp>
00026 #include <ost/qa/module_config.hh>
00027 #include <ost/qa/interaction_statistics.hh>
00028
00029
00030 namespace ost { namespace qa {
00031
00032 class AllAtomPotential;
00033 typedef boost::shared_ptr<AllAtomPotential> AllAtomPotentialPtr;
00034
00036 struct DLLEXPORT_OST_QA AllAtomPotentialOpts {
00037
00038 AllAtomPotentialOpts();
00039
00040 AllAtomPotentialOpts(float lower_cutoff, float upper_cutoff, float distance_bucket_size, int sequence_sep, float sigma=0.02);
00041
00042 public:
00044 float sigma;
00046 float lower_cutoff;
00048 float upper_cutoff;
00049
00051 float distance_bucket_size;
00053 int sequence_sep;
00054
00055 template <typename DS>
00056 void Serialize(DS& ds);
00057 };
00058
00059
00060
00061 class DLLEXPORT_OST_QA AllAtomPotential {
00062 public:
00065 static AllAtomPotentialPtr Create(const InteractionStatisticsPtr& s,
00066 const AllAtomPotentialOpts& o);
00067
00069 static AllAtomPotentialPtr LoadFromFile(const String& filename);
00070
00072 void SaveToFile(const String& filename);
00073
00075 float GetTotalEnergy(mol::EntityView view);
00076
00079 float GetEnergy(atom::ChemType type_a, atom::ChemType type_b, float distance);
00080
00085 float GetTotalEnergy(mol::EntityView view, mol::EntityView target_view);
00086
00088 int GetEnergyCounts() const;
00089
00091 void SetSequenceSeparation(int seq_sep);
00092
00093
00094 template <typename DS>
00095 void Serialize(DS& ds);
00096 public:
00097 void Fill(const InteractionStatisticsPtr& stats);
00098
00100 typedef MultiClassifier<float, int, int, float> AllAtomEnergies;
00101 private:
00102 AllAtomPotentialOpts options_;
00103 AllAtomEnergies energies_;
00104 mol::EntityView target_view_;
00105 int interaction_counts_member_;
00106 };
00107
00108 }}
00109
00110 #endif