34 #include <basic/options/option.hh>
37 #include <basic/options/keys/in.OptionKeys.gen.hh>
38 #include <basic/options/keys/swa.OptionKeys.gen.hh>
44 #include <utility/exit.hh>
48 #include <utility/vector1.hh>
61 utility::options::StringVectorOption
const & option_s1,
62 utility::options::StringVectorOption
const & option_silent1,
63 utility::options::StringVectorOption
const & option_tags1
68 using namespace core::import_pose::pose_stream;
72 if( option_s1.user() ) {
76 }
else if ( option_silent1.size() > 0 ){
78 if ( option_tags1.user() > 0) {
97 using namespace protocols::swa;
98 using namespace basic::options;
99 using namespace basic::options::OptionKeys;
100 using namespace basic::options::OptionKeys::swa;
101 using namespace core::import_pose::pose_stream;
108 if ( option[ s1 ].user() || option[ silent1 ].user() ) {
110 if ( option[ slice_res1 ].user() ) slice_res_1 = option[ slice_res1]();
113 option[ input_res1 ](),
115 if ( option[ backbone_only1 ]() ) stream1->set_backbone_only(
true );
116 input_streams.push_back( stream1 );
118 if ( option[ input_res2 ].user() ) {
120 if ( option[ slice_res2 ].user() ) slice_res_2 = option[ slice_res2]();
123 option[ input_res2 ](),
125 if ( option[ backbone_only2 ]() ) stream2->set_backbone_only(
true );
126 input_streams.push_back( stream2 );
128 }
else if ( option[ in::file::input_res ].user() ) {
132 if ( option[ in::file::silent ].user() ) {
133 silent_files_in = option[ in::file::silent ]();
135 if ( option[ in::file::tags ].user() ) {
136 pdb_tags = option[ in::file::tags ]();
138 if ( pdb_tags.size() < 1)
return;
140 if ( option[ in::file::s ].user() ) {
143 for (
Size n = 1; n <= pdb_tags_from_disk.size(); n++ ) pdb_tags.push_back( pdb_tags_from_disk[ n ] );
145 assert( pdb_tags.size() > 0 );
147 pdb_tags, silent_files_in,
148 option[ in::file::input_res ](), option[ input_res2 ]() );
159 pose_input_stream_( pose_input_stream ),
160 input_res_( input_res ),
161 slice_res_( slice_res ),
162 backbone_only_( false )
170 pose_input_stream_( pose_input_stream ),
171 input_res_( input_res ),
172 backbone_only_( false )
200 std::map< Size, Size > &
238 bool const check_sequence_matches,
239 bool const align_pose_to_import_pose ){
241 using namespace core::conformation;
243 if (
rsd_set_ == 0 ) utility_exit_with_message(
"Hey, need to define rsd_set for pose input stream" );
253 std::map< core::Size, core::Size > res_map;
270 std::cout <<
"IMPORT_POSE DURING COPY_NEXT_SEGMENT: " << import_pose.
annotated_sequence(
true ) << std::endl;
278 if ( align_pose_to_import_pose ) {
285 if ( align_pose_to_import_pose ) {
298 using namespace core::chemical;
304 remove_variants.push_back(
"VIRTUAL_PHOSPHATE" );
305 remove_variants.push_back(
"VIRTUAL_O2STAR_HYDROGEN" );
306 remove_variants.push_back(
"CUTPOINT_LOWER" );
307 remove_variants.push_back(
"CUTPOINT_UPPER" );
311 for (
Size i = 1; i <= remove_variants.size(); i++ ){
333 std::cout <<
" N " << n << std::endl;
334 std::cout <<
" SLICE_RES " <<
slice_res_[ n ] << std::endl;
335 std::cout <<
" INPUT_RES " <<
input_res_[ n ] << std::endl;
337 std::cout <<
" IMPORT TOTRES "<< import_pose.
total_residue() << std::endl;
338 std::cout <<
" DESIRED TOTRES "<< pose.
total_residue() << std::endl;
343 if (!match) utility_exit_with_message(
"mismatch in sequence between input pose and desired sequence, given input_res " );
356 using namespace core::import_pose::pose_stream;
359 input_res_vectors.push_back( input_res );
360 input_res_vectors.push_back( input_res2 );
366 for (
Size i = 1; i <= silent_files_in.size(); i++ ){
368 silent_files1.push_back( silent_files_in[ i ] );
369 pdb_tags1.push_back( pdb_tags[ i ] );
372 input_res_vectors[ i ] );
373 input_streams_with_residue_info.push_back( input_stream );
376 for (
Size i = silent_files_in.size()+1; i <= pdb_tags.size(); i++ ){
378 std::size_t found=pose_name.find(
".pdb");
379 if (found==std::string::npos) {
380 pose_name.append(
".pdb");
383 pose_names.push_back( pose_name );
385 input_res_vectors[ i ] );
386 input_streams_with_residue_info.push_back( input_stream );