70 #include <numeric/xyzVector.hh>
71 #include <numeric/conversions.hh>
74 #include <basic/Tracer.hh>
75 #include <utility/exit.hh>
76 #include <utility/io/ozstream.hh>
81 #include <numeric/random/random.hh>
82 #include <utility/vector1.hh>
84 #include <ObjexxFCL/string.functions.hh>
96 #include <basic/options/keys/run.OptionKeys.gen.hh>
97 #include <basic/options/keys/hotspot.OptionKeys.gen.hh>
98 #include <basic/options/keys/packing.OptionKeys.gen.hh>
100 #include <boost/foreach.hpp>
106 #include <utility/vector0.hh>
107 #include <basic/options/option.hh>
109 #include <numeric/random/random.hh>
110 #include <numeric/random/random_permutation.hh>
113 #define foreach BOOST_FOREACH
118 using basic::Warning;
120 using ObjexxFCL::lead_zero_string_of;
122 static numeric::random::RandomGenerator
RG( 101079 );
124 namespace protocols {
125 namespace hotspot_hashing {
127 basic::Tracer
TR(
"protocols.hotspot_hashing");
133 target_distance_(15.0),
134 score_threshold_(-1.0),
135 filter_( new protocols::filters::TrueFilter ),
140 ReferenceCount( init ),
141 stub_set_( init.stub_set_ ),
142 stub_set_vec_( init.stub_set_vec_ ),
143 sc_only_( init.sc_only_ ),
144 target_resnum_( init.target_resnum_ ),
145 target_distance_( init.target_distance_ ),
146 chain_to_design_( init.chain_to_design_ ),
147 score_threshold_( init.score_threshold_ ),
148 filter_( init.filter_ ),
149 hotspot_length_( init.hotspot_length_ )
161 runtime_assert( length > 0 );
169 foreach(
Hs_data const hs_data, stubset )
add_stub_( hs_data.second.second );
182 amino_acids.push_back(
"ALA" );
183 amino_acids.push_back(
"ARG" );
184 amino_acids.push_back(
"ASN" );
185 amino_acids.push_back(
"ASP" );
186 amino_acids.push_back(
"GLU" );
187 amino_acids.push_back(
"GLN" );
188 amino_acids.push_back(
"HIS" );
189 amino_acids.push_back(
"ILE" );
190 amino_acids.push_back(
"LEU" );
191 amino_acids.push_back(
"LYS" );
192 amino_acids.push_back(
"MET" );
193 amino_acids.push_back(
"PHE" );
194 amino_acids.push_back(
"SER" );
195 amino_acids.push_back(
"THR" );
196 amino_acids.push_back(
"TRP" );
197 amino_acids.push_back(
"TYR" );
198 amino_acids.push_back(
"VAL" );
200 TR <<
"Calculating colony energy..." << std::endl;
207 for (std::multimap<core::Real, HotspotStubOP >::const_iterator i = res_stub_set.begin(); i != res_stub_set.end(); ++i) {
208 stub_vec.push_back( i->second );
210 if( stub_vec.size() == 0 )
continue;
212 for (std::multimap<core::Real, HotspotStubOP >::const_iterator i = res_stub_set.begin(); i != res_stub_set.end(); ++i) {
215 for (std::multimap<core::Real, HotspotStubOP >::const_iterator j = i; j != res_stub_set.end(); ++j) {
218 stubi_E += exp( 0-stubi->bonus_value() - pow(rms,3)/6*nres );
221 stubi_E = 0-log( stubi_E );
223 new_set->add_stub_( new_stub );
232 bool const fxnal_group = basic::options::option[ basic::options::OptionKeys::hotspot::fxnal_group ]();
236 amino_acids.push_back(
"ALA" );
237 amino_acids.push_back(
"ARG" );
238 amino_acids.push_back(
"ASN" );
239 amino_acids.push_back(
"ASP" );
240 amino_acids.push_back(
"GLU" );
241 amino_acids.push_back(
"GLN" );
242 amino_acids.push_back(
"HIS" );
243 amino_acids.push_back(
"ILE" );
244 amino_acids.push_back(
"LEU" );
245 amino_acids.push_back(
"LYS" );
246 amino_acids.push_back(
"MET" );
247 amino_acids.push_back(
"PHE" );
248 amino_acids.push_back(
"SER" );
249 amino_acids.push_back(
"THR" );
250 amino_acids.push_back(
"TRP" );
251 amino_acids.push_back(
"TYR" );
252 amino_acids.push_back(
"VAL" );
260 for (std::multimap<core::Real, HotspotStubOP >::const_iterator i = res_stub_set.begin(); i != res_stub_set.end(); ++i) {
261 stub_vec.push_back( i->second );
264 if( stub_vec.size() == 0 )
continue;
267 flat_rms.reserve( (
core::Size)pow(stub_vec.size(), 2.0f) );
279 TR.Debug <<
"rmsd " << stubidx_i <<
" " << stubidx_k <<
" " << rms << std::endl;
281 flat_rms.push_back( rms );
283 apcluster.set_sim( stubidx_i, stubidx_k, 0-rms );
284 apcluster.set_sim( stubidx_k, stubidx_i, 0-rms );
291 sort( flat_rms.begin(), flat_rms.end() );
292 core::Real const median_rmsd = *(flat_rms.begin() + flat_rms.size() / 2);
294 for(
core::Size i = 1; i <= stub_vec.size(); ++i ) {
295 apcluster.set_sim( i, i, 0 - median_rmsd );
296 TR.Debug <<
"Self-sim " << i <<
" " << 0-median_rmsd << std::endl;
315 TR <<
"Clustering " << resname <<
" stubs..." << std::endl;
316 bool cluster_success = apcluster.cluster( maxits, convits, lambda );
317 if( !cluster_success )
TR <<
"Hotspot APClustering did not fully converge... This happens all the time, but just FYI." << std::endl;
335 TR <<
"Finding low energy cluster members..." << std::endl;
338 apcluster.get_all_exemplars( exemplars );
343 apcluster.get_cluster_for(*it, cluster_members);
348 if( score < best_score ) {
351 TR.Debug << lowE_index <<
" " << stub->bonus_value() <<
" " << score <<
" " << best_score << std::endl;
354 assert( lowE_index != 0 );
355 lowE_members.push_back( lowE_index );
361 new_set->add_stub_( (stub_vec[*it]) );
369 std::map< std::string, std::multimap< core::Real, HotspotStubOP > >
::iterator ss_iter;
373 stub_set_.insert( std::make_pair( resname, empty_set ) );
376 TR.Debug <<
"Retrieving " << ss_iter->second.size() <<
" " << resname <<
" stubs." << std::endl;
377 return (ss_iter->second);
390 if ( ( scorecut > 0 ) && ( scorecut <=1 ) ) {
392 Size n_return =
static_cast<Size>(all_stubs.size() * scorecut + 0.5);
393 if( n_return < 1 ) n_return = 1;
394 TR <<
"Finding the top " << n_return <<
" stubs." << std::endl;
396 for ( Hotspots::const_iterator stub_iter = all_stubs.begin(); stub_iter != all_stubs.end() ; ++stub_iter ) {
397 if( i <= n_return ) {
399 new_set->add_stub_( stub_iter->second );
406 else if ( scorecut <=0 ) {
407 for ( Hotspots::const_iterator stub_iter = all_stubs.begin(); stub_iter != all_stubs.upper_bound( scorecut ) ; ++stub_iter ) {
408 if ( stub_iter->second->bonus_value() <= scorecut ) {
409 new_set->add_stub_( stub_iter->second );
413 TR <<
"Found " << new_set->size() <<
" stubs better than " << scorecut << std::endl;
426 for ( Hs_map::const_iterator ss_iter=
stub_set_.begin(); ss_iter !=
stub_set_.end(); ++ss_iter ) {
428 if ( ( scorecut > 0) && ( scorecut <= 1 ) ) {
430 Size n_return =
static_cast<Size>(ss_iter->second.size() * scorecut + 0.5);
431 TR <<
"Finding the top " << n_return <<
" stubs." << std::endl;
432 if( n_return < 1 ) n_return = 1;
434 for ( Hotspots::const_iterator stub_iter = ss_iter->second.begin(); stub_iter != ss_iter->second.end(); ++stub_iter )
436 if( i <= n_return ) {
437 new_set->add_stub_( stub_iter->second );
443 else if ( scorecut <= 0 )
445 for ( Hotspots::const_iterator stub_iter = ss_iter->second.begin(); stub_iter != ss_iter->second.upper_bound( scorecut ) ; ++stub_iter ) {
447 new_set->add_stub_( stub_iter->second );
452 TR <<
"Found " << new_set->size() <<
" stubs better than " << scorecut << std::endl;
461 for( Hs_map::const_iterator hs_map_it=
stub_set_.begin(); hs_map_it!=
stub_set_.end(); ++hs_map_it ) {
463 for( Hotspots::const_iterator hs_it=hs_map_it->second.begin(); hs_it!=hs_map_it->second.end(); ++hs_it ){
464 if( min_energy > hs_it->first ) {
465 min_energy = hs_it->first;
470 runtime_assert( ret );
477 using namespace core::conformation;
482 for( Hs_map::const_iterator map_it=
stub_set_.begin(); map_it!=
stub_set_.end(); ++map_it ){
484 for( Hotspots::const_iterator stub_it=map_it->second.begin(); stub_it!=map_it->second.end(); ++stub_it ){
488 if(
distance <= nearest_distance ) {
490 nearest_stub = stub_it->second;
494 runtime_assert( nearest_stub );
495 return( nearest_stub );
498 std::set< std::pair< std::string, core::Real > >
500 using namespace core::conformation;
502 Residue const stub_rsd( *stub->residue() );
504 std::set< std::pair< std::string, core::Real > > stub_subset;
508 for( Hs_map::const_iterator hs_map_it=
stub_set_.begin(); hs_map_it!=
stub_set_.end(); ++hs_map_it ) {
510 for( Hotspots::const_iterator hs_it=hs_map_it->second.begin(); hs_it!=hs_map_it->second.end(); ++hs_it ){
511 Residue const potential_neighbor( *(hs_it->second->residue()) );
512 for( Atoms::const_iterator stub_atom_it=stub_rsd.atom_begin(); stub_atom_it!=stub_rsd.atom_end(); ++stub_atom_it ) {
513 for( Atoms::const_iterator pot_neigh_it=potential_neighbor.
atom_begin(); pot_neigh_it!=potential_neighbor.
atom_end(); ++pot_neigh_it ) {
514 core::Real const dist( stub_atom_it->xyz().distance( pot_neigh_it->xyz() ) );
515 if( dist <= dist_threshold ){
516 stub_subset.insert( std::make_pair( hs_map_it->first, hs_it->first ) );
523 return( stub_subset );
530 Hs_map::const_iterator hs_it(
stub_set_.find( residue_name3 ) );
531 return( hs_it->second.find( score )->second );
538 typedef std::pair< std::string, Hotspots > & HsMultimapDatum;
540 Hotspots::iterator it( datum->second.begin() );
541 for( ; it!= datum->second.end(); ++it )
542 if( it->second == stub )
break;
543 if( it != datum->second.end() ){
544 datum->second.erase( it );
549 TR.Warning<<
"WARNING: Stub "<<stub<<
" not found in remove stub"<<std::endl;
556 for( std::set< std::pair< std::string, core::Real > >::
const_iterator stub_it=stubs.begin(); stub_it!=stubs.end(); ++stub_it ){
557 Hs_map::iterator hs_it(
stub_set_.find( stub_it->first ) );
558 hs_it->second.erase(
get_stub( stub_it->first, stub_it->second ) );
568 std::string const resname = stub->residue()->name3();
569 Hs_map::iterator ss_iter;
573 stub_set_.insert( std::make_pair( resname, empty_set ) );
576 (ss_iter->second).
insert( std::make_pair(stub->bonus_value(),
new HotspotStub( *stub ) ) );
582 basic::options::option[ basic::options::OptionKeys::run::preserve_header ].value(
true);
595 for( std::vector< core::pose::RemarkInfo >::const_iterator remark_it = remarks.begin(); remark_it != remarks.end(); ++remark_it)
598 if ( remark_it->num == 221 )
600 score = std::atof( remark_it->value.c_str() );
601 if( score >= -0.0001 )
602 TR<<
"****WARNING WARNING**** stub score has zero or higher weight. Reading nonetheless."<<std::endl;
617 TR <<
"Read " <<
size() <<
" stubs from " << filename << std::endl;
622 if( num_to_remove <= 0 )
return;
623 if( num_to_remove >= (
int )
size() ){
624 TR<<
"ERROR: Trying to remove "<< num_to_remove<<
" stubs from a set containing "<<
size()<<
" stubs."<<std::endl;
628 std::vector< core::Size > to_remove;
630 to_remove.push_back( i );
633 numeric::random::random_permutation(to_remove.begin(), to_remove.end(),
numeric::random::RG);
635 std::vector< HotspotStubOP > stubs_to_remove;
636 for(
int i = 1; i <= num_to_remove; ++i )
637 stubs_to_remove.push_back(
stub_set_vec_[ i ].second.second );
642 TR<<
"Removed stubs from set. Current number "<<
size()<<std::endl;
648 amino_acids.push_back(
"ALA" );
649 amino_acids.push_back(
"ARG" );
650 amino_acids.push_back(
"ASN" );
651 amino_acids.push_back(
"ASP" );
652 amino_acids.push_back(
"GLU" );
653 amino_acids.push_back(
"GLN" );
654 amino_acids.push_back(
"HIS" );
655 amino_acids.push_back(
"ILE" );
656 amino_acids.push_back(
"LEU" );
657 amino_acids.push_back(
"LYS" );
658 amino_acids.push_back(
"MET" );
659 amino_acids.push_back(
"PHE" );
660 amino_acids.push_back(
"SER" );
661 amino_acids.push_back(
"THR" );
662 amino_acids.push_back(
"TRP" );
663 amino_acids.push_back(
"TYR" );
664 amino_acids.push_back(
"VAL" );
666 fill( pose, scorefxn, *it, n_stubs );
678 autofill( pose, scorefxn, n_stubs );
682 utility_exit_with_message(
"Unable to find target residue, or distance less than zero!\n");
697 fill( pose, scorefxn_in, residue_name3, n_stubs );
701 utility_exit_with_message(
"Unable to find target residue, or distance less than zero!\n");
728 for (
Size i = 1; i <= n_stubs; ++i ) {
731 std::stringstream index;
739 pose = reference_pose;
744 TR.Debug <<
"old fold tree: " << pose.
fold_tree() << std::endl;
748 TR.Debug <<
"Hotspot fold tree: " << pose.
fold_tree() << std::endl;
759 innerdock->set_reporting(
false );
760 innerdock->set_no_filters(
true );
763 dock->set_input_pose( nonconstpose );
764 dock->set_native_pose( nonconstpose );
773 slide_together.
apply( pose );
783 slide_together.
apply( pose );
795 TR <<
". Reject." << std::endl;
813 TR <<
". Reject." << std::endl;
820 if( basic::options::option[ basic::options::OptionKeys::hotspot::angle ].user() ) {
822 core::Real const threshold = basic::options::option[ basic::options::OptionKeys::hotspot::angle ].value();
823 runtime_assert( threshold > 0 );
825 core::Size const angle_res = basic::options::option[ basic::options::OptionKeys::hotspot::angle_res ].value();
828 TR <<
" Stub-target angle: " << angle <<
"o";
829 if( angle > threshold ) {
830 TR <<
". Reject." << std::endl;
837 TR <<
"Stub score: " << score;
843 TR <<
". Accept." << std::endl;
848 TR <<
". Reject." << std::endl;
864 using namespace core;
866 TR <<
"Rescoring hotspots...\n";
867 TR <<
"Original Rescored\n";
869 for ( Hotspots::const_iterator stub_it = it->second.begin(); stub_it != it->second.end(); ++stub_it ) {
878 if ( new_set->sc_only() ) {
882 TR << stub_it->first <<
" " << score <<
"\n";
884 new_set->add_stub_( stub );
893 utility::io::ozstream outstream;
894 outstream.open( filename.c_str(), std::ios::app );
899 for ( Hotspots::const_iterator stub_it = it->second.begin(); stub_it != it->second.end(); ++stub_it ) {
900 tag =
"S_" + stub_it->second->residue()->name3() +
"_" + lead_zero_string_of( i, 9 );
901 write_stub( outstream, stub_it->second, tag );
906 TR <<
"Wrote " << i <<
" stubs to " << filename << std::endl;
913 Size atom_number = 10000;
915 outstream <<
"MODEL " << tag <<
"\n";
916 outstream <<
"REMARK 221 " << stub->bonus_value() <<
" \n";
918 outstream <<
"TER\n";
919 outstream <<
"ENDMDL\n";
931 std::vector< StubStatus > temp_status( chain_end-chain_beg+1,
unchecked );
935 for( Hotspots::iterator stub_it = set_it->second.begin(); stub_it != set_it->second.end(); ++stub_it ) {
942 TR <<
"Associated stubs with scaffold chain " << partner << std::endl;
951 n_stubs += it->second.size();
960 if( resname !=
"ALL" )
963 n_stubs = stubs.size();
977 Hs_map::iterator stubset_it;
979 std::multimap<core::Real,HotspotStubOP >::iterator hs_it;
980 hs_it = stubset_it->second.begin();
981 for( hs_it = stubset_it->second.begin(); hs_it!=stubset_it->second.end(); ++hs_it ){
982 stub_set_vec_.push_back( std::make_pair( stubset_it->first, std::make_pair( hs_it->first, hs_it->second ) ));
993 runtime_assert( random_element <= stubset_size );
995 Hs_map::iterator stubset_it;
998 if( stub_number < access_point )
999 access_point -= stub_number;
1003 std::multimap<core::Real,HotspotStubOP >::iterator hs_it;
1004 runtime_assert( access_point <= stubset_it->second.size() );
1005 runtime_assert( access_point > 0 );
1006 hs_it = stubset_it->second.begin();
1007 for(
core::Size i=1; i < access_point; ++i, ++hs_it ) {}
1015 std::multimap<core::Real,HotspotStubOP > stubs =
retrieve( resname );
1016 core::Size const subset_size( stubs.size() );
1019 runtime_assert( random_element <= subset_size );
1020 std::multimap<core::Real,HotspotStubOP>::iterator hs_it;
1021 hs_it = stubs.begin();
1022 for(
core::Size i=1; i < random_element; ++i, ++hs_it ) {}
1038 sheet_phipsi.push_back( -150.0 );
1039 sheet_phipsi.push_back( 150.0 );
1040 sheet_phipsi.push_back( 180.0 );
1042 helix_phipsi.push_back( -64.0 );
1043 helix_phipsi.push_back( -41.0 );
1044 helix_phipsi.push_back( 180.0 );
1046 residue->mainchain_torsions( helix_phipsi );
1075 TR.Debug <<
"i phi/psi/omega " << i <<
" " << pose.
phi(i) <<
" " << pose.
psi(i) <<
" " << pose.
omega(i) << std::endl;
1079 TR.Debug <<
"after i phi/psi/omega " << i <<
" " << pose.
phi(i) <<
" " << pose.
psi(i) <<
" " << pose.
omega(i) << std::endl;
1092 trans_mover.apply( pose );
1098 packer_task->nonconst_residue_task( ii ).prevent_repacking();
1105 packer_task->nonconst_residue_task( i ).restrict_absent_canonical_aas( restrict_to_aa );
1110 packrotamersmover.
apply( pose );
1118 runtime_assert( cutpoint );
1124 TR.Debug <<
"cutpoint: " << cutpoint << std::endl;
1129 TR.Debug <<
"jump1: " << jump_pos1 << std::endl;
1132 TR.Debug <<
"jump2: " << jump_pos2 << std::endl;
1134 runtime_assert( jump_pos1 );
1135 runtime_assert( jump_pos2 );
1141 f.check_fold_tree();
1142 runtime_assert( f.check_fold_tree() );
1175 (*scorefxn)(copy_pose);
1189 bool const apply_self_energies,
1191 bool const apply_ambiguous_constraints
1207 worst_allowed_stub_bonus,
1208 apply_self_energies,
1210 apply_ambiguous_constraints );
1222 bool const apply_self_energies,
1224 bool const apply_ambiguous_constraints
1231 runtime_assert( CB_force_constant > -1
E-6 );
1232 runtime_assert( worst_allowed_stub_bonus < 1
E-6 );
1233 runtime_assert( bump_cutoff > -1
E-6 );
1241 bump_scorefxn->reset();
1257 noenvhbond_scorefxn->set_energy_method_options( options );
1264 (*full_scorefxn)(unbound_pose);
1272 task->initialize_from_command_line().or_include_current(
true );
1274 if( packer_task->pack_residue(i) )
1275 task->nonconst_residue_task(i).restrict_absent_canonical_aas( allowed_aas );
1277 task->nonconst_residue_task(i).prevent_repacking();
1279 if( basic::options::option[basic::options::OptionKeys::packing::resfile].user() ) {
1283 (*full_scorefxn)( ala_pose );
1292 if (packer_task->pack_residue(resnum) ) {
1293 hotspot_stub_set->pair_with_scaffold( pose, pose.
chain( resnum ), true_filter );
1298 TR <<
"Making hotspot constraints..." << std::endl;
1303 if ( ! packer_task->pack_residue(resnum) )
continue;
1311 std::list< core::chemical::ResidueTypeCOP > allowed_aas = packer_task->residue_task( resnum ).allowed_residue_types();
1312 for (std::list< core::chemical::ResidueTypeCOP >::const_iterator restype = allowed_aas.begin();
1313 restype != allowed_aas.end(); ++restype) {
1316 Hotspots res_stub_set( hotspot_stub_set->retrieve( (*restype )->name3() ) );
1317 for (std::multimap<core::Real,HotspotStubOP >::iterator hs_stub = res_stub_set.begin();
1318 hs_stub != res_stub_set.end(); ++hs_stub) {
1322 TR <<
"ERROR - Gly/Pro stubs cannot be used for constraints." << std::endl;
1328 TR.Debug <<
"ERROR - Position " << resnum <<
" is currently Gly/Pro and cannot be used for stub constraints." << std::endl;
1332 core::Real stub_bonus_value = hs_stub->second->bonus_value();
1343 if ( bump_energy > bump_cutoff ) {
1345 stub_bonus_value = worst_allowed_stub_bonus + 0.1;
1348 }
else if ( apply_self_energies ) {
1351 stub_bonus_value +=
evaluate_stub_self_energy_( placed_stub_res, unbound_pose, resnum, unbound_neighbor_graph, full_scorefxn );
1352 TR.Debug << resnum <<
" InitBonus " << hs_stub->second->bonus_value() <<
" SelfEBonus " << stub_bonus_value << std::endl;
1354 if ( stub_bonus_value < worst_allowed_stub_bonus ) {
1361 if ( apply_ambiguous_constraints ) {
1376 if ( ( apply_ambiguous_constraints ) && ( ambig_csts.size() > 0 ) )
1380 TR <<
"Applied " <<
constraints_.size() <<
" hotspot constraints to the pose." << std::endl;
1389 return( return_val );
1411 iter != iter_end; ++iter ) {
1412 Size const neighbor_resnum( (*iter)->get_other_ind( resnum ) );
1414 bump_scorefxn->bump_check_backbone( placed_stub_residue, unbound_pose.
residue(neighbor_resnum), unbound_pose, emap );
1416 if ( bump_energy > max_bump_energy )
break;
1433 TR.Debug << resnum <<
" InitStubSelfE " << self_energy <<
" ";
1439 full_scorefxn->eval_ci_1b( placed_stub_residue, unbound_pose, emap );
1440 self_energy += weights.
dot( emap );
1441 TR.Debug << self_energy <<
" ";
1446 iter != iter_end; ++iter ) {
1447 Size const neighbor_resnum( (*iter)->get_other_ind( resnum ) );
1453 full_scorefxn->eval_ci_2b_bb_sc( unbound_pose.
residue(neighbor_resnum), placed_stub_residue, unbound_pose, emap_2b );
1454 full_scorefxn->eval_cd_2b_bb_sc( unbound_pose.residue(neighbor_resnum), placed_stub_residue, unbound_pose, emap_2b );
1456 full_scorefxn->eval_ci_2b_sc_sc( unbound_pose.residue(neighbor_resnum), placed_stub_residue, unbound_pose, emap_2b );
1457 full_scorefxn->eval_cd_2b_sc_sc( unbound_pose.residue(neighbor_resnum), placed_stub_residue, unbound_pose, emap_2b );
1458 self_energy += weights.
dot( emap_2b );
1459 TR.Debug << self_energy <<
" ";
1461 TR.Debug << std::endl;
1475 if( basic::options::option[basic::options::OptionKeys::packing::resfile].user() )
1496 if ( residue_sasa.at(ii) > sasa_thres ) {
1497 allow_stub_constraint.at(ii) =
true;
1501 hotspot_hash_packer_taskOP->restrict_to_residues( allow_stub_constraint );
1503 return hotspot_hash_packer_taskOP;
1508 Size const rb_jump = 1;
1512 trans_mover.
apply( pose );
1522 using namespace core::scoring::constraints;
1526 for( ConstraintCOPs::const_iterator it = original_csts.begin(),
end = original_csts.end(); it !=
end; ++it ) {
1528 if( cst->type() ==
"AmbiguousConstraint" ) {
1530 if( ambiguous_cst) {
1531 if( ambiguous_cst->active_constraint()->type() ==
"BackboneStub" ) {
1532 bb_csts.push_back( ambiguous_cst() );
1537 else if( cst->type() ==
"BackboneStub" )
1538 bb_csts.push_back( cst );
1558 if( angle_res == 0 ) {
1562 core::Size const CA_stub_index = stub->atom_index(
"CA");
1563 core::Size const CB_stub_index = stub->atom_index(
"CB");
1567 core::Vector const CA_CB = stub->xyz( CA_stub_index ) - stub->xyz( CB_stub_index );
1568 TR.Debug <<
"CA-target " << CA_tgt.length() <<
"\n";
1569 TR.Debug <<
"CA-CB " << CA_CB.length() <<
"\n";
1570 core::Real const angle = numeric::conversions::degrees(angle_of( CA_tgt, CA_CB ));
1571 TR.Debug <<
"target-CA-CB angle " << angle;