16 #include <utility/exit.hh>
22 #include <utility/tag/Tag.hh>
27 #include <basic/Tracer.hh>
36 #include <utility/vector0.hh>
37 #include <utility/excn/Exceptions.hh>
38 #include <utility/vector1.hh>
41 using namespace core::scoring;
43 static basic::Tracer
TR(
"protocols.protein_interface_design.parse_filters" );
46 namespace protein_interface_design {
47 using namespace protocols::filters;
49 using namespace protocols::moves;
51 using namespace utility::tag;
57 residues_in_interface_threshold_ = tag->getOption<
core::Size>(
"residues", 20 );
58 rb_jump_ = tag->getOption<
core::Size>(
"jump_number", 1 );
60 TR<<
"residues in interface filter over jump number " << rb_jump_ <<
" with threshold "<<residues_in_interface_threshold_<<std::endl;
66 using namespace core::scoring;
68 std::string const scorefxn_name( tag->getOption<
string>(
"scorefxn",
"score12" ) );
71 if( ! tag->hasOption(
"threshold" ) )
throw utility::excn::EXCN_RosettaScriptsOption(
"Must specify 'threshold' for ScoreTypeFilter.");
72 score_type_threshold_ = tag->getOption<
core::Real>(
"threshold" );
74 TR<<
"ScoreType filter for score_type "<<score_type_<<
" with threshold "<<score_type_threshold_<<std::endl;
80 lower_threshold_ = tag->getOption<
core::Real>(
"threshold", 800 );
81 jump( tag->getOption<
core::Size >(
"jump", 1 ));
82 hydrophobic_ = tag->getOption<
bool>(
"hydrophobic", false );
83 polar_ = tag->getOption<
bool>(
"polar", false );
84 runtime_assert( !hydrophobic_ || !polar_ );
85 if( jump() != 1 && ( polar_ || hydrophobic_ ) )
86 throw utility::excn::EXCN_RosettaScriptsOption(
"ERROR: presently, only total sasa is supported across a jump other than 1. Remove polar and hydrophobic flags and try again." );
88 TR<<
"SasaFilter with lower threshold of "<<lower_threshold_<<
" Ang^2 and jump "<<jump()<<
'\n';
90 TR<<
"Only reporting hydrophobic sasa\n";
92 TR<<
"Only reporting polar sasa\n";
99 distance_threshold_ = tag->getOption<
core::Real>(
"interface_distance_cutoff", 8.0 );
100 chain1_ = tag->getOption<
bool >(
"partner1", 0 );
101 chain2_ = tag->getOption<
bool >(
"partner2", 1 );
102 jump_ = tag->getOption<
Size >(
"jump", 1 );
103 runtime_assert( chain1_ || chain2_ );
104 std::string const scorefxn_name( tag->getOption<
string >(
"scorefxn",
"score12" ));
105 repeats_ = tag->getOption<
core::Size >(
"repeats", 1 );
106 symmetry_ = tag->getOption<
bool >(
"symmetry", 0 );
107 repack( tag->getOption<
bool >(
"repack", 1 ) );
110 using namespace core::scoring::symmetry;
112 TR<<
"Symmetric AlaScan with distance threshold of "<<distance_threshold_<<
" Ang "<<
". jump="<<jump_<<
" partner1="<<chain1_<<
", partner2="<<chain2_<<
" using "<<repeats_<<
" repeats."<<std::endl;
115 using namespace core::scoring;
117 TR<<
"AlaScan with distance threshold of "<<distance_threshold_<<
" Ang "<<
". jump="<<jump_<<
" partner1="<<chain1_<<
", partner2="<<chain2_<<
" using "<<repeats_<<
" repeats repack "<<repack()<<std::endl;
126 TagPtr const nt_tag_ptr = *nt_it;
127 if( nt_tag_ptr->getName() ==
"Neighbor" ) {
128 std::string const type( nt_tag_ptr->getOption<
string>(
"type" ) );
133 distance_threshold_ = tag->getOption<
core::Real>(
"distance", 8.0 );
135 TR<<
"NeighborTypeFilter with distance threshold of "<<distance_threshold_<<
" around residue "<<target_residue_<<std::endl;
142 distance_threshold_ = tag->getOption<
core::Real>(
"distance", 8.0 );
143 neighbors_ = tag->getOption<
core::Size>(
"neighbors", 1 );
145 TR<<
"ResidueBurialFilter with distance threshold of "<<distance_threshold_<<
" around residue "<<target_residue_<<
" with "<<neighbors_<<
" neighbors."<<std::endl;
153 distance_threshold_ = tag->getOption<
core::Real>(
"distance", 8.0 );
155 TR<<
"ResidueDistanceFilter with distance threshold of "<<distance_threshold_<<
" between residues "<<res1_<<
" and "<<res2_<<std::endl;
161 using namespace core::scoring;
163 std::string const scorefxn_name( tag->getOption<
string>(
"scorefxn",
"score12" ) );
165 ddg_threshold_ = tag->getOption<
core::Real>(
"threshold", -15 );
166 rb_jump_ = tag->getOption<
core::Size >(
"jump", 1 );
167 repeats( tag->getOption<
core::Size >(
"repeats", 1 ) );
168 repack( tag->getOption<
bool >(
"repack", 1 ) );
169 symmetry_ = tag->getOption<
bool>(
"symmetry", 0 );
171 if( repeats() > 1 && !repack() )
172 throw utility::excn::EXCN_RosettaScriptsOption(
"ERROR: it doesn't make sense to have repeats if repack is false, since the values converge very well." );
175 TR<<
"ddg filter with threshold "<< ddg_threshold_<<
" repeats="<<repeats()<<
" and scorefxn "<<scorefxn_name<<
" with symmetry " <<std::endl;
177 TR<<
"ddg filter with threshold "<< ddg_threshold_<<
" repeats="<<repeats()<<
" and scorefxn "<<scorefxn_name<<
" over jump "<<rb_jump_<<
" and repack "<<repack()<<std::endl;
183 partners_ = tag->getOption<
core::Size>(
"partners" );
184 energy_cutoff_ = tag->getOption<
core::Real>(
"energy_cutoff", -0.5 );
185 backbone_ = tag->getOption<
bool>(
"backbone", 0 );
186 sidechain_ = tag->getOption<
bool>(
"sidechain", 1 );
189 TR<<
"Hbonds to residue filter for resnum "<<resnum_<<
" with "<<partners_<<
" hbonding partners"<<std::endl;
195 using namespace core::scoring;
197 std::string const scorefxn_name( tag->getOption<
string>(
"scorefxn",
"score12" ) );
200 threshold_ = tag->getOption<
core::Real>(
"energy_cutoff", 0.0 );
201 whole_interface_ = tag->getOption<
bool>(
"whole_interface" , 0 );
202 rb_jump_ = tag->getOption<
core::Size>(
"jump_number", 1 );
203 interface_distance_cutoff_ = tag->getOption<
core::Real>(
"interface_distance_cutoff" , 8.0 );
205 if (whole_interface_==1 ) {
207 TR<<
"energies for all interface residues with a distance cutoff of "
208 << interface_distance_cutoff_ <<
" A will be calculated \n"
209 <<
"jump_number is set to "<< rb_jump_
210 <<
"\n and scorefxn " <<scorefxn_name <<
" will be used" <<std::endl;
214 TR<<
"EnergyPerResidueFilter for residue "<<resnum_<<
" of score_type "<<score_type_<<
" with cutoff "<<threshold_<<std::endl;
221 jump_num_ = tag->getOption<
core::Size>(
"jump_number", 1 );
222 upper_threshold_ = tag->getOption<
core::Size>(
"cutoff", 20 );
224 TR<<
"Buried Unsatisfied Hbond filter over jump number " << jump_num_ <<
" with cutoff " << upper_threshold_ << std::endl;
230 jump_num_ = tag->getOption<
core::Size>(
"jump_number", 1 );
231 distance_ = tag->getOption<
core::Size>(
"distance", 5 );
233 TR<<
"Distance From Terminus filter over jump number " << jump_num_ <<
" with cutoff " << distance_ << std::endl;