OpenStructure
solis_torsion_potential.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2011 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_QA_SOLIS_TORSION_POTENTIAL_HH
20 #define OST_QA_SOLIS_TORSION_POTENTIAL_HH
21 /*
22 
23 
24  Author: Marco Biasini, Pascal Benkert
25  */
27 #include <boost/shared_ptr.hpp>
28 #include <vector>
29 #include <boost/scoped_ptr.hpp>
30 
31 namespace ost { namespace qa {
32 
33 typedef std::vector<AminoAcidSet> AminoAcidAlphabet;
34 
45 
57  template <typename DS>
58  void Serialize(DS& ds);
59 };
60 
62 typedef boost::shared_ptr<TorsionPotentialSolis> TorsionPotentialSolisPtr;
63 
75 public:
78  static TorsionPotentialSolisPtr Create(TorsionStatisticsSolisPtr statistics,
79  const TorsionPotentialOptsSolis& opts);
81  static TorsionPotentialSolisPtr LoadFromFile(const String& path);
82 
84  Real GetTotalEnergy(mol::EntityHandle entity);
85 
88  Real GetTotalEnergy(mol::EntityView view);
89 
91  int GetEnergyCounts() const;
92 
96  void SaveToFile(const String& path);
97 
99  template <typename DS>
100  void Serialize(DS& ds);
101 
102 
103 public:
106  typedef MultiClassifier<float, int, int,
108 private:
109  void FillAll(const TorsionStatisticsSolisPtr& stat);
110 
111  void FillPhiPsi(const TorsionStatisticsSolisPtr& stat, int phi, int psi,
112  uint32_t total);
113  TorsionPotentialOptsSolis options_;
114  TorsionEnergies energies_;
115  int num_torsions_;
116 };
117 
118 
119 }}
120 
121 #endif