Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PcsDataCenterManagerSingleton.cc
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  //////////////////////////////////////////////
11  /// @begin
12  ///
13  /// @file protocols/scoring/methods/pcs2/PcsDataCenterManagerSingleton.cc
14  ///
15  /// @brief
16  ///
17  /// @detailed
18  ///
19  /// @param
20  ///
21  /// @return
22  ///
23  /// @remarks
24  ///
25  /// @references
26  ///
27  /// @authorsv Christophe Schmitz
28  ///
29  /// @last_modified February 2010
30  ////////////////////////////////////////////////
31 
32 
33 
34 // Unit headers
36 
37 // Package headers
42 // Project headers
43 #include <basic/Tracer.hh>
44 
45 // Utility headers
46 #include <utility/exit.hh>
47 
48 #include <utility/vector1.hh>
49 
50 
51 // Numeric headers
52 
53 // Objexx headers
54 
55 // C++ headers
56 
57 namespace protocols{
58 namespace scoring{
59 namespace methods{
60 namespace pcs2{
61 
62 basic::Tracer TR_PcsDataCenterManagerSingleton("protocols.scoring.methods.pcs.PcsDataCenterManagerSingleton");
63 
65 
66  core::Size i_multi_data;
67  core::Size n_multi_data;
68 
69  n_multi_data = pcs_e_p_m.get_n_multi_data();
70 
71  // using namespace basic::options;
72  // using namespace basic::options::OptionKeys;
73 
74  for(i_multi_data = 1; i_multi_data <= n_multi_data; ++i_multi_data ){
75 
76  utility::vector1<std::string> vec_filename;
78  vec_filename = pcs_e_p_m.get_PcsEnergyParameter_for(i_multi_data).get_vector_filename();
79  vec_weight = pcs_e_p_m.get_PcsEnergyParameter_for(i_multi_data).get_vector_weight();
80 
83  core::Real individual_scale(pcs_e_p_m.get_PcsEnergyParameter_for(i_multi_data).get_individual_scale());
84 
85  if(vec_filename.size() == 0){
86  utility_exit_with_message("Missing input file for PCS. Review your setup file");
87  }
88  PcsInputCenter pcs_i_c = PcsInputCenterManager::get_instance()->get_PcsInputCenter_for(vec_filename, vec_weight);
89  PcsDataCenterOP pcs_d_c_OP;
90  pcs_d_c_OP = new PcsDataCenter(pcs_i_c, start, end, individual_scale);
91  (*this).get_PCS_data_all().push_back(*pcs_d_c_OP);
92  }
93 }
94 
97  if ( instance_ == 0 ){
99  }
100  return instance_;
101 }
102 
103 
106  return (PCS_data_all_);
107 }
108 
109 std::ostream &
110 operator<<(std::ostream& out, const PcsDataCenterManagerSingleton & m){
111  core::Size i;
112 
113  out << "n paramagnetic center: " << m.get_n_multi_data() << std::endl;
114  for (i = 1 ; i <= m.get_n_multi_data(); ++i){
115  out << m.PCS_data_all_[i] << std::endl;
116  }
117  return out;
118 }
119 
122  return (PCS_data_all_.size());
123 }
124 
125 
127 
128 }//namespcacs PCS
129 }//namespace methods
130 }//namespace scoring
131 }//namespace protocols