28 #include <basic/options/option.hh>
29 #include <basic/options/keys/match.OptionKeys.gen.hh>
42 #include <basic/Tracer.hh>
44 #include <numeric/random/random.hh>
47 #include <utility/pointer/ReferenceCount.hh>
48 #include <utility/vector1.fwd.hh>
54 namespace match_enzdes_util {
56 static basic::Tracer
TR(
"protocols.toolbox.match_enzdes_util.AlignPoseToInvrotTreeMover" );
63 add_target_to_pose_(false), invrot_tree_(invrot_tree),
64 seqpos_(seqpos), all_invrots_( invrot_tree->collect_all_inverse_rotamers() )
76 return "AlignPoseToInvrotTreeMover";
96 runtime_assert(
invrot_tree_->num_target_states() == 1 );
100 Size picked_collector( numeric::random::random_range( 1,
all_invrots_.size() ) );
102 Size picked_rotamer( numeric::random::random_range(1,
all_invrots_[ picked_collector ]->invrots()[picked_geomcst].
size() ) );
110 std::list<core::conformation::ResidueCOP>::const_iterator list_it(
all_invrots_[ picked_collector ]->invrots()[picked_geomcst].begin() );
111 for(
Size i =1; i < picked_rotamer; ++i ) list_it++;
121 Size picked_seqpos(
seqpos_->seqpos_for_geomcst(picked_geomcst)[ numeric::random::random_range(1,
seqpos_->seqpos_for_geomcst(picked_geomcst).size() ) ] );
141 std::list<core::conformation::ResidueCOP>::const_iterator target_it(
all_invrots_[ picked_collector ]->invrots()[0].begin() );
144 first_target_seqpos++;
188 for(
core::Size i = 1; i <= enzcst_io->num_mcfi_lists(); ++i ){
189 std::map< std::string, utility::vector1< std::string > >
const &
190 alg_info( enzcst_io->mcfi_list( i )->mcfi( 1 )->algorithm_inputs() );
192 if( alg_info.find(
"invrot_tree") != alg_info.end() ){
195 std::istringstream infostr(
info[ line ] );
198 std::cout <<
"'" << first <<
"'" << std::endl;
199 if( first ==
"superpose" ){
200 found_geomcsts.push_back( i );
206 if( found_geomcsts.size() != 0 ){
208 TR <<
"Superposition of the pose allowed on invrot/seqpos pairs from the following constraint blocks: ";
219 Size const anchor_seqpos,
220 Size const first_target_seqpos )
const
223 using namespace core::kinematics;
225 new_fold_tree.
add_edge( anchor_seqpos, 1, Edge::PEPTIDE );
226 new_fold_tree.add_edge( anchor_seqpos, first_target_seqpos - 1, Edge::PEPTIDE );
228 for(
Size i =0; i < num_jumps_to_add; ++i ){
230 new_fold_tree.add_edge( anchor_seqpos, first_target_seqpos +i, i + 1 );
232 if( !new_fold_tree.check_fold_tree() ) {
233 utility_exit_with_message(
"Invalid fold tree after trying to set up around invrot anchor residue");
244 if( desired_restype_set_name != residue->residue_type_set().name() ){
246 temp_pose->append_residue_by_jump( *residue, (
Size) 0 );
248 residue = &(temp_pose->residue(1));