Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NestedEnergyTermOptEData.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file protocols/optimize_weights/NestedEnergyTermOptEData.hh
11 /// @brief Classes to store by-energy-term rotamer data for optE, when using the unfolded state energy term
12 /// @author Ron Jacak
13 
14 #ifndef INCLUDED_protocols_optimize_weights_NestedEnergyTermOptEData_hh
15 #define INCLUDED_protocols_optimize_weights_NestedEnergyTermOptEData_hh
16 
17 // Unit headers
20 
21 #include <core/types.hh>
22 #include <core/chemical/AA.hh>
23 
27 
28 // AUTO-REMOVED #include <fstream>
29 
30 #include <map>
31 
32 #include <utility/vector1.hh>
33 
34 
35 namespace protocols {
36 namespace optimize_weights {
37 
39 
40 public:
41  //typedef core::chemical::AA AA;
42 
45 
46  virtual Real get_score(
47  Multivec const & component_weights,
48  Multivec const & vars, Multivec & dE_dvars, Size const num_energy_dofs, int const num_ref_dofs, int const num_total_dofs,
49  EnergyMap const & fixed_terms, ScoreTypes const & score_list, ScoreTypes const & fixed_score_list ) const;
50 
51  virtual void print_score(
52  std::ostream & ostr, Multivec const & component_weights,
53  Multivec const & vars, Multivec & dE_dvars, Size const num_energy_dofs, int const num_ref_dofs, int const num_total_dofs,
54  EnergyMap const & fixed_terms, ScoreTypes const & score_list, ScoreTypes const & fixed_score_list ) const;
55 
57  std::ostream & ostr, bool print, Multivec const & component_weights,
58  Multivec const & vars, Multivec & dE_dvars, Size const num_energy_dofs, int const num_ref_dofs, int const num_total_dofs,
59  EnergyMap const & fixed_terms, ScoreTypes const & score_list, ScoreTypes const & fixed_score_list ) const;
60 
61  virtual OptEPositionDataType type() const;
62 
63  virtual void write_to_file( std::ofstream & outfile ) const ;
64  virtual void read_from_file( std::ifstream & infile );
65  virtual void write_to_binary_file( std::ofstream & outfile ) const;
66  virtual void read_from_binary_file( std::ifstream & infile );
67 
68  #ifdef USEMPI
69  virtual void send_to_node( int const destination_node, int const tag ) const;
70  virtual void receive_from_node( int const source_node, int const tag );
71  #endif
72 
75 
76  // Use the base class implementation for these methods
77 
78  //virtual void range( ScoreTypes const & free_score_list, ScoreTypes const & fixed_score_list, EnergyMap & lower_bound, EnergyMap & upper_bound ) const;
79  //virtual Size size() const { return data_.size(); }
80 
81  //void set_position( Size pos_in ) { position_ = pos_in; }
82  //Size position() const { return position_; }
83 
84  //void set_native_aa( AA nat_in ) { native_aa_ = nat_in; }
85  //AA native_aa() const { return native_aa_; }
86 
87  //void set_neighbor_count( Size nb_in ) { neighbor_count_ = nb_in; }
88  //Size neighbor_count() const { return neighbor_count_; }
89 
90  //void add_rotamer_line_data( PNatAAOptERotamerDataOP rot_in ) { data_.push_back( rot_in ); }
91 
92  //PNatAAOptERotamerDataOPs & data() { return data_; }
93  //PNatAAOptERotamerDataOPs const & data() const { return data_; }
94 
95  //PNatAAOptERotamerDataOPs::const_iterator rotamer_data_begin() const { return data_.begin(); }
96  //PNatAAOptERotamerDataOPs::const_iterator rotamer_data_end() const { return data_.end(); }
97 
98  virtual Size memory_use() const;
99 
100 protected:
101  /// @brief used by derived class as well -- finds the energies for the best rotamer for each amino acid
102  //void
103  //process_rotamers( Multivec const & vars, Size const num_energy_dofs, EnergyMap const & fixed_terms,
104  // ScoreTypes const & score_list, ScoreTypes const & fixed_score_list, Size const aa_range,
105  // utility::vector1< Real > const & dummy_set, utility::vector1< Real > & best_energy_by_aa,
106  // utility::vector1< utility::vector1< Real > > & unweighted_E_dof, Multivec & ref_deriv_weight
107  //) const;
108 
109 private:
110  //Size position_;
111  //AA native_aa_;
112  //Size neighbor_count_;
113  //PNatAAOptERotamerDataOPs data_;
114 
116 
117 };
118 
119 
121 
122 public:
123  //typedef core::chemical::AA AA;
124 
125 public:
128 
129  virtual Real get_score(
130  Multivec const & component_weights,
131  Multivec const & vars, Multivec & dE_dvars, Size const num_energy_dofs, int const num_ref_dofs, int const num_total_dofs,
132  EnergyMap const & fixed_terms, ScoreTypes const & score_list, ScoreTypes const & fixed_score_list ) const;
133 
134  virtual void print_score(
135  std::ostream & ostr, Multivec const & component_weights,
136  Multivec const & vars, Multivec & dE_dvars, Size const num_energy_dofs, int const num_ref_dofs, int const num_total_dofs,
137  EnergyMap const & fixed_terms, ScoreTypes const & score_list, ScoreTypes const & fixed_score_list ) const;
138 
140  std::ostream & ostr, bool print, Multivec const & component_weights,
141  Multivec const & vars, Multivec & dE_dvars, Size const num_energy_dofs, int const num_ref_dofs, int const num_total_dofs,
142  EnergyMap const & fixed_terms, ScoreTypes const & score_list, ScoreTypes const & fixed_score_list ) const;
143 
144  virtual OptEPositionDataType type() const;
145 
146  // Use the base class implementation for these methods. (The read/write methods are all empty anyway.)
147 
148  //virtual void range( ScoreTypes const & free_score_list, ScoreTypes const & fixed_score_list, EnergyMap & lower_bound, EnergyMap & upper_bound ) const;
149  //virtual Size size() const;
150 
151  //virtual void write_to_file( std::ofstream & outfile ) const;
152  //virtual void read_from_file( std::ifstream & infile );
153  //virtual void write_to_binary_file( std::ofstream & outfile ) const;
154  //virtual void read_from_binary_file( std::ifstream & infile );
155 
156  virtual Size memory_use() const;
157 
158 #ifdef USEMPI
159  virtual void send_to_node( int const destination_node, int const tag ) const;
160  virtual void receive_from_node( int const source_node, int const tag );
161 #endif
162 
163  //void set_wt_aa( AA wt_aa );
164  //void set_mut_aa( AA mut_aa );
165 
166  //void set_experimental_ddg( Real ddg );
167  //void add_wt( SingleStructureDataOP wt );
168 
169  //void add_mutant( SingleStructureDataOP mut );
170 
173 
174 private:
175  //Real experimental_ddG_;
176  //AA wt_aa_;
177  //AA mut_aa_;
178  //SingleStructureDataOPs wts_;
179  //SingleStructureDataOPs muts_;
180 
183 
184 };
185 
186 
187 } // namespace optimize_weights
188 } // namespace protocols
189 
190 #endif