Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NatbiasSecondaryStructureEnergy.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 /// @file ./src/protocols/fldsgn/potentials/sspot/NatbiasSecondaryStructureEnergy.cc
11 /// @brief native biased centroid score for secondary structures
12 /// @author Nobuyasu Koga ( nobuyasu@uw.edu )
13 
14 // Unit headers
17 
18 // Package headers
26 
27 // Project headers
28 #include <core/pose/Pose.hh>
29 // AUTO-REMOVED #include <core/scoring/dssp/Dssp.hh>
31 // AUTO-REMOVED #include <core/scoring/ScoreFunction.hh>
34 // AUTO-REMOVED #include <core/scoring/methods/EnergyMethodOptions.hh>
35 #include <basic/Tracer.hh>
36 
37 #include <utility/vector1.hh>
38 
39 
40 static basic::Tracer TR("protocols.fldsgn.potentials.sspot.NatbiasSecondaryStructureEnergy", basic::t_info);
41 
42 namespace protocols {
43 namespace fldsgn {
44 namespace potentials {
45 namespace sspot {
46 
47 //////////////////////////////////////////////////////////////////////////////////////////////////////
48 /// SecodaryStructureEnergy2Creator
49 /// @details This must return a fresh instance of the SecondaryStructureEnergy class,
50 /// never an instance already in use
53 {
55 }
56 
59 {
60  ScoreTypes sts;
61  sts.push_back( core::scoring::natbias_hs );
62  sts.push_back( core::scoring::natbias_ss );
63  sts.push_back( core::scoring::natbias_hh );
64  sts.push_back( core::scoring::natbias_stwist );
65  return sts;
66 }
67 
68 
69 /// @brief default constructor
72  native_secstruct_( "" ),
73  use_sspot_( false ),
74  use_hhpot_( false ),
75  use_hspot_( false ),
76  use_nobias_( false ),
77  sspot_( NULL ),
78  hhpot_( NULL ),
79  hspot_( NULL )
80 {}
81 
82 
83 /// @brief copy constructor
85  parent( src ),
86  native_secstruct_( src.native_secstruct_ ),
87  use_sspot_( src.use_sspot_ ),
88  use_hhpot_( src.use_hhpot_ ),
89  use_hspot_( src.use_hspot_ ),
90  use_nobias_( src.use_nobias_ ),
91  sspot_( src.sspot_ ),
92  hhpot_( src.hhpot_ ),
93  hspot_( src.hspot_ )
94 {}
95 
96 
97 /// @brief clone
100 {
101  return new NatbiasSecondaryStructureEnergy( *this );
102 }
103 
104 /// @brief set native secondary structure
105 void
107 {
108  native_secstruct_ = secstruct;
109 }
110 
111 /// @brief set native NatbiasStrandPairPotential
112 void
114 {
116  use_sspot_ = true;
117  sspot_ = new NatbiasStrandPairPotential( spairset );
118 }
119 
120 
121 /// @brief set NatbiasHelixPairPotential
122 void
124 {
126  use_hhpot_ = true;
127  hhpot_ = new NatbiasHelixPairPotential( hpairset );
128 }
129 
130 /// @brief set HelicesSheetPotential
131 void
133 {
135  use_hspot_ = true;
136  hspot_ = new NatbiasHelicesSheetPotential( hss3set );
137 }
138 
139 
140 /// @brief set native NatbiasStrandPairPotential
141 void
143 {
144  use_sspot_ = true;
145  sspot_ = sspot;
146 }
147 
148 /// @brief set NatbiasHelixPairPotential
149 void
151 {
152  use_hhpot_ = true;
153  hhpot_ = hhpot;
154 }
155 
156 /// @brief set NatbiasHelicesSheetPotential
157 void
159 {
160  use_hspot_ = true;
161  hspot_ = hspot;
162 }
163 
164 /// @brief set up for scoring
165 void
167 {
169 }
170 
171 /// @brief all scoring happens here
172 void
174  Pose & pose,
175  ScoreFunction const &,
176  EnergyMap & totals
177 ) const
178 {
181 
182  runtime_assert( pose.total_residue() == native_secstruct_.length() );
183 
184  Real ss_score( 0.0 ), hh_score( 0.0 ), hs_score( 0.0 );
185 
186  SS_Info2_OP ssinfo = new SS_Info2( pose, native_secstruct_ );
187 
188  if( use_sspot_ ) sspot_->score( pose, *ssinfo, ss_score );
189 
190  if( use_hhpot_ ) hhpot_->score( ssinfo, hh_score );
191 
192  if( use_hspot_ ) hspot_->score( ssinfo, hh_score, hs_score );
193 
194  // set calculated score
195  totals[ core::scoring::natbias_hs ] = hs_score;
196  totals[ core::scoring::natbias_ss ] = ss_score;
197  totals[ core::scoring::natbias_hh ] = hh_score;
198 
199  // TR << "hs_score: " << hs_score << " hh_score: " << hh_score << " ss_score: " << ss_score << std::endl;
200 
201 }
202 
203 
204 /// @brief SecondaryStructureEnergy distance cutoff
207 {
208  return 6.0; /// now subtracted off 6.0 from cutoffs in centroid params files
209 // return 0.0; /// since all the cutoffs for centroid mode are rolled into the cendist check
210 }
211 
212 /// @brief SecondaryStructureEnergy
213 void
215 {}
216 
219 {
220  return 1;
221 }
222 
223 } // sspot
224 } // potentials
225 } // fldsgn
226 } // protocols