19 #include <basic/options/option.hh>
20 #include <basic/options/keys/symmetry.OptionKeys.gen.hh>
21 #include <basic/Tracer.hh>
43 #include <utility/tag/Tag.hh>
51 #include <utility/vector0.hh>
52 #include <utility/vector1.hh>
58 namespace potentials {
60 static basic::Tracer
TR(
"protocols.fldsgn.SetSecStructEnergies" );
76 return "SetSecStructEnergies";
82 Super(
"SetSecStructEnergies" ),
85 ss_from_blueprint_( true ),
90 stwist_weight_( 1.0 ),
91 hs_pair_weight_( 0.0 ),
92 ss_pair_weight_( 0.0 ),
93 rsigma_weight_( 0.0 ),
101 Super(
"SetSecStructEnergies" ),
103 ss_from_blueprint_( ss_from_blueprint ),
108 stwist_weight_( 1.0 ),
109 hs_pair_weight_( 0.0 ),
110 ss_pair_weight_( 0.0 ),
111 rsigma_weight_( 0.0 ),
120 Super(
"SetSecStructEnergies" ),
122 blueprint_( blueprintOP ),
123 ss_from_blueprint_( ss_from_blueprint ),
128 stwist_weight_( 1.0 ),
129 hs_pair_weight_( 0.0 ),
130 ss_pair_weight_( 0.0 ),
131 rsigma_weight_( 0.0 ),
139 loaded_( rval.loaded_ ),
140 blueprint_( rval.blueprint_ ),
141 ss_from_blueprint_( rval.ss_from_blueprint_ ),
143 hh_weight_( rval.hh_weight_ ),
144 hs_weight_( rval.hs_weight_ ),
145 ss_weight_( rval.ss_weight_ ),
146 stwist_weight_( rval.stwist_weight_ ),
147 hs_pair_weight_( rval.hs_pair_weight_ ),
148 ss_pair_weight_( rval.ss_pair_weight_ ),
149 rsigma_weight_( rval.rsigma_weight_ ),
150 hpairpot_( rval.hpairpot_ ),
151 hspot_( rval.hspot_ )
203 runtime_assert( ss.length() == syminfo->num_independent_residues() );
206 for(
Size i=1; i<= syminfo->subunits(); i++ ) {
209 for(
Size i=1; i<=syminfo->num_virtuals(); i++ ) {
219 using namespace basic::options;
220 using namespace basic::options::OptionKeys;
251 runtime_assert(
sfx_ );
256 dssp.insert_ss_into_pose( pose );
261 Pose scratch( pose );
263 if( option[ basic::options::OptionKeys::symmetry::symmetry_definition ].active() ) {
267 symm_setup_mover->apply( scratch );
284 NatbiasSecondaryStructureEnergy sspot;
289 hspot_->hss_triplet_set( hss3set );
292 sspot.native_secstruct( ss );
293 if(
ss_weight_ != 0.0 ) sspot.set_natbias_spairpot( spairpot );
298 std::map< ScoreType, Real > new_weights;
303 sfx_->add_extra_method( new_weights, sspot );
307 TR <<
"original hs_pair term was turned off." << std::endl;
312 TR <<
"original ss_pair term was turned off." << std::endl;
317 TR <<
"original rsigma term was turned off." << std::endl;
342 if( blueprint ==
"" ){
343 TR <<
"No input of blueprint file ! " << std::endl;
344 runtime_assert(
false );
348 bool const ss_from_blueprint( tag->getOption<
bool>(
"ss_from_blueprint",
true ) );
352 String const sfxn ( tag->getOption<
String>(
"scorefxn",
"" ) );
354 TR <<
"[ERROR] No input of scorefxn !" << std::endl;
355 runtime_assert(
false );
359 TR <<
"score function, " << sfxn <<
", is used. " << std::endl;
362 if( tag->hasOption(
"natbias_ss" ) )
ss_weight_ = tag->getOption<
Real >(
"natbias_ss" );
363 if( tag->hasOption(
"natbias_hh" ) )
hh_weight_ = tag->getOption<
Real >(
"natbias_hh" );
364 if( tag->hasOption(
"natbias_hs" ) )
hs_weight_ = tag->getOption<
Real >(
"natbias_hs" );
365 if( tag->hasOption(
"natbias_stwist" ) )
stwist_weight_ = tag->getOption<
Real >(
"natbias_stwist" );
373 if( tag->hasOption(
"hh_dist_wts" ) ) {
374 hpairpot_->set_dist_wts( tag->getOption<
Real >(
"hh_dist_wts" ) );
376 if( tag->hasOption(
"hh_dist" ) ) {
379 if( tag->hasOption(
"hh_dist_s2" ) ) {
380 hpairpot_->set_dist_sigma2( tag->getOption<
Real >(
"hh_dist_s2" ) );
383 if( tag->hasOption(
"hh_cross_angle_wts" ) ) {
384 hpairpot_->set_angle_wts( tag->getOption<
Real >(
"hh_cross_angle_wts" ) );
386 if( tag->hasOption(
"hh_cross_angle" ) ) {
387 hpairpot_->set_angle( tag->getOption<
Real >(
"hh_cross_angle" ) );
389 if( tag->hasOption(
"hh_cross_angle_s2" ) ) {
390 hpairpot_->set_angle_sigma2( tag->getOption<
Real >(
"hh_cross_angle_s2" ) );
394 if( tag->hasOption(
"hs_atr_dist_wts" ) ) {
395 hspot_->set_hs_atr_dist_wts( tag->getOption<
Real >(
"hs_atr_dist_wts" ) );
397 if( tag->hasOption(
"hs_atr_dist" ) ) {
398 hspot_->set_hs_atr_dist( tag->getOption<
Real >(
"hs_atr_dist" ) );
400 if( tag->hasOption(
"hs_atr_dist_s2" ) ) {
401 hspot_->set_hs_atr_dist_sigma2( tag->getOption<
Real >(
"hs_atr_dist_s2" ) );
404 if( tag->hasOption(
"hs_angle_wts" ) ) {
405 hspot_->set_hs_angle_wts( tag->getOption<
Real >(
"hs_angle_wts" ) );
407 if( tag->hasOption(
"hs_angle" ) ) {
408 hspot_->set_hs_angle( tag->getOption<
Real >(
"hs_angle" ) );
410 if( tag->hasOption(
"hs_angle_s2") ) {
411 hspot_->set_hs_angle_sigma2( tag->getOption<
Real >(
"hs_angle_s2" ) );
414 if( tag->hasOption(
"hsheet_repl_dist" ) ) {
415 hspot_->set_hsheet_repl_dist( tag->getOption<
Real >(
"hsheet_repl_dist" ) );
418 if( tag->hasOption(
"hh_align_angle_wts" ) ) {
419 hspot_->set_hh_angle_wts( tag->getOption<
Real >(
"hh_align_angle_wts" ) );
421 if( tag->hasOption(
"hh_align_angle" ) ) {
422 hspot_->set_hh_angle( tag->getOption<
Real >(
"hh_align_angle" ) );
424 if( tag->hasOption(
"hh_align_angle_s2" ) ) {
425 hspot_->set_hh_angle_sigma2( tag->getOption<
Real >(
"hh_align_angle_s2" ) );