27 #include <utility/vector1.fwd.hh>
28 #include <utility/exit.hh>
29 #include <basic/Tracer.hh>
32 #include <basic/options/option.hh>
33 #include <basic/options/keys/matdes.OptionKeys.gen.hh>
40 #include <utility/tag/Tag.hh>
42 #include <utility/vector0.hh>
43 #include <utility/vector1.hh>
47 static basic::Tracer
tr(
"protocols.filters.ShapeComplementarityFilter");
50 namespace simple_filters {
54 Filter(
"ShapeComplementarity" ),
56 filtered_area_( 250 ),
69 Size const & jump_id,
Size const & quick,
Size const & verbose):
70 Filter(
"ShapeComplementarity" ),
71 filtered_sc_( filtered_sc ),
72 filtered_area_( filtered_area ),
84 filtered_sc_( rval.filtered_sc_ ),
85 filtered_area_( rval.filtered_area_ ),
86 jump_id_( rval.jump_id_ ),
87 quick_( rval.quick_ ),
88 verbose_( rval.verbose_ ),
89 residues1_( rval.residues1_ ),
90 residues2_( rval.residues2_ ),
91 sym_dof_name_( rval.sym_dof_name_ )
117 Real nsubs_scalefactor = 1.0;
139 int sym_aware_jump_id = 0;
143 tr <<
"Using jump_id " << sym_aware_jump_id <<
" to partition pose" << std::endl;
144 if(!
scc_.
Calc( pose, sym_aware_jump_id ))
148 nsubs_scalefactor = (
Real) subs.size() ;
151 ObjexxFCL::FArray1D_bool is_upstream ( pose.
total_residue(), false );
159 for (
Size j = 1; j <= nslidedofs; j++)
169 if (is_upstream(i)) nupstream++;
183 tr <<
"==================================================" << std::endl;
185 for(
int i = 0; i <= 2; i++) {
187 tr <<
"Molecule " << (i+1) <<
":" << std::endl;
189 tr <<
"Total/Average for both molecules:" << std::endl;
201 for(
int i = 0; i <= 2; i++) {
203 tr <<
"Molecule " << (i+1) <<
"->" << ((i+1)%2+1) <<
": " << std::endl;
205 tr <<
"Average for both molecules:" << std::endl;
215 tr <<
"Shape complementarity: " << r.
sc << std::endl;
216 tr <<
"Interface area: " << r.
area << std::endl;
217 if ( nsubs_scalefactor != 1) {
218 tr <<
"Area per monomer: " << ( (
core::Real) r.
area / nsubs_scalefactor ) << std::endl ;
220 tr <<
"Interface seperation: " << r.
distance << std::endl;
243 int_area /= (
Real) subs.size() ;
245 ObjexxFCL::FArray1D_bool is_upstream ( pose.
total_residue(), false );
257 if (is_upstream(i)) nupstream++;
262 job->add_string_real_pair(column_header, int_area );
283 tr <<
"Filter failed current < threshold sc: " << sc <<
" < " <<
filtered_sc_ << std::endl;
288 tr <<
"Filter failed current < threshold interface area: " << area <<
" < " <<
filtered_area_ << std::endl;
292 tr <<
"Successfully filtered: " << sc << std::endl;
308 quick_ = tag->getOption<
Size>(
"quick", false );
312 multicomp( tag->getOption<
bool >(
"multicomp", 0) );
314 if(tag->hasOption(
"residues1")) {
317 tr.Warning <<
"Failed to parse residue range: " << tag->getOption<
std::string> (
"residues1") <<
". Using default." << std::endl;
319 if(tag->hasOption(
"residues2")) {
322 tr.Warning <<
"Failed to parse residue range: " << tag->getOption<
std::string> (
"residues2") <<
". Using default." << std::endl;
325 tr.Info <<
"Structures with shape complementarity < " <<
filtered_sc_ <<
", interface area < " <<
326 filtered_area_ <<
" A^2 will be filtered." << std::endl;
329 tr.Info <<
"Calculating shape complementarity in quick mode with less accuracy." << std::endl;
331 tr.Info <<
"Using residues for molecule surface (rosetta numbering):" << std::endl;
332 tr.Info <<
" Surface 1: ";
335 tr.Info << std::endl;
336 tr.Info <<
" Surface 2: ";
339 tr.Info << std::endl;
342 tr.Warning <<
"Ignoring residue range selection since residues" << (
residues1_.empty() ? 1 : 2) <<
" is empty." << std::endl;
344 tr.Info <<
"Using Jump ID " << jump_id_ <<
" to define surfaces." << std::endl;
349 utility::lua::LuaObject
const & ,
350 utility::lua::LuaObject
const & ) {
353 verbose_ = def[
"verbose"] ? def[
"verbose"].to<
Size>() : 0;
354 quick_ = def[
"quick"] ? def[
"quick"].to<
Size>() : 0;
356 write_int_area_ = def[
"write_int_area"] ? def[
"write_int_area"].to<
bool>() :
false;
358 if(def[
"residues1"] ) {
359 for (utility::lua::LuaIterator i=def[
"residues1"].begin(),
end; i !=
end; ++i) {
363 tr.Warning <<
"Failed to parse residue1 range, using default." << std::endl;
365 if(def[
"residues2"] ) {
366 for (utility::lua::LuaIterator i=def[
"residues2"].begin(),
end; i !=
end; ++i) {
370 tr.Warning <<
"Failed to parse residue2 range, using default." << std::endl;
373 tr.Info <<
"Structures with shape complementarity < " <<
filtered_sc_ <<
", interface area < " <<
374 filtered_area_ <<
" A^2 will be filtered." << std::endl;
377 tr.Info <<
"Calculating shape complementarity in quick mode with less accuracy." << std::endl;
379 tr.Info <<
"Using residues for molecule surface (rosetta numbering):" << std::endl;
380 tr.Info <<
" Surface 1: ";
383 tr.Info << std::endl;
384 tr.Info <<
" Surface 2: ";
387 tr.Info << std::endl;
390 tr.Warning <<
"Ignoring residue range selection since residues" << (
residues1_.empty() ? 1 : 2) <<
" is empty." << std::endl;
392 tr.Info <<
"Using Jump ID " << jump_id_ <<
" to define surfaces." << std::endl;