22 #include <basic/Tracer.hh>
23 #include <basic/options/option.hh>
24 #include <utility/file/FileName.hh>
25 #include <utility/vector1.hh>
26 #include <utility/exit.hh>
32 #include <basic/options/keys/in.OptionKeys.gen.hh>
37 static basic::Tracer
tr(
"protocols.jd2.LazySilentFileJobInputter");
44 tr.Debug <<
"instantiating LazySilentFileJobInputter" << std::endl;
52 using namespace utility;
54 using namespace basic::options;
56 tr.Debug <<
"LazySilentFileJobInputter::fill_jobs" << std::endl;
66 runtime_assert( silent_files.size() <= 1 );
69 current_fn_ != silent_files.end(); ++current_fn_
73 sfd_.read_tags_fast( *current_fn_, filetags );
75 for(
core::Size jj = 1; jj <= filetags.size(); jj++ ) {
76 tags.push_back( filetags[jj] );
82 using namespace core::io::silent;
85 tr.Debug <<
"reserve memory for InnerJob List " << tags.size() << std::endl;
86 inner_jobs.reserve( tags.size() );
87 tr.Debug <<
"fill list with " << tags.size() <<
" InnerJob Objects" << std::endl;
88 for (
core::Size iter = 1; iter <= tags.size(); iter++ ) {
90 inner_jobs.push_back( ijob );
93 tr.Debug <<
"reserve list for " << inner_jobs.size() * nstruct <<
" Job Objects" << std::endl;
94 jobs.reserve( nstruct * inner_jobs.size() );
96 tr.Debug <<
"fill job list with... " << std::endl;
97 for (
core::Size index = 1; index <= nstruct; ++index ) {
100 tr.Trace <<
"pushing " << (*ijob)->input_tag() <<
" nstruct index " << index << std::endl;
110 using namespace basic::options;
112 tag_to_read.push_back( job->inner_job()->input_tag());
114 if ( !sfd_.read_file( (option[ OptionKeys::in::file::silent ]()[1]).name(), tag_to_read ) ) {
115 utility_exit_with_message(
" job with input tag " + job->inner_job()->input_tag() +
" can't find his input structure ");
117 return sfd_.get_structure( job->inner_job()->input_tag() );
125 tr.Debug <<
"LazySilentFileJobInputter::pose_from_job" << std::endl;
127 if ( !job->inner_job()->get_pose() ) {
128 tr.Debug <<
"filling pose from SilentFile (tag = " << job->inner_job()->input_tag()
131 struct_from_job( job ).fill_pose( pose );
135 pose = *(job->inner_job()->get_pose());
136 tr.Debug <<
"filling pose from saved copy (tag = " << job->input_tag()
149 return "LazySilentFileJobInputter";