31 #include <utility/string_util.hh>
34 #include <utility/vector1.hh>
39 namespace match_enzdes_util {
44 ) : enzcst_io_(enzcst_io)
47 for(
core::Size i = 1; i <= num_cst_blocks; ++i){
53 : ReferenceCount( other ), enzcst_io_(other.enzcst_io_)
82 std::cerr <<
"param_cache_.size:" <<
param_cache_.size() <<
" cst_block:" << cst_block << std::endl;
83 std::cerr <<
"cst_block should be smaller or equal to param_cache_.size()" << std::endl;
103 if( this->
param_cache( ii )->contains_position( seqpos ) )
return true;
112 using namespace core;
118 for(std::map< Size, EnzCstTemplateResAtomsOP >::const_iterator resA_it =
param_cache_[i]->template_res_cache( 1 )->seqpos_map_begin(), resA_end =
param_cache_[i]->template_res_cache( 1 )->seqpos_map_end(); resA_it != resA_end; ++resA_it ){
120 if( find( found_lig_positions.begin(), found_lig_positions.end(), resA_it->first ) == found_lig_positions.end() ) {
121 found_lig_positions.push_back( resA_it->first );
124 else found_protein_positions.push_back( resA_it->first );
127 for(std::map< Size, EnzCstTemplateResAtomsOP >::const_iterator resB_it =
param_cache_[i]->template_res_cache( 2 )->seqpos_map_begin(), resB_end =
param_cache_[i]->template_res_cache( 2 )->seqpos_map_end(); resB_it != resB_end; ++resB_it ){
129 if( find( found_lig_positions.begin(), found_lig_positions.end(), resB_it->first ) == found_lig_positions.end() ) {
130 found_lig_positions.push_back( resB_it->first );
133 else found_protein_positions.push_back( resB_it->first );
138 found_protein_positions.push_back( *lig_it );
140 return found_protein_positions;
148 (*param_it)->remap_resid( smap );
164 : ReferenceCount( other ),
165 active_pose_constraints_( other.active_pose_constraints_ ),
166 covalent_connections_(other.covalent_connections_ )
195 if( (*template_res_it)->not_in_pose() )
return true;
205 if( (*template_res_it)->remove_seqpos( seqpos ) ) find_count++;
208 if( find_count > 1 ){
209 utility_exit_with_message(
"Error: Several template residues were apparently at pose position "+utility::to_string(seqpos )+
". This shouldn't happen...\n");
212 if( find_count == 0 ){
213 utility_exit_with_message(
"Error: No template residues were found at pose position "+utility::to_string(seqpos )+
". Something's unclean somewhere...\n");
223 if( (*template_res_it)->not_in_pose() ){
224 (*template_res_it)->set_position_in_pose( seqpos );
228 if( find_count > 1 ) utility_exit_with_message(
"Error: Several template residues are missing in the pose. This shouldn't happen...\n");
229 if( find_count == 0 ) utility_exit_with_message(
"Error: no template residue is missing in the pose, this shouldn't have happened... \n");
237 if( (*template_res_it)->contains_position( seqpos ) )
return true;
252 (*template_res_it)->remap_resid( smap );
258 *cst_it = (*cst_it)->remap_resid( smap );
259 if( ! (*cst_it) ) utility_exit_with_message(
"Remapping of catalytic constraints failed");
265 newcov->remap_resid( smap );
273 not_in_pose_(true), pose_data_uptodate_(false)
279 ReferenceCount( other ),
280 not_in_pose_(other.not_in_pose_),
281 pose_data_uptodate_(other.pose_data_uptodate_)
284 for( SeqposTemplateAtomsMap::const_iterator map_it(other.
seqpos_map_.begin()), map_end(other.
seqpos_map_.end()); map_it != map_end; ++map_it ){
322 for( SeqposTemplateAtomsMap::const_iterator map_it(
seqpos_map_.begin()), map_end(
seqpos_map_.end()); map_it != map_end; ++map_it ){
323 temp_vec.push_back( *map_it );
327 for(
utility::vector1< std::pair< Size, EnzCstTemplateResAtomsOP > >::iterator vec_it = temp_vec.begin(), vec_end = temp_vec.end(); vec_it != vec_end; ++vec_it ){
328 vec_it->second->remap_resid( smap );
330 if( newpos == 0 ) utility_exit_with_message(
"A catalytic residue is apparently missing from the pose");
331 seqpos_map_.insert( std::pair< Size, EnzCstTemplateResAtomsOP >( newpos, vec_it->second ) );