14 #ifndef INCLUDED_protocols_frag_picker_FragmentCandidate_hh
15 #define INCLUDED_protocols_frag_picker_FragmentCandidate_hh
27 #include <utility/pointer/ReferenceCount.hh>
30 #include <utility/vector1.hh>
31 #include <ObjexxFCL/format.hh>
35 namespace frag_picker {
38 using namespace core::fragment;
40 using ObjexxFCL::fmt::F;
41 using ObjexxFCL::fmt::I;
57 assert(queryPosition>0);
58 assert(inChunkPosition>0);
59 queryResidueIndex_ = queryPosition;
60 vallResidueIndex_ = inChunkPosition;
61 fragmentLength_ = fragmentLength;
75 runtime_assert( chunk_ );
76 runtime_assert( whichOne >= 1 && whichOne <= fragmentLength_ );
77 return chunk_->at(whichOne + vallResidueIndex_ - 1);
82 inline std::string sequence() {
return chunk_->get_sequence().substr(vallResidueIndex_-1, fragmentLength_); }
86 return chunk_->at(vallResidueIndex_)->key();
91 return chunk_->get_pdb_id();
96 return chunk_->get_chain_id();
101 return queryResidueIndex_;
106 return vallResidueIndex_;
112 return ( fragmentLength_/2 + 1) + ( vallResidueIndex_ ) - 1;
118 return ( fragmentLength_/2 + 1) + ( queryResidueIndex_ ) - 1;
123 return get_residue( fragmentLength_/2 + 1);
129 return get_residue( fragmentLength_/2 + 1 )->ss();
134 return fragmentLength_;
142 for (
Size i = 1; i <= fragmentLength_; ++i) {
143 fragdata->add_residue(
144 chunk_->at(i + vallResidueIndex_ - 1)->bbtorsion_srfd());
147 if (fragdata->size() > 0)
148 fragdata->set_valid();
157 void print_fragment_seq(std::ostream& out);
163 if(pool_name_!=NULL)
delete pool_name_;
168 if(pool_name_==NULL)
return unknown_pool_name_;
169 else return *pool_name_;
193 out <<
pair.first->get_pdb_id() <<
" "
194 <<
pair.first->get_first_index_in_vall() <<
" : "
195 <<
pair.first->get_first_index_in_query() <<
" :";
197 for (
Size i = 1; i <= c.size(); i++)
198 out <<
" " << c.at(i);