20 #include <basic/options/option.hh>
21 #include <basic/options/keys/in.OptionKeys.gen.hh>
22 #include <basic/Tracer.hh>
33 #include <utility/tag/Tag.hh>
34 #include <utility/vector1.hh>
36 #include <ObjexxFCL/format.hh>
37 #include <utility/vector0.hh>
40 static basic::Tracer
TR(
"protocols.toolbox.task_operations.RestrictNativeResiduesOperation");
44 namespace task_operations{
55 reference_pose_( NULL ),
57 prevent_repacking_( 0 )
146 if( total_residue_ref != total_residue )
147 utility_exit_with_message(
"Reference pose and current pose have a different number of residues" );
148 std::string select_non_native_resis(
"select non_native_resis, resi ");
150 for(
core::Size resi=1; resi<=total_residue; ++resi ) {
156 select_non_native_resis.append(ObjexxFCL::string_of(resi) +
"+");
161 if( designable_resis == 0 ) {
162 TR<<
"Warning: No designable residues identified in pose."<<std::endl;
164 TR<<designable_resis<<
" non-native, designable residues found in pose"<<std::endl;
167 TR<<select_non_native_resis<<std::endl;
174 verbose( tag->getOption<
bool >(
"verbose", 0 ) );
177 using namespace basic::options;
178 using namespace basic::options::OptionKeys;
181 if( option[ in::file::native ].user() ){
182 reference_pdb = option[ in::file::native ]();
183 }
else if ( tag->hasOption(
"pdbname") ) {
184 reference_pdb = tag->getOption<
std::string >(
"pdbname");
186 if ( reference_pdb !=
"" ) {
190 TR<<
"Using pdb "<<reference_pdb<<
" as reference.";
192 throw utility::excn::EXCN_RosettaScriptsOption(
"Native PDB not specified." );