Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OptEData.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 core::pack::rotamer_set::OptEData.hh
11 /// @brief Classes to store by-energy-term rotamer data for optE
12 /// @author Jim Havranek
13 
14 #ifndef INCLUDED_protocols_optimize_weights_OptEData_hh
15 #define INCLUDED_protocols_optimize_weights_OptEData_hh
16 
17 // Unit headers
19 
20 /// Project headers
21 #include <core/types.hh>
22 #include <core/chemical/AA.hh>
23 
27 
28 /// Utility headers
29 // AUTO-REMOVED #include <utility/exit.hh>
30 #include <utility/LexicographicalIterator.fwd.hh>
31 // AUTO-REMOVED #include <utility/vector1.hh>
32 #include <utility/pointer/owning_ptr.hh>
33 #include <utility/pointer/ReferenceCount.hh>
34 
35 /// C++ headers
36 #include <map>
37 
38 #include <utility/vector1.hh>
39 
40 
41 
42 namespace protocols {
43 namespace optimize_weights {
44 
45 
47 {
48 public:
49  ///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
50  virtual ~PNatAAOptERotamerData();
51  typedef core::Real Real;
53  typedef core::Size Size;
54 
55 public:
57  AA aa_in,
58  Size rot_num_in,
59  utility::vector1< Real > & data_vec_in,
60  utility::vector1< Real > & fixed_data_vec_in )
61  :
62  this_aa_( aa_in ),
63  rot_number_( rot_num_in ),
64  data_( data_vec_in ),
65  fixed_data_( fixed_data_vec_in )
66  {}
67 
69  {
70  return this_aa_;
71  }
72 
74  {
75  return rot_number_;
76  }
77 
78  Real
79  operator [] ( Size const i ) const
80  {
81  return data_[ i ];
82  }
83 
85  data()
86  {
87  return data_;
88  }
89 
92  {
93  return fixed_data_;
94  }
95 
96 private:
101 };
102 
104 {
105 public:
106  ///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
107  virtual ~PNatRotOptERotamerData();
108  typedef core::Real Real;
109  typedef core::Size Size;
110 
111 public:
117  ) :
118  rotamer_index_( rotamer_index ),
119  chi_( chi ),
120  free_data_( free_data ),
121  fixed_data_( fixed_data )
122  {}
123 
126  {
127  return rotamer_index_;
128  }
129 
131  chi() const
132  {
133  return chi_;
134  }
135 
137  free_data() const
138  {
139  return free_data_;
140  }
141 
142  Real
143  operator [] ( Size const i ) const
144  {
145  return free_data_[ i ];
146  }
147 
149  fixed_data() const
150  {
151  return fixed_data_;
152  }
153 
154 private:
159 
160 };
161 
163 public:
164  typedef core::Real Real;
165  typedef core::Size Size;
166 
167 public:
171  :
172  rms_(0.0),
173  free_data_( free_data ),
174  fixed_data_( fixed_data )
175  {}
176 
177  virtual ~SingleStructureData() {}
178 
179  Real
180  operator [] ( Size const i ) const {
181  return free_data_[ i ];
182  }
183 
185  free_data() const {
186  return free_data_;
187  }
188 
190  fixed_data() const {
191  return fixed_data_;
192  }
193 
194  Real rms() const { return rms_; }
195  void rms( Real rms_in ) { rms_ = rms_in; }
196 
197  std::string tag() const { return tag_; }
198  void tag( std::string const & setting ) { tag_ = setting; }
199 
200 private:
205 };
206 
207 std::ostream & operator << ( std::ostream & os, PNatAAOptERotamerDataOP rd );
208 
209 
210 
211 ///////////////////////////////////////////////////////////////////////////////
212 
214 {
215 public:
216  typedef core::Real Real;
217  typedef core::Size Size;
221 
222 public:
224 
225  virtual ~OptEPositionData();
226 
227  virtual
228  Real
229  get_score(
230  Multivec const & component_weights,
231  Multivec const & vars,
232  Multivec & dE_dvars,
233  /// Basically, turn over all the private data from OptEMultiFunc
234  Size const num_energy_dofs,
235  int const num_ref_dofs,
236  int const num_total_dofs,
237  EnergyMap const & fixed_terms,
238  ScoreTypes const & score_list,
239  ScoreTypes const & fixed_score_list
240  ) const = 0;
241 
242  virtual
243  void
244  print_score(
245  std::ostream & ostr,
246  Multivec const & component_weights,
247  Multivec const & vars,
248  Multivec & dE_dvars,
249  /// Basically, turn over all the private data from OptEMultiFunc
250  Size const num_energy_dofs,
251  int const num_ref_dofs,
252  int const num_total_dofs,
253  EnergyMap const & fixed_terms,
254  ScoreTypes const & score_list,
255  ScoreTypes const & fixed_score_list
256  ) const = 0;
257 
258  /// @brief Return the upper and lower bound on the unweighted components at this
259  /// position if they are larger (or smaller) than the unweighted values already in
260  /// the two input EnergyMaps.
261  virtual
262  void
263  range(
264  ScoreTypes const & free_score_list,
265  ScoreTypes const & fixed_score_list,
266  EnergyMap & lower_bound,
267  EnergyMap & upper_bound
268  ) const = 0;
269 
270  virtual
271  Size
272  size() const = 0;
273 
274  virtual
276  type() const = 0;
277 
278  virtual
279  void
280  write_to_file( std::ofstream & outfile ) const = 0;
281 
282  virtual
283  void
284  read_from_file( std::ifstream & infile ) = 0;
285 
286  virtual
287  void
288  write_to_binary_file( std::ofstream & outfile ) const = 0;
289 
290  virtual
291  void
292  read_from_binary_file( std::ifstream & infile ) = 0;
293 
294  virtual
295  Size
296  memory_use() const = 0;
297 
298  void
299  tag( std::string const & tag_in );
300 
301  std::string const &
302  tag() const;
303 
304 #ifdef USEMPI
305  virtual
306  void
307  send_to_node( int const destination_node, int const tag ) const;
308 
309  virtual
310  void
311  receive_from_node( int const source_node, int const tag );
312 #endif
313 
314 protected:
315 
316  /// @brief Helper function for range(); updates lower/upper_bound as needed
317  /// so that score_list scores from structure are included in the range.
318  void
319  update_range(
321  ScoreTypes const & free_score_list,
322  ScoreTypes const & fixed_score_list,
323  EnergyMap & lower_bound,
324  EnergyMap & upper_bound
325  ) const;
326 
327 private:
329 
330 };
331 
333 {
334 public:
336 
337 public:
339 
340  virtual ~PNatAAOptEPositionData();
341 
342  virtual
343  Real
344  get_score(
345  Multivec const & component_weights,
346  Multivec const & vars,
347  Multivec & dE_dvars,
348  /// Basically, turn over all the private data from OptEMultiFunc
349  Size const num_energy_dofs,
350  int const num_ref_dofs,
351  int const num_total_dofs,
352  EnergyMap const & fixed_terms,
353  ScoreTypes const & score_list,
354  ScoreTypes const & fixed_score_list
355  ) const;
356 
357  virtual
358  void
359  print_score(
360  std::ostream & ostr,
361  Multivec const & component_weights,
362  Multivec const & vars,
363  Multivec & dE_dvars,
364  /// Basically, turn over all the private data from OptEMultiFunc
365  Size const num_energy_dofs,
366  int const num_ref_dofs,
367  int const num_total_dofs,
368  EnergyMap const & fixed_terms,
369  ScoreTypes const & score_list,
370  ScoreTypes const & fixed_score_list
371  ) const;
372 
373  virtual
374  void
375  range(
376  ScoreTypes const & free_score_list,
377  ScoreTypes const & fixed_score_list,
378  EnergyMap & lower_bound,
379  EnergyMap & upper_bound
380  ) const;
381 
382  virtual
383  Size
384  size() const
385  {
386  return data_.size();
387  }
388 
389  virtual
391  type() const;
392 
393  virtual
394  void
395  write_to_file( std::ofstream & outfile ) const ;
396 
397  virtual
398  void
399  read_from_file( std::ifstream & infile );
400 
401  virtual
402  void
403  write_to_binary_file( std::ofstream & outfile ) const;
404 
405  virtual
406  void
407  read_from_binary_file( std::ifstream & infile );
408 
409  virtual
410  Size
411  memory_use() const;
412 
413 
414 #ifdef USEMPI
415 
416  virtual
417  void
418  send_to_node( int const destination_node, int const tag ) const;
419 
420  virtual
421  void
422  receive_from_node( int const source_node, int const tag );
423 
424 #endif
425 
426  void set_position( Size pos_in ) {
427  position_ = pos_in;
428  }
429 
430  Size position() const
431  {
432  return position_;
433  }
434 
435  void set_native_aa( AA nat_in )
436  {
437  native_aa_ = nat_in;
438  }
439 
440  AA native_aa() const
441  {
442  return native_aa_;
443  }
444 
445  void set_neighbor_count( Size nb_in )
446  {
447  neighbor_count_ = nb_in;
448  }
449 
451  {
452  return neighbor_count_;
453  }
454 
456  {
457  data_.push_back( rot_in );
458  }
459 
462  {
463  return data_;
464  }
465 
467  data() const
468  {
469  return data_;
470  }
471 
472  PNatAAOptERotamerDataOPs::const_iterator rotamer_data_begin() const
473  {
474  return data_.begin();
475  }
476  PNatAAOptERotamerDataOPs::const_iterator rotamer_data_end() const
477  {
478  return data_.end();
479  }
480 
481 protected:
482  /// @brief used by derived class as well -- finds the energies for the best rotamer for each amino acid
483  void
485  Multivec const & vars,
486  Size const num_energy_dofs,
487  EnergyMap const & fixed_terms,
488  ScoreTypes const & score_list,
489  ScoreTypes const & fixed_score_list,
490  Size const aa_range,
491  utility::vector1< Real > const & dummy_set,
492  utility::vector1< Real > & best_energy_by_aa,
493  utility::vector1< utility::vector1< Real > > & unweighted_E_dof,
494  Multivec & ref_deriv_weight
495  ) const;
496 
497 private:
502 
503 };
504 
506 {
507 public:
509 
510 public:
511 
513 
514  virtual ~PSSMOptEPositionData();
515 
516  void set_pssm_probabilities( utility::vector1< Real > const & pssm_probs );
517 
518  virtual
519  Real
520  get_score(
521  Multivec const & component_weights,
522  Multivec const & vars,
523  Multivec & dE_dvars,
524  /// Basically, turn over all the private data from OptEMultiFunc
525  Size const num_energy_dofs,
526  int const num_ref_dofs,
527  int const num_total_dofs,
528  EnergyMap const & fixed_terms,
529  ScoreTypes const & score_list,
530  ScoreTypes const & fixed_score_list
531  ) const;
532 
533  virtual
534  void
535  print_score(
536  std::ostream & ostr,
537  Multivec const & component_weights,
538  Multivec const & vars,
539  Multivec & dE_dvars,
540  /// Basically, turn over all the private data from OptEMultiFunc
541  Size const num_energy_dofs,
542  int const num_ref_dofs,
543  int const num_total_dofs,
544  EnergyMap const & fixed_terms,
545  ScoreTypes const & score_list,
546  ScoreTypes const & fixed_score_list
547  ) const;
548 
549  virtual
551  type() const;
552 
553  virtual
554  void
555  write_to_file( std::ofstream & outfile ) const ;
556 
557  virtual
558  void
559  read_from_file( std::ifstream & infile );
560 
561  virtual
562  void
563  write_to_binary_file( std::ofstream & outfile ) const;
564 
565  virtual
566  void
567  read_from_binary_file( std::ifstream & infile );
568 
569  virtual
570  Size
571  memory_use() const;
572 
573 #ifdef USEMPI
574  virtual
575  void
576  send_to_node( int const destination_node, int const tag ) const;
577 
578  virtual
579  void
580  receive_from_node( int const source_node, int const tag );
581 #endif
582 
583 private:
585 
586 };
587 
588 
590 {
591 public:
593 
594  virtual ~PNatRotOptEPositionData();
595 
596  virtual
597  Real
598  get_score(
599  Multivec const & component_weights,
600  Multivec const & vars,
601  Multivec & dE_dvars,
602  /// Basically, turn over all the private data from OptEMultiFunc
603  Size const num_energy_dofs,
604  int const num_ref_dofs,
605  int const num_total_dofs,
606  EnergyMap const & fixed_terms,
607  ScoreTypes const & score_list,
608  ScoreTypes const & fixed_score_list
609  ) const;
610 
611  virtual
612  void
613  print_score(
614  std::ostream & ostr,
615  Multivec const & component_weights,
616  Multivec const & vars,
617  Multivec & dE_dvars,
618  /// Basically, turn over all the private data from OptEMultiFunc
619  Size const num_energy_dofs,
620  int const num_ref_dofs,
621  int const num_total_dofs,
622  EnergyMap const & fixed_terms,
623  ScoreTypes const & score_list,
624  ScoreTypes const & fixed_score_list
625  ) const;
626 
627  Real
629  std::ostream & ostr,
630  bool print,
631  Multivec const & component_weights,
632  Multivec const & vars,
633  Multivec & dE_dvars,
634  /// Basically, turn over all the private data from OptEMultiFunc
635  Size const num_energy_dofs,
636  int const,
637  int const,
638  EnergyMap const & fixed_terms,
639  ScoreTypes const &,
640  ScoreTypes const & fixed_score_list
641  ) const;
642 
643  virtual
644  void
645  range(
646  ScoreTypes const & free_score_list,
647  ScoreTypes const & fixed_score_list,
648  EnergyMap & lower_bound,
649  EnergyMap & upper_bound
650  ) const;
651 
652  virtual
653  Size
654  size() const;
655 
656  virtual
658  type() const;
659 
660  virtual
661  void
662  write_to_file( std::ofstream & outfile ) const;
663 
664  virtual
665  void
666  read_from_file( std::ifstream & infile );
667 
668  virtual
669  void
670  write_to_binary_file( std::ofstream & outfile ) const;
671 
672  virtual
673  void
674  read_from_binary_file( std::ifstream & infile );
675 
676  virtual
677  Size
678  memory_use() const;
679 
680 
681 #ifdef USEMPI
682  virtual
683  void
684  send_to_node( int const destination_node, int const tag ) const;
685 
686  virtual
687  void
688  receive_from_node( int const source_node, int const tag );
689 #endif
690 
691  void
692  set_native_rotamer_index( utility::vector1< Size > const & native_rotamer_index );
693 
694  void
695  set_native_rotamer_chi( utility::vector1< Real > const & native_chi );
696 
697  void
698  set_native_chi_periodicity( utility::vector1< Real > const & native_chi_periodicity );
699 
700  bool
702 
703  void
704  set_rotamer_well_counts( utility::vector1< Size > const & rotamer_well_counts );
705 
707 
709  data();
710 
712  data() const;
713 
714  PNatRotOptERotamerDataOPs::const_iterator rotamer_data_begin() const;
715  PNatRotOptERotamerDataOPs::const_iterator rotamer_data_end() const;
716 
717 
718  core::chemical::AA aa() const;
720 
721  Real phi() const;
722  Real psi() const;
723  Real & phi();
724  Real & psi();
725 
726 private:
727 
728  Size
729  rotamer_index_2_well_id( utility::vector1< Size > const & rotamer_index ) const;
730 
731  Size
732  rotamer_index_2_well_id( utility::LexicographicalIterator const & lexiter ) const;
733 
734  bool
736  utility::vector1< Size > const & rotamer_index
737  ) const;
738 
739  bool
741  utility::LexicographicalIterator const & lexiter
742  ) const;
743 
744 
745 private:
746 
749  int n_wells_;
756 };
757 
759 {
760 public:
762  virtual ~PNatStructureOptEData();
763 
764  virtual
765  Real
766  get_score(
767  Multivec const & component_weights,
768  Multivec const & vars,
769  Multivec & dE_dvars,
770  /// Basically, turn over all the private data from OptEMultiFunc
771  Size const num_energy_dofs,
772  int const num_ref_dofs,
773  int const num_total_dofs,
774  EnergyMap const & fixed_terms,
775  ScoreTypes const & score_list,
776  ScoreTypes const & fixed_score_list
777  ) const;
778 
779  virtual
780  void
781  print_score(
782  std::ostream & ostr,
783  Multivec const & component_weights,
784  Multivec const & vars,
785  Multivec & dE_dvars,
786  /// Basically, turn over all the private data from OptEMultiFunc
787  Size const num_energy_dofs,
788  int const num_ref_dofs,
789  int const num_total_dofs,
790  EnergyMap const & fixed_terms,
791  ScoreTypes const & score_list,
792  ScoreTypes const & fixed_score_list
793  ) const;
794 
795  Real
797  std::ostream & ostr,
798  bool print, // generate output?
799  Multivec const & component_weights,
800  Multivec const & vars,
801  Multivec & dE_dvars,
802  /// Basically, turn over all the private data from OptEMultiFunc
803  Size const num_energy_dofs,
804  int const num_ref_dofs,
805  int const num_total_dofs,
806  EnergyMap const & fixed_terms,
807  ScoreTypes const & score_list,
808  ScoreTypes const & fixed_score_list
809  ) const;
810 
811  virtual
812  void
813  range(
814  ScoreTypes const & free_score_list,
815  ScoreTypes const & fixed_score_list,
816  EnergyMap & lower_bound,
817  EnergyMap & upper_bound
818  ) const;
819 
820  virtual
821  Size
822  size() const;
823 
824  virtual
826  type() const;
827 
828  virtual
829  void
830  write_to_file( std::ofstream & outfile ) const;
831 
832  virtual
833  void
834  read_from_file( std::ifstream & infile );
835 
836  virtual
837  void
838  write_to_binary_file( std::ofstream & outfile ) const;
839 
840  virtual
841  void
842  read_from_binary_file( std::ifstream & infile );
843 
844  virtual
845  Size
846  memory_use() const;
847 
848 #ifdef USEMPI
849  virtual
850  void
851  send_to_node( int const destination_node, int const tag ) const;
852 
853  virtual
854  void
855  receive_from_node( int const source_node, int const tag );
856 #endif
857 
858  void
859  set_total_residue( Size total_residue );
860 
861  void
863 
864  void
866 
867  void
868  n_top_natives_to_score( Size n_top );
869 
870  Size
871  n_top_natives_to_score() const;
872 
873  void
874  set_normalize_decoy_stddev( bool setting );
875 
876  void
877  set_initial_decoy_stddev( Real setting );
878 
879  Real
880  nativeness( Real rms ) const;
881 
882  static
883  void
884  set_nativeness_low( Real nativeness_rms_low );
885 
886  static
887  void
888  set_nativeness_high( Real nativeness_rms_low );
889 
890  static
891  Real
892  nativeness_low();
893 
894  static
895  Real
896  nativeness_high();
897 
898 
899 protected:
907  static Real nativeness_rms_low_; // Above this rms, nativeness starts to decline
908  static Real nativeness_rms_high_; // Above this rms, nativeness is zero
911 };
912 
913 
915 {
916 public:
918 
919 public:
921  virtual ~DDGMutationOptEData();
922 
923  virtual
924  Real
925  get_score(
926  Multivec const & component_weights,
927  Multivec const & vars,
928  Multivec & dE_dvars,
929  /// Basically, turn over all the private data from OptEMultiFunc
930  Size const num_energy_dofs,
931  int const num_ref_dofs,
932  int const num_total_dofs,
933  EnergyMap const & fixed_terms,
934  ScoreTypes const & score_list,
935  ScoreTypes const & fixed_score_list
936  ) const;
937 
938  virtual
939  void
940  print_score(
941  std::ostream & ostr,
942  Multivec const & component_weights,
943  Multivec const & vars,
944  Multivec & dE_dvars,
945  /// Basically, turn over all the private data from OptEMultiFunc
946  Size const num_energy_dofs,
947  int const num_ref_dofs,
948  int const num_total_dofs,
949  EnergyMap const & fixed_terms,
950  ScoreTypes const & score_list,
951  ScoreTypes const & fixed_score_list
952  ) const;
953 
954  Real
956  std::ostream & ostr,
957  bool print, // generate output?
958  Multivec const & component_weights,
959  Multivec const & vars,
960  Multivec & dE_dvars,
961  /// Basically, turn over all the private data from OptEMultiFunc
962  Size const num_energy_dofs,
963  int const num_ref_dofs,
964  int const num_total_dofs,
965  EnergyMap const & fixed_terms,
966  ScoreTypes const & score_list,
967  ScoreTypes const & fixed_score_list
968  ) const;
969 
970  virtual
971  void
972  range(
973  ScoreTypes const & free_score_list,
974  ScoreTypes const & fixed_score_list,
975  EnergyMap & lower_bound,
976  EnergyMap & upper_bound
977  ) const;
978 
979  virtual
980  Size
981  size() const;
982 
983  virtual
985  type() const;
986 
987  virtual
988  void
989  write_to_file( std::ofstream & outfile ) const;
990 
991  virtual
992  void
993  read_from_file( std::ifstream & infile );
994 
995  virtual
996  void
997  write_to_binary_file( std::ofstream & outfile ) const;
998 
999  virtual
1000  void
1001  read_from_binary_file( std::ifstream & infile );
1002 
1003  virtual
1004  Size
1005  memory_use() const;
1006 
1007 #ifdef USEMPI
1008  virtual
1009  void
1010  send_to_node( int const destination_node, int const tag ) const;
1011 
1012  virtual
1013  void
1014  receive_from_node( int const source_node, int const tag );
1015 #endif
1016 
1017  void
1018  set_wt_aa( AA wt_aa );
1019 
1020  void
1021  set_mut_aa( AA mut_aa );
1022 
1023  void
1024  set_experimental_ddg( Real ddg );
1025 
1026  void
1028 
1029  void
1031 
1032 protected:
1038 
1039 };
1040 
1042 {
1043 public:
1044 
1045  bool active_;
1049 
1050 public:
1052  active_( true ),
1053  min_weight_( 0 ),
1054  max_weight_( 10 ),
1055  spring_constant_( 1000 )
1056  {}
1057 
1058 };
1059 
1061 {
1062 public:
1064 
1065  ConstraintedOptimizationWeightFunc( ScoreTypes const & score_list );
1066 
1068  void
1069  initialize_constraints_from_file( std::ifstream & infile );
1070 
1071  virtual
1072  Real
1073  get_score(
1074  Multivec const & component_weights,
1075  Multivec const & vars,
1076  Multivec & dE_dvars,
1077  /// Basically, turn over all the private data from OptEMultiFunc
1078  Size const num_energy_dofs,
1079  int const num_ref_dofs,
1080  int const num_total_dofs,
1081  EnergyMap const & fixed_terms,
1082  ScoreTypes const & score_list,
1083  ScoreTypes const & fixed_score_list
1084  ) const;
1085 
1086  virtual
1087  void
1088  print_score(
1089  std::ostream & ostr,
1090  Multivec const & component_weights,
1091  Multivec const & vars,
1092  Multivec & dE_dvars,
1093  /// Basically, turn over all the private data from OptEMultiFunc
1094  Size const num_energy_dofs,
1095  int const num_ref_dofs,
1096  int const num_total_dofs,
1097  EnergyMap const & fixed_terms,
1098  ScoreTypes const & score_list,
1099  ScoreTypes const & fixed_score_list
1100  ) const;
1101 
1102  virtual
1103  void
1104  range(
1105  ScoreTypes const & free_score_list,
1106  ScoreTypes const & fixed_score_list,
1107  EnergyMap & lower_bound,
1108  EnergyMap & upper_bound
1109  ) const;
1110 
1111  virtual
1112  Size
1113  size() const;
1114 
1115  virtual
1117  type() const;
1118 
1119  virtual
1120  void
1121  write_to_file( std::ofstream & outfile ) const ;
1122 
1123  virtual
1124  void
1125  read_from_file( std::ifstream & infile );
1126 
1127  virtual
1128  void
1129  write_to_binary_file( std::ofstream & outfile ) const;
1130 
1131  virtual
1132  void
1133  read_from_binary_file( std::ifstream & infile );
1134 
1135  virtual
1136  Size
1137  memory_use() const;
1138 
1139 
1140 #ifdef USEMPI
1141 
1142  virtual
1143  void
1144  send_to_node( int const destination_node, int const tag ) const;
1145 
1146  virtual
1147  void
1148  receive_from_node( int const source_node, int const tag );
1149 
1150 #endif
1151 
1152 private:
1156 
1157 };
1158 
1160 {
1161 public:
1162  static
1165 
1166  static
1167  std::string const &
1168  optE_type_name( OptEPositionDataType const type );
1169 
1170  static
1171  bool
1172  is_optE_type_name( std::string const & name );
1173 
1174  static
1176  optE_type_from_name( std::string const & name );
1177 
1178 private:
1179  static
1180  void
1182 
1185  static std::map< std::string, OptEPositionDataType > optE_type_name_map_;
1186 };
1187 
1188 ///////////////////////////////////////////////////////////////////////////////
1189 
1190 
1192 {
1193 public:
1194  ///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
1195  virtual ~OptEData();
1196  typedef core::Real Real;
1197  typedef core::Size Size;
1201 
1202 public:
1204 
1206  ScoreTypes const & fixed_score_list,
1207  ScoreTypes const & free_score_list )
1208  :
1209  fixed_energy_terms_( fixed_score_list ),
1210  energy_terms_( free_score_list )
1211  {}
1212 
1214  {
1215  return data_.size();
1216  }
1217 
1218  Size num_rotamers() const;
1219 
1221  {
1222  data_.push_back( pos_data_in );
1223  }
1224 
1225  OptEPositionDataOPs::const_iterator position_data_begin() const
1226  {
1227  return data_.begin();
1228  }
1229  OptEPositionDataOPs::const_iterator position_data_end() const
1230  {
1231  return data_.end();
1232  }
1233 
1235  {
1236  return fixed_energy_terms_;
1237  }
1238  ScoreTypes const & energy_terms() const
1239  {
1240  return energy_terms_;
1241  }
1242 
1243  void write_to_file( std::string filename = "opte.data" ) const;
1245  void write_to_binary_file( std::string filename = "opte.data" ) const;
1247 
1248 private:
1252 };
1253 
1254 } // namespace optimize_weights
1255 } // namespace protocols
1256 
1257 #endif // INCLUDE_protocols_optimize_weights_OptEData_HH