40 #include <utility/excn/Exceptions.hh>
44 #include <basic/Tracer.hh>
45 #include <basic/options/option.hh>
46 #include <basic/options/keys/constraints.OptionKeys.gen.hh>
51 #include <utility/vector1.hh>
56 static basic::Tracer
tr(
"protocols.topo_broker",basic::t_info);
60 namespace topology_broker {
65 using namespace scoring::constraints;
67 filename_(
"NO_FILE"),
74 drop_random_rate_( 0.0 ),
75 skip_redundant_( false ),
76 skip_redundant_width_( 1 ),
77 filter_weight_( 0.0 ),
82 filename_( filename ),
89 drop_random_rate_( 0 ),
90 skip_redundant_( false ),
91 skip_redundant_width_( 1 ),
92 filter_weight_( 0.0 ),
100 bCentroid_( centroid ),
101 bFullatom_( fullatom ),
102 bCmdFlag_( CmdFlag ),
104 drop_random_rate_( 0 ),
105 skip_redundant_( false ),
106 skip_redundant_width_( 1 ),
107 filter_weight_( 0.0 ),
110 runtime_assert( CmdFlag );
117 using namespace basic::options;
118 using namespace basic::options::OptionKeys;
119 tr.Debug <<
"ConstraintClaimer::new_decoy: cst-modus: " << (
bFullatom_ ?
" fullatom " :
"no fullatom" )
120 << (
bCentroid_ ?
" centroid " :
" no centroid " )
122 if (
bCmdFlag_ && option[ constraints::combine ].user() ) {
126 if (
bCmdFlag_ && ( option[ constraints::skip_redundant ]() || option[ constraints::skip_redundant_width ].user() ) ) {
132 if (
bCmdFlag_ && option[ constraints::cst_file ].user() ) {
148 using namespace basic::options;
152 tr.Debug <<
"add constraints "<<
tag_ << std::endl;
155 <<
"\n will now remap them to a " << (fullatom ?
"fullatom" :
"centroid") <<
" pose" << std::endl;
159 std::string const file( option[ OptionKeys::constraints::combine_exclude_region ]() );
160 std::ifstream is( file.c_str() );
163 utility_exit_with_message(
"[ERROR] Error opening RBSeg file '" + file +
"'" );
175 tr.Info <<
" read constraints from " <<
filename_ <<
"\n for pose " << new_sequence <<
"..." << std::endl;
183 tr.Error <<
"[ERROR] failed attempt to add constraints to the "
184 << (fullatom ?
"fullatom" :
"centroid") <<
" pose" << std::endl;
185 tr.Error << excn << std::endl;
186 if (
tr.Debug.visible() ) {
187 pose.
dump_pdb(
"new_pose_failed_constraints.pdb");
191 tr.Error << std::endl;
192 tr.Error <<
" try to recover by reading in original constraints from " <<
filename_ <<
"\n for pose " << new_sequence <<
"..." << std::endl;
208 if (
tr.Trace.visible() ) {
215 if ( tag ==
"file" || tag ==
"FILE" || tag ==
"CST_FILE" ) {
217 }
else if ( tag ==
"NO_CENTROID" ) {
219 }
else if ( tag ==
"CENTROID" ) {
221 }
else if ( tag ==
"FULLATOM" ) {
223 }
else if ( tag ==
"SKIP_REDUNDANT" ) {
226 if ( !is.good() ) skip_redundant_width_ = 1;
227 }
else if ( tag ==
"CMD_FLAG" ) {
229 }
else if ( tag ==
"COMBINE_RATIO" ) {
231 }
else if ( tag ==
"DROP_RANDOM_RATE" ) {
233 }
else if ( tag ==
"FILTER_WEIGHT" ) {
235 }
else if ( tag ==
"FILTER_NAME" ) {