00001 //------------------------------------------------------------------------------ 00002 // This file is part of the OpenStructure project <www.openstructure.org> 00003 // 00004 // Copyright (C) 2008-2010 by the OpenStructure authors 00005 // 00006 // This library is free software; you can redistribute it and/or modify it under 00007 // the terms of the GNU Lesser General Public License as published by the Free 00008 // Software Foundation; either version 3.0 of the License, or (at your option) 00009 // any later version. 00010 // This library is distributed in the hope that it will be useful, but WITHOUT 00011 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00012 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00013 // details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public License 00016 // along with this library; if not, write to the Free Software Foundation, Inc., 00017 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 //------------------------------------------------------------------------------ 00019 #ifndef OST_QA_SOLIS_TORSION_POTENTIAL_HH 00020 #define OST_QA_SOLIS_TORSION_POTENTIAL_HH 00021 /* 00022 00023 00024 Author: Marco Biasini, Pascal Benkert 00025 */ 00026 #include <ost/qa/solis_torsion_statistics.hh> 00027 #include <boost/shared_ptr.hpp> 00028 #include <vector> 00029 #include <boost/scoped_ptr.hpp> 00030 00031 namespace ost { namespace qa { 00032 00033 typedef std::vector<AminoAcidSet> AminoAcidAlphabet; 00034 00039 struct DLLEXPORT_OST_QA TorsionPotentialOptsSolis { 00044 TorsionPotentialOptsSolis(); 00045 00047 int angular_bucket_size; 00050 AminoAcidAlphabet outer_alphabet; 00053 AminoAcidAlphabet inner_alphabet; 00055 Real sigma; 00057 template <typename DS> 00058 void Serialize(DS& ds); 00059 }; 00060 00061 class TorsionPotentialSolis; 00062 typedef boost::shared_ptr<TorsionPotentialSolis> TorsionPotentialSolisPtr; 00063 00074 class DLLEXPORT_OST_QA TorsionPotentialSolis { 00075 public: 00078 static TorsionPotentialSolisPtr Create(TorsionStatisticsSolisPtr statistics, 00079 const TorsionPotentialOptsSolis& opts); 00081 static TorsionPotentialSolisPtr 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, int, 00107 int, Real, Real> TorsionEnergies; 00108 private: 00109 void FillAll(const TorsionStatisticsSolisPtr& stat); 00110 00111 void FillPhiPsi(const TorsionStatisticsSolisPtr& stat, int phi, int psi, 00112 uint32_t total); 00113 TorsionPotentialOptsSolis options_; 00114 TorsionEnergies energies_; 00115 int num_torsions_; 00116 }; 00117 00118 00119 }} 00120 00121 #endif
1.5.8