19 #include <basic/options/option.hh>
42 #include <basic/options/keys/pose_metrics.OptionKeys.gen.hh>
45 #include <utility/string_util.hh>
46 #include <utility/tag/Tag.hh>
49 #include <basic/Tracer.hh>
51 static basic::Tracer
TR(
"protocols.simple_moves.ConsensusDesignMover" );
56 #include <utility/vector0.hh>
57 #include <utility/vector1.hh>
61 namespace simple_moves {
77 return "ConsensusDesignMover";
82 : ptask_(NULL), task_factory_(NULL),
83 sfxn_(NULL), invert_task_(false),
84 use_seqprof_constraints_(false), sasa_cutoff_(0.0),
85 seqprof_(NULL), ignore_pose_profile_length_mismatch_(false)
92 : ptask_(ptask), task_factory_(NULL),
93 sfxn_(sfxn), invert_task_(false),
94 use_seqprof_constraints_(false), sasa_cutoff_(0.0),
95 seqprof_(NULL), ignore_pose_profile_length_mismatch_(false)
138 packer.
apply( pose );
142 packer.
apply( pose );
146 if( !pose.
remove_constraints( seqprof_constraints ) ) utility_exit_with_message(
"Couldn't remove sequence profile constraints after ConsensusDesignMover packing step.");
166 if(
invert_task_) utility_exit_with_message(
"invert_task_ set to true even though no task or task_factory was passed in. something probably unclean somewhere.");
171 consensus_task->initialize_from_command_line();
174 seqprof_to.
apply( pose, *consensus_task );
194 bool this_residue_allowed(
invert_task_ ? !
ptask_->residue_task(i).being_packed() :
ptask_->residue_task(i).being_designed() );
196 if( use_sasa && (residue_sasa[i] <
sasa_cutoff_ ) ) this_residue_allowed =
false;
198 if( !this_residue_allowed ) consensus_task->nonconst_residue_task(i).restrict_to_repacking();
200 if( consensus_task->residue_task( i ).being_designed() ){
201 touched_residues = touched_residues + utility::to_string( i ) +
"+";
202 num_design_residues++;
207 TR << num_design_residues <<
"residues (out of a total of " << pose.
total_residue() <<
") for consensus design are " << touched_residues << std::endl;
209 return consensus_task;
229 return "ConsensusDesignMover";
236 if( tag->hasOption(
"invert_task") )
invert_task_ = tag->getOption<
bool >(
"invert_task",1);
237 if( tag->hasOption(
"use_seqprof_constraints") )
use_seqprof_constraints_ = tag->getOption<
bool >(
"use_seqprof_constraints",1);