30 #include <basic/options/keys/broker.OptionKeys.gen.hh>
80 #include <basic/Tracer.hh>
81 #include <basic/MemTracer.hh>
92 #include <utility/io/izstream.hh>
93 #include <utility/io/ozstream.hh>
94 #include <utility/file/FileName.hh>
95 #include <utility/file/file_sys_util.hh>
96 #include <numeric/random/random.hh>
97 #include <utility/DereferenceIterator.hh>
100 #include <basic/options/keys/abinitio.OptionKeys.gen.hh>
101 #include <basic/options/keys/constraints.OptionKeys.gen.hh>
102 #include <basic/options/keys/jumps.OptionKeys.gen.hh>
103 #include <basic/options/keys/in.OptionKeys.gen.hh>
104 #include <basic/options/keys/run.OptionKeys.gen.hh>
105 #include <basic/options/keys/cluster.OptionKeys.gen.hh>
106 #include <basic/options/keys/score.OptionKeys.gen.hh>
108 #include <boost/functional/hash.hpp>
118 #include <basic/options/option_macros.hh>
119 #include <numeric/random/random_permutation.hh>
124 #include <utility/vector0.hh>
125 #include <utility/vector1.hh>
127 static basic::Tracer
tr(
"protocols.iterative");
130 static numeric::random::RandomGenerator
RG(428342);
133 using namespace core;
134 using namespace basic;
135 using namespace basic::options;
136 using namespace basic::options::OptionKeys;
138 OPT_2GRP_KEY( File, iterative, enumerate, broker )
139 OPT_2GRP_KEY( Integer, iterative, enumerate, Naccept )
140 OPT_2GRP_KEY( Boolean, iterative, enumerate, skip_half )
152 OPT_1GRP_KEY( Real, iterative, min_core_fraction_to_score )
155 OPT_1GRP_KEY( Boolean, iterative, copy_pool_for_convergence_check )
161 OPT_1GRP_KEY( Real, iterative, cenpool_noesy_cst_weight )
163 OPT_1GRP_KEY( Real, iterative, cenpool_chemicalshift_weight )
164 OPT_1GRP_KEY( Real, iterative, centroid_before_quickrelax_weight )
165 OPT_1GRP_KEY( Real, iterative, fullatom_after_quickrelax_weight )
166 OPT_1GRP_KEY( Integer, iterative, limit_decoys_for_noe_assign )
168 OPT_1GRP_KEY( String, iterative, super_quick_relax_protocol )
169 OPT_1GRP_KEY( String, iterative, super_quick_relax_patch )
171 OPT_1GRP_KEY( String, iterative, initial_noe_auto_assign_csts )
172 OPT_1GRP_KEY( Integer, iterative, delay_noesy_reassign )
175 OPT_1GRP_KEY( String, iterative, initial_beta_topology )
176 OPT_1GRP_KEY( Integer, iterative, recompute_beta_Naccept )
178 OPT_1GRP_KEY( Boolean, iterative, force_topology_resampling )
179 OPT_2GRP_KEY( Boolean, iterative, normalize, sampling )
180 OPT_1GRP_KEY( Boolean, iterative, update_noesy_filter_cst )
181 OPT_1GRP_KEY( Boolean, iterative, never_update_noesy_filter_cst )
183 OPT_1GRP_KEY( Boolean, iterative, split_autoNOE_restraints )
184 OPT_1GRP_KEY( Real, iterative, randomize_elimination_candidates )
187 OPT_1GRP_KEY( FileVector, iterative, staged_auto_noe_flags )
199 OPT( in::file::silent );
200 OPT( cluster::limit_cluster_size );
201 OPT( cluster::limit_clusters );
202 OPT( cluster::limit_total_structures );
204 NEW_OPT( iterative::enumerate::Naccept,
"use enumerated pairings until Naccept decoys were added to archive", 5000 );
205 NEW_OPT( iterative::enumerate::broker,
"broker-file for enumerated_pairings",
"" );
206 NEW_OPT( iterative::enumerate::skip_half,
"run half of the batches without enumerated pairings -- even before Naccept is reached",
false );
208 NEW_OPT( iterative::accept_ratio,
"switch to new stage if accept_ratio is lower than", 0.2 );
209 NEW_OPT( iterative::rmsf_nstruct,
"how many structures of pool used for computations of cores", 30 );
210 NEW_OPT( iterative::cen_score,
"energy function for centroid pool",
"score3" );
211 NEW_OPT( iterative::cen_score_patch,
"patch of centroi_pool energy function",
"NOPATCH" );
212 NEW_OPT( iterative::fa_score,
"energy function for centroid pool",
"score12_full" );
213 NEW_OPT( iterative::fa_score_patch,
"patch of centroi_pool energy function",
"NOPATCH" );
214 NEW_OPT( iterative::max_nstruct,
"give maximum numbers of structures generated for a given stage before switch -- 0 for infinite, -1 for skip stage", 0);
216 NEW_OPT( iterative::mix_frags,
"mix frags with original fragset",
false );
217 NEW_OPT( iterative::perturb_resampling,
"perturb resample_stage2 start structures by this amount", 0.0 );
218 NEW_OPT( iterative::min_core_fraction_to_score,
"use core (2, 3, 4A) for discriminiation if more than X% of residues", 2.0);
219 NEW_OPT( iterative::min_diversity,
"don't accept structures that are closer than X to one of the pool", 1.5 );
220 NEW_OPT( iterative::copy_pool_for_convergence_check,
"make a copy of the pool for each batch that uses the convergence check",
true );
221 NEW_OPT( iterative::chainbreak_evaluator_weight,
"weight for selection in pool...", 1.0 );
223 NEW_OPT( iterative::safety_hatch_scorecut,
"in CEN2FULLATOM state use structures for innput that are below scorecut in individual batches", 0.1);
224 NEW_OPT( iterative::scored_ss_core,
"selecte structures based on score restricted to the selected residues based on secondary structure",
false );
225 NEW_OPT( iterative::force_scored_region,
"as scored_ss_core, but residues for scoring are provided manually",
"" );
227 NEW_OPT( iterative::cluster,
"cluster archive with min_diversity_limit before each batch creation",
false );
229 NEW_OPT( iterative::fix_core,
"RIGID file for RigidChunkClaimer to fix residues in stage 1-3",
"" );
231 NEW_OPT( iterative::cenpool_noesy_cst_weight,
"weight to apply to centroid pool for noesy-autoassigned constraints", 1);
232 NEW_OPT( iterative::cenpool_chemicalshift_weight,
"weight to apply to chemical shifts in centroid pool rescoring", 5 );
233 NEW_OPT( iterative::chemicalshift_column,
"column name of the ChemicalShiftEvaluator used for chemical shift rescoring -- allows to have inactive shifts in score",
"chem_shift" );
234 NEW_OPT( iterative::super_quick_relax_protocol,
"provide a sequence file for super quick relax ",
"none" );
235 NEW_OPT( iterative::super_quick_relax_patch,
"provide a patch file for use during super quick relax ",
"none" );
236 NEW_OPT( iterative::centroid_before_quickrelax_weight,
"add the centroid score of the decoy before it went into the <super_quick_relax> with this weight " , 1.0 );
237 NEW_OPT( iterative::fullatom_after_quickrelax_weight,
"add the centroid score of the decoy before it went into the <super_quick_relax> with this weight " , 0.0 );
238 NEW_OPT( iterative::limit_decoys_for_noe_assign,
"only use X first decoys for NOE assigment... ", 30 );
239 NEW_OPT( iterative::centroid_quickrelax,
"run a quick relax on centroid structures... ",
false );
242 NEW_OPT( iterative::delay_noesy_reassign,
"start reassigning NOE restraints after X structures have been generated", 500 );
243 NEW_OPT( iterative::initial_noe_auto_assign_csts,
"initial nopool assignment of NOESY data.... ",
"../initial_assignment/noe_auto_assign.cst" );
244 NEW_OPT( iterative::auto_assign_scheme,
"select CONST, ADAPT1, ... ",
"CONST");
245 NEW_OPT( iterative::dcut,
"in ADAPT1 what dcut should be chosen",7);
246 NEW_OPT( iterative::initial_beta_topology,
"start with this file as beta.top in stage3",
"" );
247 NEW_OPT( iterative::force_topology_resampling,
"if strand-fraction is low topology sampling is usually skipped. Override this with this flags",
false );
248 NEW_OPT( iterative::recompute_beta_Naccept,
"recompute beta-topology after minimum of Naccept structures -- if no initial_beta_topology always recompute", 2000 );
249 NEW_OPT( iterative::flags_fullatom,
"point to flag-file to read flags for fullatom-refinement and loop-closing specify e.g., as ../flags_fullatom ",
"");
250 NEW_OPT( iterative::normalize::sampling,
251 "dynamically determined score-variation will be used for patching the sampling stage scores",
false );
252 NEW_OPT( iterative::update_noesy_filter_cst,
"update noesy filter restraints (used for pool selection) as often as possible",
false );
253 NEW_OPT( iterative::never_update_noesy_filter_cst,
"never update noesy filter restraints (used for pool selection) not even once for fullatom stage",
false );
254 NEW_OPT( iterative::refine_auto_noe_flags,
"file with extra flags to modify NOESY-Module behavior in refinement phase (stage5+ )",
"" );
256 NEW_OPT8( iterative::staged_auto_noe_flags,
"files with extra flags for each RASREC stage, say NONE for no option file",
"NONE",
"NONE",
"NONE",
"NONE",
"NONE",
"NONE",
"NONE",
"NONE" );
258 NEW_OPT( iterative::split_autoNOE_restraints,
"split the generated restraints into HI and MED accuracy class and use restraint combination only on the 2nd class",
false );
259 NEW_OPT( iterative::randomize_elimination_candidates,
"put the elimination candidates into extra restraint file and only randomly activate them", 0 );
267 #define OBSOLETE(key) \
268 if ( option[ key ].user() ) { \
269 tr.Warning << "WARNING: Option "<< #key<< " is deprecated!" << std::endl; \
273 using namespace basic::options;
274 using namespace basic::options::OptionKeys;
278 OBSOLETE(iterative::copy_pool_for_convergence_check);
280 OBSOLETE(iterative::enumerate::Naccept);
281 OBSOLETE(iterative::min_core_fraction_to_score);
282 OBSOLETE(iterative::force_scored_region);
283 OBSOLETE(iterative::scored_ss_core);
285 OBSOLETE( iterative::perturb_resampling);
287 OBSOLETE( iterative::chainbreak_evaluator_weight);
318 namespace protocols {
321 static numeric::random::RandomGenerator
RG(42089);
323 using namespace jd2::archive;
329 core::Real extra_chainbreak_weight( basic::options::option[ basic::options::OptionKeys::jumps::increase_chainbreak ] );
330 if ( !chainbreaks_in_patch ) {
331 core::Real lin_wgt( 4.0/3.0 * extra_chainbreak_weight );
332 core::Real overlap_wgt( 1.0 * extra_chainbreak_weight );
333 core::Real quad_wgt( 1.0 * extra_chainbreak_weight );
334 tr.Info <<
"no chainbreaks specified in " << patch_name <<
",..."
335 <<
" set chainbreaks to " << lin_wgt <<
" and "
336 << overlap_wgt <<
" for linear- and overlap-chainbreak, respectively" << std::endl;
345 bool bDoBetaJumping(
true);
346 using namespace core::fragment;
355 mem_tr <<
"fragments loaded for ss-prediction" << std::endl;
357 bDoBetaJumping =
true;
358 if ( ct_E < 0.1*ct_H && ct_E < 40 ) {
359 tr.Info <<
"skip beta-jumping since mostly alpha-helical protein" << std::endl;
360 tr.Info <<
"only " << (ct_E*1.0)/(ss_def.
total_residue()*1.0)*100 <<
"% of residues display significant strand-character" << std::endl;
361 tr.Info <<
"whereas " << (ct_H*1.0)/(ss_def.
total_residue()*1.0)*100 <<
"% of residues display significant helix-character" << std::endl;
362 bDoBetaJumping =
false;
364 if ( !bDoBetaJumping && option[ OptionKeys::iterative::force_topology_resampling ]() ) {
365 tr.Info <<
"force-topology-resampling despite low beta-sheet content due to flag -force_topology_resampling" << std::endl;
366 bDoBetaJumping =
true;
368 return bDoBetaJumping;
375 stage_( ENUMERATION ),
376 finish_stage_( LAST_CENTROID_START ),
377 first_batch_this_stage_ ( 1 ),
378 first_fullatom_batch_( 100000 ),
381 bEnumeratedLastTime_( false ),
383 last_accepted_decoys_in_idle_( 0 ),
385 reference_pose_( NULL ),
387 cen_score_( option[ iterative::cen_score ]() ),
388 cen_score_patch_( option[ iterative::cen_score_patch ]() ),
390 fa_score_( option[ iterative::fa_score ]() ),
391 fa_score_patch_( option[ iterative::fa_score_patch ]() ),
392 noesy_assign_float_cycle_( 1.0 ),
393 first_noesy_cst_file_(
"n/a" ),
394 first_noesy_fa_cst_file_ (
"n/a" ),
395 current_noesy_sampling_file_(
"n/a" ),
396 bCombineNoesyCst_( true ),
397 super_quick_relax_of_centroids_( option[ iterative::centroid_quickrelax ]() ),
398 use_dynamic_weights_for_sampling_( option[ iterative::normalize::sampling ]() ),
399 delay_noesy_reassign_( option[ iterative::delay_noesy_reassign ]() ),
402 cst_fa_data_( NULL ),
403 vanilla_options_( basic::options::option )
407 basic::show_time_on_cerr =
true;
409 using namespace ObjexxFCL;
410 mem_tr <<
"IterativeBase CStor-Start" << std::endl;
412 if ( option[ run::test_cycles ] || option[ run::dry_run ] ) {
425 +
" of values for max_nstruct -- needs exactly "+string_of(
FINISHED - 1 )+
" values.");
433 +
" of values for min_diversity -- needs exactly "+string_of(
FINISHED - 1 )+
" values.");
441 +
" of values for accept_ratio -- needs exactly "+string_of(
FINISHED - 1 )+
" values.");
446 if ( option[ in::file::native ].user() ) {
450 mem_tr <<
"setup native pose" << std::endl;
454 if ( option[ in::file::fasta ].user() ) {
458 std::string msg(
"target sequence and sequence of native pose -in:file:native are inconsistent! ");
461 utility_exit_with_message(msg);
468 throw EXCN_Archive(
"need either fasta-sequence (-in:file:fasta) or native structure ( -in:file:native )");
472 if (
tr.Trace.visible() ) {
483 tr.Info <<
"create Archive Scorefunction with: "
484 << option[ iterative::cen_score]() <<
" "
485 << option[ iterative::cen_score_patch ]() << std::endl;
487 mem_tr <<
"setup cen-scorefxn" << std::endl;
517 if ( option[ iterative::cenpool_chemicalshift_weight ].user() ) {
519 set_weight( option[ iterative::chemicalshift_column ](), option[ iterative::cenpool_chemicalshift_weight ]() );
532 set_weight(
"prefa_clean_score3", option[ iterative::centroid_before_quickrelax_weight ]() );
533 set_weight(
"score_fa", option[ iterative::fullatom_after_quickrelax_weight ]() );
543 mem_tr <<
"IterativeBase CStor-End" << std::endl;
559 basic::show_time(
tr,
"compute_cores/rescore: start..." );
563 basic::show_time(
tr,
"compute_cores/rescore: done..." );
567 using namespace basic::options;
568 using namespace basic::options::OptionKeys;
572 && option[ iterative::update_noesy_filter_cst ]()
578 basic::show_time(
tr,
"non-local scoring replace noesy_filter constraints: start..." );
581 basic::show_time(
tr,
"non-local scoring replace noesy_filter constraints: done! ");
593 basic::show_time(
tr,
"read structures into "+
name()+
"..." );
596 basic::show_time(
tr,
"done reading into "+
name() );
609 int last_stage_N( 0 );
613 <<
" decoys for stage " << stage_ <<
" is reached...switching!" << std::endl;
636 tr.Info <<
"start with stage " << stage_ << std::endl;
640 tr.Info <<
"switched to stage: " << stage_ << std::endl;
649 using namespace core::fragment;
674 hedge_archive_->add_evaluated_structure( evaluated_decoy, batch );
694 runtime_assert( from_batch->has_energy(
"pool_converged_rmsd" ) );
695 Real const rmsd_to_pool( from_batch->get_energy(
"pool_converged_rmsd" ) );
700 std::string const tag( from_batch->get_string_value(
"pool_converged_tag" ) );
703 SilentStructs::iterator it;
704 for ( it =
decoys().begin(); it !=
decoys().end(); ++it ) {
705 if ( (*it)->decoy_tag() == tag )
break;
708 if ( it ==
decoys().end() ) {
719 if ( new_score < old_score ) {
722 core::Real const delta_max=max_score-min_score;
723 core::Real const delta_score=new_score-old_score;
724 tr.Debug <<
"swap " << evaluated_decoy->decoy_tag() <<
" for " << (*it)->decoy_tag()
725 <<
" new-score " << new_score <<
" check: " << check_score
726 <<
" score-improvement: " << delta_score
727 <<
" at spread of " << delta_max
728 <<
" ratio " << delta_score/delta_max << std::endl;
729 if ( delta_score/delta_max < -0.05 ) {
733 tr.Debug <<
"swap declined because score-improvement below 5% of total spread" << std::endl;
739 tr.Trace <<
"decoy " << evaluated_decoy->decoy_tag() <<
" with original tag " << evaluated_decoy->get_comment(
"tag_in_file" )
740 <<
" declined because of min_diversity: rmsd is " << rmsd_to_pool
758 basic::show_time(
tr,
"generate_batch" );
760 mem_tr <<
"IterativeBase::start_new_batch " << std::endl;
763 mem_tr <<
"IterativeBase::generate_batch " <<
stage_ <<
" " << batch.
batch() << std::endl;
764 tr.Info <<
"\ngenerate batch from " <<
name() <<
" " << batch.
batch() << std::endl;
787 bool result_is_fullatom =
false;
793 result_is_fullatom =
true;
795 mem_tr.Debug <<
"before evaluation output" << std::endl;
799 mem_tr.Debug <<
"evaluation output" << std::endl;
801 basic::show_time(
tr,
"finalize batch..." );
804 basic::show_time(
tr,
"finalized batch" );
806 tr.Info << std::endl;
809 mem_tr <<
"IterativeBase::generated_batch " << std::endl;
817 basic::show_time(
tr,
"generate safety_hatch" );
818 mem_tr.Debug <<
"make safety hatch..." << std::endl;
820 tr.Info <<
"starting harvest batch at same time as normal cen2fullatom batch" << std::endl;
829 basic::show_time(
tr,
"finalize safety_hatch... ");
832 basic::show_time(
tr,
"finalized safety_hatch" );
843 if ( ! option[ key ].user() )
return;
848 }
else if (
get_weight(
"prefa_clean_score3") > 0.001 ) {
851 runtime_assert(
false);
854 typedef std::map< scoring::ScoreType, std::string > ScoreTypeMap;
855 ScoreTypeMap dynamic_scores;
861 std::ostringstream patches;
862 bool have_patch(
false );
863 for ( ScoreTypeMap::const_iterator it = dynamic_scores.begin(); it != dynamic_scores.end(); ++it ) {
864 if ( scorefxn->get_weight( it->first ) > 0.00001 ) {
866 if ( it->second ==
"atom_pair_constraint" ) {
869 for ( WeightMap::const_iterator vit = variations.begin(); vit != variations.end(); ++vit ) {
870 if ( vit->first.find(
"filter_cst" ) != std::string::npos ) {
871 var_sum += vit->second;
875 runtime_assert( ct_cst );
877 var_rel=var_sum/var_score;
882 core::Real patch = scorefxn->get_weight( it->first )/var_rel;
883 patches << it->second <<
" = " << patch << std::endl;
888 std::string patch_file ( batch.
dir()+
"/dynamic_abinitio_"+score+
".patch" );
889 utility::io::ozstream patch_fd( patch_file );
890 patch_fd << patches.str() << std::endl;
891 tr.Info <<
"dynamic patching: write to flag-file " << key.id() <<
" " << patch_file << std::endl;
892 flags <<
"-" << key.id() <<
" " << patch_file << std::endl;
900 utility::io::ozstream flags( batch.
flag_file(), std::ios::app );
911 tr.Info <<
"gen_evaluation_output in " <<
name() << std::endl;
912 utility::io::ozstream flags( batch.
flag_file(), std::ios::app );
913 flags <<
"-evaluation:jump_nr" << std::endl;
918 flags <<
"-evaluation:extra_score " << option[ iterative::cen_score]() << std::endl
919 <<
"-evaluation:extra_score_column _final" << std::endl;
920 flags <<
"-evaluation:extra_score_patch " << option[ iterative::cen_score_patch ]() << std::endl;
924 flags <<
"-evaluation:extra_score " <<
"empty " << option[ iterative::fa_score]() << std::endl
925 <<
"-evaluation:extra_score_column _final _fa" << std::endl;
926 flags <<
"-evaluation:extra_score_patch " << option[ iterative::fa_score_patch ]() <<
" NOPATCH " << std::endl;
929 flags <<
"-evaluation:extra_score " << option[ iterative::fa_score]() << std::endl
930 <<
"-evaluation:extra_score_column _final" << std::endl;
931 flags <<
"-evaluation:extra_score_patch " << option[ iterative::fa_score_patch ]() << std::endl;
934 flags <<
"-evaluation:built_in_rdc rdc_filt" << std::endl;
939 if ( option[ iterative::super_quick_relax_protocol ].user() ) {
940 flags<<
"-relax:sequence_file " << option[ iterative::super_quick_relax_protocol ]() << std::endl;
942 utility::io::ozstream sequence_file( batch.
dir()+
"/super_quick_relax.txt" );
943 sequence_file <<
"ramp_repack_min 0.02 0.01" << std::endl;
944 sequence_file <<
"ramp_repack_min 0.250 0.01" << std::endl;
945 sequence_file <<
"ramp_repack_min 0.550 0.01" << std::endl;
946 sequence_file <<
"ramp_repack_min 1 0.00001" << std::endl;
947 sequence_file <<
"accept_to_best" << std::endl;
948 flags <<
"-relax:sequence_file " << batch.
dir()+
"/super_quick_relax.txt" << std::endl;
950 flags <<
"-relax:sequence" << std::endl;
951 flags <<
"-out:user_tag centroid" << std::endl;
955 if ( option[ iterative::super_quick_relax_patch ].user() ) {
956 flags <<
"-score:patch " << option[ iterative::super_quick_relax_patch ]() << std::endl;
959 flags <<
"-out:user_tag fullatom" << std::endl;
968 flags <<
"-evaluation::constraints_column " << (
evaluate_local() ?
"noesy_autoassign_cst_worker" :
"noesy_autoassign_cst" ) << std::endl;
980 utility::io::ozstream flags( batch.
flag_file(), std::ios::app );
984 for ( SilentStructs::const_iterator it =
decoys().begin(); it !=
decoys().end(); ++it ) {
987 sfd.write_all( batch.
dir()+
"/pool.in" );
990 if ( sfd.size() == 0 ) {
993 utility::io::ozstream empty_pool_file( batch.
dir()+
"/pool.in" );
994 empty_pool_file <<
"REMARK no structure in pool " << std::endl;
1000 flags <<
"-mc:known_structures " << batch.
dir() <<
"/pool.in" << std::endl;
1001 flags <<
"-mc:max_rmsd_against_known_structures " << std::max( 0.0,
min_diversity_list_[
stage() ] - 0.25 ) << std::endl;
1004 if ( basic::options::option[ basic::options::OptionKeys::in::replonly_residues ].user() ) {
1005 flags <<
"-mc:excluded_residues_from_rmsd ";
1006 utility::vector1<Size> replonly_rsd = basic::options::option[ basic::options::OptionKeys::in::replonly_residues ]();
1047 tr.Info <<
"enumerate pairings\n ";
1048 utility::io::ozstream broker( batch.
broker_file(), std::ios::app );
1049 runtime_assert( broker.good() );
1052 if ( option[ iterative::enumerate::broker ].user() ) {
1053 utility::io::izstream enum_broker( option[ iterative::enumerate::broker ]() );
1054 if ( !enum_broker.good() )
throw ( utility::excn::EXCN_FileNotFound
1055 (
"-iterative::enumerate::broker: File "
1056 +
std::string( option[ iterative::enumerate::broker ]())+
" not found! ") );
1058 while ( getline( enum_broker, line ) ) broker << line << std::endl;
1064 using namespace core::fragment;
1066 option[ OptionKeys::abinitio::number_3mer_frags ]()
1067 ).
read_data( option[ in::file::frag3 ] );
1069 broker <<
"CLAIMER TemplateJumpClaimer\n"
1070 <<
"RANDOM_SHEETS 2\n"
1071 <<
"SS_INFO " << frag_ss_file <<
"\n"
1072 <<
"PAIRING_FILE " << pairings_file <<
"\n"
1073 <<
"END_CLAIMER" << std::endl;
1080 tr.Info <<
"resample topologies\n";
1083 utility::io::ozstream broker( batch.
broker_file(), std::ios::app );
1084 broker <<
"\nCLAIMER TemplateJumpClaimer \n"
1085 <<
"NO_USE_INPUT_POSE\n"
1086 <<
"topol_file "<< batch.
dir() <<
"beta.top\n"
1087 <<
"END_CLAIMER\n\n" << std::endl;
1091 if ( option[ iterative::initial_beta_topology ].user() &&
1092 (
int)
total_accepts() < option[ iterative::recompute_beta_Naccept ]() ) {
1094 std::string input( option[ iterative::initial_beta_topology ]() );
1096 utility::io::izstream beta_input( input );
1097 if( beta_input.good() ) {
1099 utility::io::ozstream beta_batch( batch.
dir()+
"beta.top" );
1100 while ( getline( beta_input, line ) ) beta_batch << line << std::endl;
1102 utility_exit_with_message(
"topology_file "+input+
" not found. supply file or remove option -iterative::initial_beta_topology");
1106 utility::io::ozstream file( batch.
dir() +
"beta.top" );
1107 file << *beta_topol << std::endl;
1113 tr.Info <<
"resample_stage2 \n";
1114 mem_tr <<
"IterativeBase::gen_resample_stage2 start" << std::endl;
1171 if ( start_decoys.size() ) {
1172 numeric::random::random_permutation( start_decoys,
RG );
1175 for ( SilentStructVector::const_iterator
1176 it = start_decoys.begin(); it != start_decoys.end(); ++it ) {
1182 utility::io::ozstream broker( batch.
broker_file(), std::ios::app );
1183 broker <<
"\nUSE_INPUT_POSE\n"
1184 <<
"CLAIMER StartStructClaimer\n"
1185 <<
"PERTURB " << option[ iterative::perturb_resampling ] << std::endl
1186 <<
"END_CLAIMER\n\n"
1187 <<
"CLAIMER JumpClaimer\n"
1188 <<
"END_CLAIMER\n\n" << std::endl;
1191 utility::io::ozstream flags( batch.
flag_file(), std::ios::app );
1192 flags <<
"-abinitio:skip_stages 1 " << std::endl;
1193 flags <<
"-out:no_nstruct_label" << std::endl;
1194 flags <<
"-out:suffix " <<
"_b" << std::setfill(
'0') << std::setw(4) << batch.
id() << std::endl;
1196 tr.Warning <<
"[WARNING] no stage2 decoys found ! " << std::endl;
1200 batch.
nstruct() = std::max( 1,
int( 1.0*batch.
nstruct() / ( 1.0*start_decoys.size() ) ) );
1201 mem_tr <<
"IterativeBase::gen_resample_stage2 end" << std::endl;
1206 using namespace core::fragment;
1209 mem_tr <<
"IterativeBase::gen_resample_fragments start" << std::endl;
1212 Size const max_frags( 500 );
1213 if ( option[ iterative::mix_frags ]() ) {
1215 option[ OptionKeys::abinitio::number_9mer_frags ]()
1216 ).
read_data( option[ in::file::frag9 ] );
1218 option[ OptionKeys::abinitio::number_3mer_frags ]()
1219 ).
read_data( option[ in::file::frag3 ] );
1220 frags_9mer.
add( *frags_l );
1221 frags_3mer.
add( *frags_s );
1226 (*it)->fill_pose( pose );
1235 utility::io::ozstream flags( batch.
flag_file(), std::ios::app );
1236 flags <<
"-frag3 " << file_3mer << std::endl
1237 <<
"-frag9 " << file_9mer << std::endl
1238 <<
"-abinitio:number_3mer_frags 0" << std::endl
1239 <<
"-abinitio:number_9mer_frags 0" << std::endl;
1241 mem_tr <<
"IterativeBase::gen_resample_fragments end" << std::endl;
1257 if ( option[ iterative::never_update_noesy_filter_cst ]() ) {
1263 tr.Info <<
"update_noesy_filter_files for " <<
name() << std::endl;
1264 tr.Info <<
"STATUS now: ";
1266 tr.Info << std::endl;
1271 tr.Info <<
"gen_noe_assignments in " <<
name() << std::endl;
1274 mem_tr <<
"IterativeBase::gen_noe_assignments start" << std::endl;
1300 std::string cst_centroid_file( cst_file +
".centroid");
1301 std::string best_cst_centroid_file( best_cst_file +
".centroid");
1304 utility::io::ozstream broker( batch.
broker_file(), std::ios::app );
1305 bool bSplitted( option[ iterative::split_autoNOE_restraints ]() );
1307 std::string drop_candidates( cst_file +
".drop" );
1308 std::string drop_candidates_centroid( drop_candidates +
".centroid" );
1310 using namespace utility::file;
1311 bool bRandomRestraints( option[ iterative::randomize_elimination_candidates ] > 0.0 &&
file_exists( drop_candidates ) );
1316 broker <<
"\nCLAIMER ConstraintClaimer \n"
1317 <<
"CST_FILE " << best_cst_file <<
"\n"
1321 broker <<
"COMBINE_RATIO 1" << std::endl;
1322 broker <<
"END_CLAIMER\n" << std::endl;
1324 broker <<
"\nCLAIMER ConstraintClaimer \n"
1325 <<
"CST_FILE " << cst_file <<
"\n"
1329 if ( bCombine || bSplitted ) {
1330 broker <<
"COMBINE_RATIO " << option[ basic::options::OptionKeys::constraints::combine ]() << std::endl;
1332 broker <<
"END_CLAIMER\n" << std::endl;
1333 if ( bRandomRestraints ) {
1334 broker <<
"\nCLAIMER ConstraintClaimer \n"
1335 <<
"CST_FILE " << drop_candidates <<
"\n"
1338 <<
"DROP_RANDOM_RATE " << option[ iterative::randomize_elimination_candidates ]() <<
"\n"
1340 if ( bCombine || bSplitted ) {
1341 broker <<
"COMBINE_RATIO " << option[ basic::options::OptionKeys::constraints::combine ]() << std::endl;
1343 broker <<
"END_CLAIMER\n" << std::endl;
1348 broker <<
"\nCLAIMER ConstraintClaimer \n"
1349 <<
"CST_FILE " << best_cst_centroid_file <<
"\n"
1352 broker <<
"COMBINE_RATIO 1" << std::endl;
1353 broker <<
"END_CLAIMER\n" << std::endl;
1355 broker <<
"\nCLAIMER ConstraintClaimer \n"
1356 <<
"CST_FILE " << cst_centroid_file <<
"\n"
1359 if ( bCombine || bSplitted ) {
1360 broker <<
"COMBINE_RATIO " << option[ basic::options::OptionKeys::constraints::combine ]() << std::endl;
1362 broker <<
"END_CLAIMER\n" << std::endl;
1364 if ( bRandomRestraints ) {
1365 broker <<
"\nCLAIMER ConstraintClaimer \n"
1366 <<
"CST_FILE " << drop_candidates_centroid <<
"\n"
1368 <<
"DROP_RANDOM_RATE " << option[ iterative::randomize_elimination_candidates ]() <<
"\n"
1370 if ( bCombine || bSplitted ) {
1371 broker <<
"COMBINE_RATIO " << option[ basic::options::OptionKeys::constraints::combine ]() << std::endl;
1373 broker <<
"END_CLAIMER\n" << std::endl;
1376 mem_tr <<
"IterativeBase::gen_noe_assignments end" << std::endl;
1381 utility::io::ozstream broker( batch.
broker_file(), std::ios::app );
1382 broker <<
"\nUSE_INPUT_POSE\n"
1383 <<
"CLAIMER StartStructClaimer\n"
1384 <<
"END_CLAIMER\n\n"
1385 <<
"CLAIMER JumpClaimer\n"
1386 <<
"END_CLAIMER\n\n" << std::endl;
1389 utility::io::ozstream flags( batch.
flag_file(), std::ios::app );
1390 flags <<
"-abinitio::skip_stages 1 2 3 4" << std::endl;
1394 std::copy(
decoys().begin(),
decoys().
end(), std::back_inserter( start_decoys ) );
1396 if ( start_decoys.size() ) {
1399 for ( core::io::silent::SilentStructOPs::const_iterator
1400 it = start_decoys.begin(); it != start_decoys.end(); ++it ) {
1406 batch.
nstruct() = std::max( 1,
int( 1.0*batch.
nstruct() / ( 1.0*start_decoys.size() ) ) );
1414 Real score_cut_per_batch
1416 using namespace core::io::silent;
1420 for ( ArchiveManager::BatchList::const_iterator it =
manager().batches().begin(); it !=
manager().
batches().end(); ++it ) {
1422 if ( !it->has_silent_in() )
continue;
1423 total += it->decoys_returned();
1424 tr.Debug <<
"harvest old decoys for safety hatch: batch " << it->id() <<
" " << it->decoys_returned() <<
" " << total << std::endl;
1426 basic::show_time(
tr,
"generate safety_hatch: counted total decoys" );
1429 for ( ArchiveManager::BatchList::const_iterator it =
manager().batches().begin(); it !=
manager().
batches().end(); ++it ) {
1430 Real percentage_per_batch( 1.0*batch.
nstruct() / (1.0*total) );
1432 if ( !it->has_silent_in() )
continue;
1433 if ( !it->decoys_returned() )
continue;
1435 basic::show_time(
tr,
"generate safety_hatch: access batch "+it->batch() );
1437 std::list< std::pair< core::Real, SilentStructOP > > score_cut_decoys;
1439 tr.Debug <<
"read and score decoys in " << it->silent_out() <<
"..." << std::endl;
1440 sfd.read_file( it->silent_out() );
1443 sit->set_decoy_tag(
"harvest_"+batch.
batch()+
"_"+ObjexxFCL::lead_zero_string_of( ++ct, 6 ) );
1453 score_cut_decoys.push_back( std::make_pair(
select_score( pss ), pss ) );
1455 score_cut_decoys.sort();
1456 tr.Debug <<
"select " << percentage_per_batch*100 <<
"% from batch from the lowest scoring " << score_cut_per_batch*100 <<
"% of structures" << std::endl;
1457 basic::show_time(
tr,
"generate safety_hatch: collected decoys batch "+it->batch() );
1459 while ( score_cut_per_batch < percentage_per_batch ) {
1460 Size ind_max( static_cast< Size > ( score_cut_decoys.size()*score_cut_per_batch ) );
1461 for ( std::list< std::pair< core::Real, core::io::silent::SilentStructOP > >::const_iterator sit = score_cut_decoys.begin();
1462 sit != score_cut_decoys.end(); ++sit ) {
1463 start_decoys.push_back( sit->second );
1464 if ( --ind_max <= 1 )
break;
1466 percentage_per_batch-=score_cut_per_batch;
1468 basic::show_time(
tr,
"generate safety_hatch: generated start_decoys batch "+it->batch());
1470 if ( percentage_per_batch > 0.01 ) {
1471 Size ind_max( static_cast< Size > ( score_cut_decoys.size()*score_cut_per_batch ) );
1472 for ( std::list< std::pair< core::Real, core::io::silent::SilentStructOP > >::const_iterator sit = score_cut_decoys.begin();
1473 sit != score_cut_decoys.end(); ++sit ) {
1474 if (
RG.uniform() < ( percentage_per_batch / score_cut_per_batch ) ) {
1475 start_decoys.push_back( sit->second );
1477 if ( --ind_max <= 1 )
break;
1481 basic::show_time(
tr,
"generate safety_hatch: done collecting");
1485 using namespace core::io::silent;
1486 utility::io::ozstream broker( batch.
broker_file(), std::ios::app );
1487 broker <<
"\nUSE_INPUT_POSE\n"
1488 <<
"CLAIMER StartStructClaimer\n"
1489 <<
"END_CLAIMER\n\n"
1490 <<
"CLAIMER JumpClaimer\n"
1491 <<
"END_CLAIMER\n\n" << std::endl;
1494 utility::io::ozstream flags( batch.
flag_file(), std::ios::app );
1495 flags <<
"-abinitio::skip_stages 1 2 3 4" << std::endl;
1503 Real score_cut_per_batch( option[ OptionKeys::iterative::safety_hatch_scorecut ] );
1510 if ( start_decoys.size() ) {
1514 for ( core::io::silent::SilentStructOPs::const_iterator
1515 it = start_decoys.begin(); it != start_decoys.end(); ++it ) {
1516 if ( ++ct > batch.
nstruct() )
break;
1521 basic::show_time(
tr,
"generate safety_hatch: done writing");
1522 batch.
nstruct() = std::max( 1,
int( 1.0*batch.
nstruct() / ( 1.0*start_decoys.size() ) ) );
1532 Size const n_decoys( option[ iterative::limit_decoys_for_noe_assign ] );
1538 mem_tr <<
"IterativeBase reassign_noesy_data start" << std::endl;
1542 std::ostringstream hash_string;
1543 hash_string <<
"NO_POOL " << std::endl;
1547 calibration_decoys =
decoys();
1548 hash_string <<
"ONLY "<<
decoys().size() << std::endl;
1551 for ( SilentStructs::const_iterator it =
decoys().begin(); it !=
decoys().end() && ct2 <= n_decoys; ++ct2, ++it ) {
1552 calibration_decoys.push_back( *it );
1553 hash_string << (*it)->decoy_tag() << std::endl;
1558 size_t hash_val(
hasher( hash_string.str() ) );
1560 tr.Info <<
"do not create new noesy assignment since low-energy structures have not changed..." << std::endl;
1568 bool use_hardwired_phaseII_params(
false );
1570 std::string const& option_file( option[ iterative::staged_auto_noe_flags ][
stage() ] );
1571 if ( option_file !=
"NONE" ) {
1572 tr.Info <<
"Loading Auto-NOE options for stage " <<
stage() <<
" from @" << option_file << std::endl;
1575 utility_exit_with_message(
"couldn't find flag-file "+option_file );
1577 option.load_options_from_file( option_file );
1579 tr.Info <<
"No stage specific Auto-NOE option file found for stage" <<
stage() << std::endl;
1581 if ( option[ iterative::refine_auto_noe_flags ].user() ) {
1583 if ( !
file_exists( option[ iterative::refine_auto_noe_flags ]() ) ) {
1584 utility_exit_with_message(
"couldn't find flag-file "+
std::string(option[ iterative::refine_auto_noe_flags ]()) );
1587 basic::options::option.load_options_from_file( option[ iterative::refine_auto_noe_flags ] );
1589 use_hardwired_phaseII_params =
true;
1597 if ( use_hardwired_phaseII_params ) {
1598 tr.Info <<
"Use hardwired phaseII params for NoesyModule " << std::endl;
1603 std::string scheme( option[ iterative::auto_assign_scheme ]() );
1604 if ( scheme ==
"CONST" ) {
1605 tr.Info <<
" reassign NOESY data with cmd-line settings " << std::endl;
1607 }
else if ( scheme ==
"ADAPT1" ) {
1608 tr.Info <<
" ADAPT1 scheme selected for NOESY data: " << std::endl;
1609 tr.Info <<
"stage1-3: cycle7 - nodistViol - combine-cst " << std::endl;
1610 tr.Info <<
"stage4: cycle7 - [dcut = -iterative:dcut ] - do not combine " << std::endl;
1615 params.
dcut_ = option[ iterative::dcut ]();
1619 utility_exit_with_message(
"unknown auto_assign_scheme for NOESY data: choose ADAPT1 or CONST" + scheme);
1632 utility::io::ozstream param_out( batch.
dir()+
"/README_noe_auto_assign", std::ios::app );
1633 params.
show( param_out );
1638 utility::DereferenceIterator< SilentStructs >( calibration_decoys.begin() ),
1639 utility::DereferenceIterator< SilentStructs >( calibration_decoys.end() )
1641 using namespace basic::options;
1642 using namespace basic::options::OptionKeys;
1652 std::string cst_centroid_file( cst_file +
".centroid");
1654 std::string best_cst_centroid_file( best_cst_file +
".centroid");
1659 bool bSplitted( option[ iterative::split_autoNOE_restraints ] );
1660 bool bRandomRestraints( option[ iterative::randomize_elimination_candidates ] > 0.0 );
1662 noesy_module_->generate_constraint_files( aPose, best_cst_file, best_cst_centroid_file, 5, 0, 2 );
1663 noesy_module_->generate_constraint_files( aPose, cst_file, cst_centroid_file, 5, 3, 4 );
1665 noesy_module_->generate_constraint_files( aPose, cst_file, cst_centroid_file, 5, 0, 5, !bRandomRestraints );
1667 noesy_module_->generate_constraint_files( aPose, cst_file+
".filter", cst_file+
".filter.centroid", 2, 0, 5 );
1669 std::string drop_candidates( cst_file +
".drop" );
1670 std::string drop_candidates_centroid( drop_candidates +
".centroid" );
1672 if ( bRandomRestraints ) {
1673 noesy_module_->generate_constraint_files( aPose, drop_candidates, drop_candidates_centroid, 5, 0, 5, !bRandomRestraints,
true );
1683 if (
evaluate_local() && option[ iterative::update_noesy_filter_cst ]() ) {
1687 cst->set_fullatom(
true );
1688 cst->set_centroid(
false );
1695 mem_tr <<
"IterativeBase reassign_noesy_data end" << std::endl;
1706 utility::io::ozstream out_ss( out_frag_ss_file );
1710 int last_sheet_pos=-1;
1711 int new_sheet_start=0;
1716 if ( pos - 1 != last_sheet_pos ) {
1717 if ( new_sheet_start > 0 && (last_sheet_pos - new_sheet_start >= 3 )) {
1718 strands.
push_back( new_sheet_start, last_sheet_pos );
1720 new_sheet_start = pos;
1722 last_sheet_pos = pos;
1726 if ( new_sheet_start > 0 && (last_sheet_pos - new_sheet_start >= 3 ) ) {
1727 strands.
push_back( new_sheet_start, last_sheet_pos );
1729 tr.Debug <<
"secondary structure in current fragset reveals following beta-strands: " << std::endl << strands;
1732 utility::io::ozstream os(out_pairings_file);
1733 for (
Size i1 = 1; i1 <= strands.size(); i1++ ) {
1734 for (
Size i2 = i1+1; i2 <= strands.size(); i2++ ) {
1735 for (
Size pos1=strands[i1].
start(); pos1<=strands[i1].stop(); pos1++ ) {
1736 for (
Size pos2=strands[i2].
start(); pos2<=strands[i2].stop(); pos2++ ) {
1737 if ( pos2-pos1 > 25 ) {
1738 os << pos1 <<
" " << pos2 <<
" A 1" << std::endl;
1739 os << pos1 <<
" " << pos2 <<
" A 2" << std::endl;
1740 os << pos1 <<
" " << pos2 <<
" P 1" << std::endl;
1741 os << pos1 <<
" " << pos2 <<
" P 2" << std::endl;
1754 tr.Info <<
"replacing NOE filter constraints" << std::endl;
1757 (*
decoys().begin())->fill_pose( pose );
1767 cst->set_combine_ratio( 2 );
1768 cst->set_fullatom(
true );
1769 cst->set_centroid(
false );
1771 cst->set_filter_weight( weight );
1793 (*
decoys().begin())->fill_pose( a_pose );
1797 score_name=option[ iterative::cen_score]();
1798 score_patch=option[ iterative::cen_score_patch ]();
1800 score_name=option[ iterative::fa_score ]();
1801 score_patch=option[ iterative::fa_score_patch ]();
1804 if ( score_patch !=
"NOPATCH" ) {
1811 core::Real extra_chainbreak_weight( basic::options::option[ basic::options::OptionKeys::jumps::increase_chainbreak ] );
1812 if ( !chainbreaks_in_patch ) {
1813 core::Real lin_wgt( 4.0/3.0 * extra_chainbreak_weight );
1814 core::Real overlap_wgt( 1.0 * extra_chainbreak_weight );
1815 core::Real quad_wgt( 1.0 * extra_chainbreak_weight );
1816 tr.Info <<
"no chainbreaks specified in " << score_patch <<
",..."
1817 <<
" set chainbreaks to " << lin_wgt <<
" and "
1818 << overlap_wgt <<
" for linear- and overlap-chainbreak, respectively" << std::endl;
1825 std::string score_patch=option[ iterative::fa_score_patch ]();
1826 if ( score_patch !=
"NOPATCH" ) {
1856 utility::io::ozstream flags( batch.
flag_file(), std::ios::app );
1859 if ( !option[ iterative::flags_fullatom ].user() ) {
1860 utility_exit_with_message(
"option -iterative:flags_fullatom is required !!! ");
1862 flags <<
"@"<< option[ iterative::flags_fullatom ]() << std::endl;
1864 if ( option[ constraints::cst_fa_file ].user() ) {
1865 utility::io::ozstream broker( batch.
broker_file(), std::ios::app );
1866 broker <<
"\nCLAIMER ConstraintClaimer \n"
1870 broker <<
"END_CLAIMER\n"
1873 if ( option[ constraints::cst_file ].user() ) {
1874 utility::io::ozstream broker( batch.
broker_file(), std::ios::app );
1875 broker <<
"\nCLAIMER ConstraintClaimer \n"
1891 using namespace ObjexxFCL;
1895 if ( !option[ jumps::max_strand_gap_allowed ].user() ) {
1896 option[ jumps::max_strand_gap_allowed ].def( 10 );
1898 if ( !option[ jumps::contact_score ].user() ) {
1899 option[ jumps::contact_score ].def( 0.2 );
1908 (*it)->fill_pose( pose );
1913 tag = right_string_of( ct, 4,
'0');
1914 beta_topol->add_topology( strand_pairings, tag );
1915 model_freq[ tag.substr(0, 4) ] += 1;
1919 beta_topol->compute_model_weights( model_freq );
1930 eval.
rmsf( result );
1933 for (
Size i=1; i<=result.size(); ++i ) {
1936 tr.Debug <<
"make rigid with cutoff " << cutoff <<
" " << std::endl << rigid << std::endl;
1941 tr.Info <<
"compute converged regions " << std::endl;
1942 basic::DynamicProfileThis prof_here(
"ARCHIVE_COMPUTE_CONVERGED_REGIONS");
1943 core::Size const opt_nstruct( option[ iterative::rmsf_nstruct ]() );
1946 if ( nstruct==0 )
return;
1975 tr.Info <<
"finished computing converged regions" << std::endl;
1993 runtime_assert( tag ==
"IterationStage:" );
1995 tr.Info <<
"restored iteration stage: " <<
stage_ << std::endl;
1997 runtime_assert( tag ==
"first_batch_this_stage:");
2000 runtime_assert( tag ==
"first_fullatom_batch:" );
2004 if ( is.good() && tag ==
"SCORED_CORE:" ) {
2009 tr.Warning <<
"WARNING: found obsolete tag SCORE_CORE in status file" << std::endl;
2012 if ( is.good() && tag ==
"NOESY_CYCLE:" ) {
2016 if ( is.good() && tag ==
"NOESY_FIRST_CST:" ) {
2020 if ( is.good() && tag ==
"NOESY_FIRST_FA_CST:" ) {
2024 if ( is.good() && tag ==
"NOESY_CURRENT_CST:" ) {
2032 cst->set_fullatom(
true );
2033 cst->set_centroid(
false );
2044 os <<
"IterationStage: " <<
stage_;
2132 tr.Info <<
"resample_stage2 \n";
2133 typedef std::map< std::string, utility::vector1< std::string > > SourceFiles;
2134 typedef std::map< std::string, utility::vector1< core::io::silent::SilentStructOP > > AlternativeDecoys;
2136 SourceFiles sources;
2137 AlternativeDecoys alternative_decoys;
2142 runtime_assert( (*it)->has_comment(
TAG_IN_FILE ) );
2145 std::string stage2_file( file.path()+
"/"+alternative_decoy_file );
2148 sources[ stage2_file ].push_back( tag );
2149 alternative_decoys[ stage2_file ].push_back( (*it) );
2156 for ( SourceFiles::const_iterator it = sources.begin(); it != sources.end(); ++it ) {
2160 sfd.
_read_file( it->first, it->second,
true );
2161 if ( sfd.
size() > it->second.size() ) {
2162 tr.Warning <<
"[WARNING] multiple decoys with same tag detected in file " << it->first << std::endl;
2167 batch_prefix=
'f'+batch_prefix.substr(9,3);
2168 sit->set_decoy_tag( batch_prefix+
"_"+sit->decoy_tag() );
2169 output_decoys.push_back( *sit );
2171 ct_read += sfd.
size();
2172 }
catch ( utility::excn::EXCN_IO& excn ) {
2173 tr.Warning <<
"[WARNING] Problem reading silent-file " << it->first <<
" for " << it->second.size() <<
" structures " << std::endl;
2174 excn.show(
tr.Warning );
2175 tr.Warning << std::endl;
2176 tr.Warning <<
"use the respective structures in the pool as starting structure instead" << std::endl;
2177 copy( alternative_decoys[ it->first ].begin(), alternative_decoys[ it->first ].end(), std::back_inserter( output_decoys ) );
2178 ct_read += alternative_decoys[ it->first ].size();
2182 tr.Debug <<
"structures from pool" << ct_in <<
" structure retrieved from " << alternative_decoy_file <<
"-files "
2183 << ct_read <<
" start structs: " << output_decoys.size() << std::endl;
2184 if ( output_decoys.size() != primary_decoys.size() ) {
2185 tr.Warning <<
"[WARNING] why do we have a different number of decoys in pool and start_decoys ? " << std::endl;
2191 tr.Debug <<
"test broker settings...." << std::endl;
2192 OptionCollection vanilla_options( option );
2193 option.load_options_from_file( batch.
flag_file() );
2197 tr.Debug <<
"setting of broker::setup " << std::endl;
2199 std::copy( files.begin(), files.end(), std::ostream_iterator<std::string>(
tr.Debug,
" "));
2200 tr.Debug << std::endl;
2201 }
catch ( utility::excn::EXCN_Exception &excn ) {
2202 utility_exit_with_message(
"[ERROR] problems with broker setup in "+batch.
all_broker_files()+
" aborting... ");
2203 tr.Error <<
"[ERROR] problems with broker setup in " << batch.
all_broker_files() <<
" aborting... " << std::endl;
2205 option = vanilla_options;
2208 option = vanilla_options;
2218 if ( !b_old_eval_state ) {
2219 tr.Debug <<
"switch to local evaluation for reading of initial pool" << std::endl;
2228 if ( !b_old_eval_state ) {
2238 using namespace topology_broker;
2239 tr.Info <<
"setup filter-cst module in IterativeBase"<<std::endl;
2242 tr.Trace <<
"topology_broker is initiailized with " << topology_broker->num_claimers() <<
" claimers "<< std::endl;
2244 for ( TopologyBroker::const_iterator it = topology_broker->begin();
2245 it != topology_broker->end(); ++it, ++ct ) {
2246 tr.Trace <<
"found claimer of type " << (*it)->type() <<
"trying to cast now..."<< std::endl;
2248 if ( cst_claimer ) {
2249 tr.Info <<
"found cst-claimer with filter_name " << cst_claimer->filter_name()
2250 <<
" filter_weight " << cst_claimer->filter_weight() << std::endl;
2251 if ( cst_claimer->filter_weight() < 0.01 )
continue;
2253 core::Real weight( cst_claimer->filter_weight() );
2254 if ( !
name.size() ) {
2255 name =
"filter_cst_"+ObjexxFCL::lead_zero_string_of( ct, 2 );
2257 name =
"filter_cst_"+
name+
"_"+ObjexxFCL::lead_zero_string_of( ct, 2 );;
2259 add_evaluation(
new ConstraintEvaluatorWrapper(
name, cst_claimer ), weight*overall_weight );
2267 tr.Debug <<
"setup autoNOE module in IterativeBase"<<std::endl;
2283 tr.Debug <<
"cool we have local-scoring active"<<std::endl;
2287 cst->set_fullatom(
true );
2288 cst->set_centroid(
false );
2289 cst->set_filter_weight( option[ iterative::cenpool_noesy_cst_weight ]() );
2294 std::ostringstream hash_string;
2295 hash_string <<
"NO_POOL " << std::endl;