29 #include <basic/Tracer.hh>
32 #include <utility/string_util.hh>
36 namespace match_enzdes_util {
38 static basic::Tracer
tr(
"protocols.toolbox.match_enzdes_util.InvrotTarget" );
56 std::list< core::conformation::ResidueCOP >
68 if(
next_nodes_.size() == 0 ) utility_exit_with_message(
"generate constraints function called on InvrotTraget that's not pointing to any next_nodes, something's wrong somewhere.");
74 if( this_child_cst) node_constraints.push_back( this_child_cst );
76 if( node_constraints.size() == 0 )
return NULL;
91 utility_exit_with_message(
"child class failed to properly implement 'generate_representative_target_res_for_geom_cst' method.");
95 for(
Size i =1; i <= enzcst_io->num_mcfi_lists(); ++i){
97 std::pair< Size, Size>
const & target_res( enzcst_io->target_downstream_res()[i] );
98 if( (target_res.first == 1 ) && (target_res.second == 1 ) ){
99 mcfi_to_build.push_back( i );
106 tr <<
"InvrotTarget could not initialize because node initialization for geom_cst " << mcfi_to_build[i] <<
" failed." << std::endl;
129 Size input_size( invrot_collectors.size() );
130 invrot_collectors.push_back(
new InvrotCollector( num_residue_lists ) );
133 invrot_collectors[ invrot_collectors.size() ]->set_invrots_for_listnum( 0,
all_target_res_,
this, 1 );
137 next_nodes_[i]->collect_all_inverse_rotamers( invrot_collectors );
141 Size output_size( invrot_collectors.size() );
142 for(
Size i = input_size + 1; i <= output_size; ++i ){
144 if( invrot_collectors[ i ]->invrots().size() != num_residue_lists ){
145 utility_exit_with_message(
"Tree definition "+utility::to_string( i )+
" does not contain the necessary "+utility::to_string( num_residue_lists )+
" residue lists.");
148 for(
Size j = 0; j < num_residue_lists; ++j){
149 if( invrot_collectors[i]->invrots()[j].
size() == 0 ) utility_exit_with_message(
"Tree definition "+utility::to_string( i )+
" does not contain rotamers for residue list "+utility::to_string( j )+
".");
174 std::list< core::conformation::ResidueCOP > all_targets;
185 for(
Size i =1; i <= num_geom_cst; ++i ) representative_res.push_back( (*this->all_target_res().begin()) );