58 #include <basic/Tracer.hh>
66 #include <utility/io/ozstream.hh>
68 #include <utility/file/file_sys_util.hh>
70 #include <numeric/xyzVector.hh>
76 #include <basic/options/option.hh>
79 #include <basic/options/keys/motifs.OptionKeys.gen.hh>
81 #include <utility/vector1.hh>
87 static basic::Tracer
ms_tr(
"protocols.motifs.LigandMotifSearch", basic::t_info );
95 build_positionOPs_(0),
96 target_conformers_map_(),
98 ztest_cutoff_1_( basic::options::option[ basic::options::OptionKeys::motifs::z1 ]() ),
99 ztest_cutoff_2_( basic::options::option[ basic::options::OptionKeys::motifs::z2 ]() ),
100 rmsd_cutoff_1_( basic::options::option[ basic::options::OptionKeys::motifs::r1 ]() ),
101 rmsd_cutoff_2_( basic::options::option[ basic::options::OptionKeys::motifs::r2 ]() ),
102 dtest_cutoff_( basic::options::option[ basic::options::OptionKeys::motifs::dtest ]() ),
103 rot_level_( basic::options::option[ basic::options::OptionKeys::motifs::rotlevel ]() ),
104 minimize_( basic::options::option[ basic::options::OptionKeys::motifs::minimize ]() )
110 utility::pointer::ReferenceCount( src )
151 position != input_BPs.end(); ++position ) {
152 ms_tr <<
"In run, Design position: " << *position << std::endl;
166 utility::io::ozstream motif_output_file;
169 target_positions_sphere =
get_sphere_aa( pose, ligand_motif_sphere ) ;
176 Pose & pose2 =
const_cast< Pose &
>( pose );
177 Size const ligand_marker = 0;
178 ms_tr <<
"Motif search has already run, we will get rotamers from output file" << std::endl;
181 ir != end_ir; ++ir ) {
189 ms_tr <<
"Loading BPData, but also loaded a MotifLibrary of all motifs. Probably not a problem for ligand motifs (we will always hit this condition)" << std::endl;
194 ms_tr <<
"Starting motif search" << std::endl;
204 ms_tr <<
"You didn't give a -motifs:output filename, but we need that for storage! Please specify a filename." << std::endl;
220 utility::io::ozstream motif_output_file;
226 target_positions.push_back(i);
234 Pose & pose2 =
const_cast< Pose &
>( pose );
235 Size const ligand_marker = 0;
236 ms_tr <<
"Motif search has already run, we will get rotamers from output file" << std::endl;
239 ir != end_ir; ++ir ) {
247 ms_tr <<
"Loading BPData, but also loaded a MotifLibrary of all motifs. Probably not a problem for ligand motifs (we will always hit this condition)" << std::endl;
252 ms_tr <<
"Starting motif search" << std::endl;
262 std::set< core::Size > src_pos;
268 std::set< std::string > name3set;
273 if ( ! motif_rotamers.empty() ) {
274 ms_tr <<
"yes, we have motif rotamers for this position!" << std::endl;
277 variant_rotamers.push_back( variant_rot );
279 name3set.insert( (motif_rotamers[rot])->name3() );
283 ms_rsoop->set_new_rots( variant_rotamers );
288 ms_tr <<
"no motif rotamers for this position" << std::endl;
296 ms_tr <<
"You didn't give a -motifs:output filename, but we need that for storage! Please specify a filename." << std::endl;
328 position != input_BPs.end(); ++position ) {
329 ms_tr <<
"In init, Design position: " << *position << std::endl;
342 if ( ! input_BPs.empty() ) {
343 for(
Size i(1); i <= input_BPs.size(); ++i ) {
347 ms_tr <<
"Didn't give any BPs, so I'm gonna quit." << std::endl;
360 utility::io::ozstream motif_output_file;
361 utility::io::ozstream data_output_file;
362 utility::io::ozstream qd_output_file;
371 motif_filename.erase( motif_filename.end()-4, motif_filename.end() );
372 std::string qd_output_filename = motif_filename +
".qd_motifs";
373 qd_output_file.open_append( qd_output_filename );
377 using namespace core;
378 using namespace ObjexxFCL;
379 using namespace pose;
380 using namespace chemical;
381 using namespace scoring;
382 using namespace optimization;
385 int ligand_resi_number = 0;
393 for(
int lig_pos = 1 ; lig_pos <= nres ; ++lig_pos ) {
396 if( !lig_type.is_ligand() )
continue;
397 ms_tr <<
"in ligand splitter block, found my ligand, lig_pos is " << lig_pos << std::endl;
398 ligand_resi_number = lig_pos;
405 for(
core::Size atom_i = 1; atom_i <= ligres->natoms(); ++atom_i) {
408 std::string const atom_name = ligres->atom_name(atom_i);
409 if( ligres->atom_is_hydrogen(atom_i) ) {
continue; }
414 for(
core::Size atom_j = 1; atom_j <= atom_i_connects.size(); ++ atom_j ) {
415 if( ligres->atom_is_hydrogen(atom_i_connects[atom_j]) ) {
continue; }
420 for(
core::Size atom_k = 1; atom_k <= atom_j_connects.size(); ++ atom_k ) {
421 if( ligres->atom_is_hydrogen(atom_j_connects[atom_k]) ) {
continue; }
425 std::string atom_i_name = atom_i_type.atom_type_name();
433 if ( atom_i != atom_j_connects[atom_k] ) {
439 atom_i_vector.push_back( atom_i );
440 atom_i_vector.push_back( atset->atom_type_index( ligres->atom_type(atom_i).atom_type_name() ) );
443 atom_j_vector.push_back( atom_i_connects[atom_j] );
444 atom_j_vector.push_back( atset->atom_type_index( ligres->atom_type(atom_i_connects[atom_j]).atom_type_name() ) );
447 atom_k_vector.push_back( atom_j_connects[atom_k] );
448 atom_k_vector.push_back( atset->atom_type_index( ligres->atom_type(atom_j_connects[atom_k]).atom_type_name() ) );
450 cur_motif_indices.push_back( atom_i_vector);
451 cur_motif_indices.push_back( atom_j_vector);
452 cur_motif_indices.push_back( atom_k_vector);
457 bool current_is_duplicate (
false );
458 if ( !motif_indices_list.empty() ) {
459 for(
core::Size cur_motif_check = 1; cur_motif_check <= motif_indices_list.size(); ++ cur_motif_check) {
464 for(
core::Size slice_parent = 1; slice_parent <= 3; ++ slice_parent) {
465 cur_mainlist.push_back( cur_mainlist_parent[slice_parent][1] ); }
466 for(
core::Size slice_cur = 1; slice_cur <= 3; ++ slice_cur) {
467 cur_index.push_back( cur_motif_indices[slice_cur][1] ); }
470 std::sort( sort_from_mainlist.begin(), sort_from_mainlist.end() );
471 std::sort( sort_from_curindex.begin(), sort_from_curindex.end() );
472 if ( sort_from_mainlist[1] == sort_from_curindex[1] && sort_from_mainlist[2] == sort_from_curindex[2] && sort_from_mainlist[3] == sort_from_curindex[3] ) {
473 current_is_duplicate =
false;
478 all_motif_indices.push_back( cur_motif_indices );
480 if ( !current_is_duplicate ) {
481 motif_indices_list.push_back( cur_motif_indices );
487 std::cout <<
"Total 3 atoms in unpruned indices list is: " << all_motif_indices.size() << std::endl;
488 for(
int prot_pos = 1 ; prot_pos <= nres ; ++prot_pos ) {
490 if( !prot_type.is_protein() )
continue;
491 if( pose.
residue( prot_pos ).
name3() ==
"GLY" )
continue;
494 std::map< Real, Size > contacts;
495 std::map< Real, Size > distance_sorter;
498 for(
int lig_pos = 1 ; lig_pos <= nres ; ++lig_pos ) {
501 if( !lig_type.is_ligand() )
continue;
528 motifcop_itr != end_itr; ++motifcop_itr ) {
531 int motif_atom1_int(motifcop->res2_atom1_int());
532 int motif_atom2_int(motifcop->res2_atom2_int());
533 int motif_atom3_int(motifcop->res2_atom3_int());
536 for(
core::Size cur_lig_trip = 1; cur_lig_trip <= motif_indices_list.size(); ++ cur_lig_trip) {
537 int ligand_atom1_int(motif_indices_list[cur_lig_trip][1][2]);
538 int ligand_atom2_int(motif_indices_list[cur_lig_trip][2][2]);
539 int ligand_atom3_int(motif_indices_list[cur_lig_trip][3][2]);
544 motif_atom1_int == ligand_atom1_int && motif_atom2_int == ligand_atom2_int && motif_atom3_int == ligand_atom3_int ) {
548 pruned_motif_library.push_back(motifcop);
556 Size motif_library_size = pruned_motif_library.size();
557 Size motif_percent_chunk;
558 double double_chunk = std::floor( (
double) motif_library_size / 10 ) ;
559 motif_percent_chunk =
Size ( double_chunk );
561 ms_tr <<
"Pruned motifs: " << motif_library_size << std::endl;
569 ir != end_ir; ++ir ) {
570 Size motif_counter=0;
571 Size motif_percent=0;
572 Size next_motif_percent = motif_percent_chunk;
578 std::map< std::string, std::map< Real, MotifHitOP > > best_mhits_all;
581 if ( ! ((*ir)->best_rotamers()).empty() )
continue;
582 ms_tr <<
"WORKING ON PROTEIN POSITION " << (*ir)->seqpos() << std::endl;
583 ms_tr <<
"NATIVE AA IS " << pose.
residue( (*ir)->seqpos() ).name3() << std::endl;
586 std::map< Real, std::string > rmsd_list;
589 MotifCOPs bp_best_motifs( (*ir)->best_motifs() );
594 Size seqpos( (*ir)->seqpos() );
595 std::stringstream firstline;
596 firstline <<
"POSITION " << seqpos;
598 motif_output_file << firstline.str() <<
"\n";
601 data_output_file << firstline.str() <<
"\n";
604 qd_output_file << firstline.str() <<
"\n";
608 std::map< core::Size, core::pack::rotamer_set::RotamerSetOP > rotamer_sets;
609 if( bp_best_rotamers.empty() ) {
613 bool bump_yes(
true );
616 rotamer_sets[i] = rotset;
619 Size bp_rots( bp_best_rotamers.size() );
623 for(
Size r(1); r <= bp_rots; ++r ) {
625 rotset->add_rotamer( *((bp_best_rotamers)[r]) );
628 rotamer_sets[i] = rotset;
633 for( protocols::motifs::MotifCOPs::const_iterator motifcop_itr = pruned_motif_library.begin(), end_itr = pruned_motif_library.end();
634 motifcop_itr != end_itr; ++motifcop_itr ) {
636 if ( motif_counter == next_motif_percent ) {
637 next_motif_percent = motif_percent_chunk + next_motif_percent ;
638 motif_percent = 10 + motif_percent;
639 ms_tr <<
"On motif number: " << motif_counter <<
" and we are " << motif_percent <<
"% through library" << std::endl;
644 bool passed_quick_and_dirty(
false);
653 std::set< std::string > allowedtypes( (*ir)->allowed_types() );
660 rmsd_cutoff_1 = (rmsd_cutoff_1 / 2.0 );
661 rmsd_cutoff_2 = (rmsd_cutoff_2 / 2.0 );
662 dtest_cutoff = (dtest_cutoff / 2.0 );
664 if( ( (motifcop->restype_name1() ==
"MET") || (motifcop->restype_name1() ==
"LYS") || (motifcop->restype_name1() ==
"GLU") || (motifcop->restype_name1() ==
"GLN") ) && ( !
quick_and_dirty_ ) ) {
665 rmsd_cutoff_1 = (rmsd_cutoff_1 / 1.33 );
666 rmsd_cutoff_2 = (rmsd_cutoff_2 / 1.33 );
667 dtest_cutoff = (dtest_cutoff / 1.33 );
692 bool automorphism(
false);
693 bool passed_automorphism(
false);
695 motifcop->restype_name1() ==
"ASP" ||
696 motifcop->restype_name1() ==
"GLU" ||
697 motifcop->restype_name1() ==
"PHE" ||
698 motifcop->restype_name1() ==
"LEU" ||
699 motifcop->restype_name1() ==
"ARG" ||
700 motifcop->restype_name1() ==
"TYR" ||
701 motifcop->restype_name1() ==
"VAL"
709 if( allowedtypes.empty() ) {
712 for( std::set< std::string >::const_iterator ir2(allowedtypes.begin() ), end_ir2( allowedtypes.end() );
713 ir2 != end_ir2; ++ir2 ) {
714 if( (*ir2) == motifcop->restype_name1() ) {
718 if( ! allowed )
continue;
728 bool noconformers(
false );
729 if( DNAResidueOPs.empty() ) {
737 std::pair< core::conformation::ResidueOP, core::conformation::ResidueOP > bestpair;
738 bool b_bestpair(
false );
739 Size rs1( rotset->num_rotamers() );
741 Real rmsdtest_ir2(100.0);
759 curtrip !=
end; ++curtrip ) {
768 int motif_atom1_int(motifcop->res2_atom1_int());
769 int motif_atom2_int(motifcop->res2_atom2_int());
770 int motif_atom3_int(motifcop->res2_atom3_int());
772 int ligand_atom1_int( deref_trip[1][2]);
773 int ligand_atom2_int( deref_trip[2][2]);
774 int ligand_atom3_int( deref_trip[3][2]);
777 motif_atom1_int == ligand_atom1_int && motif_atom2_int == ligand_atom2_int && motif_atom3_int == ligand_atom3_int )
814 for(
Size ir2(1); ir2 <= rs1; ++ir2 ) {
820 Size trip_atom_1(deref_trip[1][1]);
821 Size trip_atom_2(deref_trip[2][1]);
822 Size trip_atom_3(deref_trip[3][1]);
826 atoms.push_back(trip_atom_1);
827 atoms.push_back(trip_atom_2);
828 atoms.push_back(trip_atom_3);
831 motifcop->place_atom( *(rotset->nonconst_rotamer(ir2)), *check_ligand, atm, trip_atom_1, trip_atom_2, trip_atom_3, trip_atom_2 );
833 motifcop->place_atom( *(rotset->nonconst_rotamer(ir2)), *check_ligand, auto_atm, trip_atom_1, trip_atom_2, trip_atom_3, trip_atom_2,
false );
837 Real dtest1( atm.xyz().distance( posecopy.
residue( ligand_resi_number ).
xyz( deref_trip[2][1] ) ) );
839 Real dtest1_auto(100);
841 dtest1_auto = ( auto_atm.xyz().distance( posecopy.
residue( ligand_resi_number ).
xyz( deref_trip[2][1] ) ) );
847 if( ! automorphism ) {
848 if( dtest1 > dtest_cutoff )
continue;
850 if( dtest1 > dtest_cutoff && dtest1_auto > dtest_cutoff )
continue;
851 if( dtest1 < dtest_cutoff && dtest1_auto < dtest_cutoff ) {
852 if( dtest1_auto < dtest1 ) {
853 passed_automorphism =
true;
855 passed_automorphism =
false;
857 }
else if( dtest1_auto < dtest_cutoff ) {
858 passed_automorphism =
true;
860 passed_automorphism =
false;
867 if( passed_automorphism ) {
869 motifcop->place_atoms( *(rotset->nonconst_rotamer(ir2)), *posebase, atoms, trip_atom_1, trip_atom_2, trip_atom_3,
false );
872 motifcop->place_atoms( *(rotset->nonconst_rotamer(ir2)), *posebase, atoms, trip_atom_1, trip_atom_2, trip_atom_3 );
876 qd_output_file << *motifcop;
877 passed_quick_and_dirty =
true;
881 if( rmsdtest > rmsd_cutoff_1 )
continue;
885 rmsdtest_ir2 = rmsdtest;
886 if( rmsdtest < test ) {
888 bestpos = deref_trip;
889 posecopy2 = posecopy;
892 if( passed_quick_and_dirty )
break;
894 if( passed_quick_and_dirty )
break;
895 if( ! tftest )
continue;
898 MotifHitOP motifhit =
new MotifHit( *motifcop, ligand_resi_number, passed_automorphism );
903 if( passed_automorphism ) {
904 motifcop->place_residue(*(rotset->nonconst_rotamer(ir2)), *posebase2,trip_atom_1, trip_atom_2, trip_atom_3 ,
false );
906 motifcop->place_residue(*(rotset->nonconst_rotamer(ir2)), *posebase2,trip_atom_1, trip_atom_2, trip_atom_3 );
908 Real rmsdtest2 = rmsdtest;
910 Real finaltest = ( ( rmsdtest2) );
915 if( (rmsdtest_ir2 < rmsd_cutoff_2) ) {
917 rmsd_list[rmsdtest_ir2] = motifcop->restype_name1() ;
920 data_output_file <<
"Passed 759! RMSD between DNA resi (rosetta #), no conformers " << ligand_resi_number <<
" and motif DNA = " << rmsdtest_ir2 <<
" and combined score = " << finaltest <<
" for residue type " << motifcop->restype_name1() <<
", rotamer # " << ir2 <<
", motif named " << motifcop->remark() << std::endl;
922 motifhit->final_test( finaltest );
923 motifhit->build_rotamer( *(rotset->nonconst_rotamer(ir2) ) );
924 motifhit->target_conformer( *posebase2 );
925 best_mhits_all[motifcop->restype_name1()][finaltest] = motifhit->clone();
926 if ( finaltest <
final ) {
928 bestpair = std::make_pair( (rotset->nonconst_rotamer(ir2))->
clone(), posebase2->clone() );
933 for( core::conformation::ResidueOPs::const_iterator resop( DNAResidueOPs.begin() ),
end( DNAResidueOPs.end() );
934 resop !=
end; ++resop ) {
935 if( passed_automorphism ) {
936 motifcop->place_residue(*(rotset->nonconst_rotamer(ir2)), **resop, trip_atom_1, trip_atom_2, trip_atom_3 ,
false );
938 motifcop->place_residue(*(rotset->nonconst_rotamer(ir2)), **resop,trip_atom_1, trip_atom_2, trip_atom_3 );
940 Real rmsdtest2 = rmsdtest;
942 if( rmsdtest2 > rmsd_cutoff_2 )
continue;
943 Real finaltest = ( ( rmsdtest2 * 100 ) );
944 Real finaltestc = ( ( rmsdtest_ir2 * 100 ) );
947 if( (rmsdtest2 < rmsd_cutoff_2) ) {
948 rmsd_list[rmsdtest2] = motifcop->restype_name1() ;
952 data_output_file <<
"Passed 783! RMSD between DNA resi (rosetta #) " << ligand_resi_number <<
" and motif DNA = " << rmsdtest2 <<
" and combined score = " << finaltest <<
" for residue type " << motifcop->restype_name1() <<
", rotamer # " << ir2 <<
", motif named " << motifcop->remark() << std::endl;
954 motifhit->final_test( finaltest );
955 motifhit->build_rotamer( *(rotset->nonconst_rotamer(ir2) ) );
956 motifhit->target_conformer( **resop );
957 best_mhits_all[motifcop->restype_name1()][finaltestc] = motifhit->clone();
958 if ( finaltest <
final ) {
960 bestpair = std::make_pair( (rotset->nonconst_rotamer(ir2))->
clone(), (*resop)->clone() );
975 std::stringstream pose2_name_full;
976 if( passed_automorphism ) {
977 pose2_name_full <<
"Test_auto_" << motifcop->restype_name2()[0] <<
"_" << (*ir)->seqpos() << motifcop->restype_name1() <<
"_" << motifcop->remark() <<
".pdb";
979 pose2_name_full <<
"Test_" << motifcop->restype_name2()[0] <<
"_" << (*ir)->seqpos() << motifcop->restype_name1() <<
"_" << motifcop->remark() <<
".pdb";
985 if( ! best_mhits_all.empty() ) {
987 for( std::map<
std::string, std::map< Real, MotifHitOP > >::const_iterator bh( best_mhits_all.begin() ),
988 end( best_mhits_all.end() ); bh !=
end; ++bh ) {
990 for( std::map< Real, MotifHitOP >::const_iterator bh2( (bh->second).begin() ),
991 end2( (bh->second).end() ); bh2 != end2; ++bh2 ) {
994 (*ir)->keep_rotamer( *(motifhitop->build_rotamer()) );
998 using namespace core::scoring;
1015 if( motifhitop->passed_automorphism() ) {
1016 (motifhitop->motifcop())->place_residue( pose_dump.
residue( motifhitop->vbpos() ), *build_rotamer, trip_atom_1, trip_atom_2, trip_atom_3 ,
false );
1018 (motifhitop->motifcop())->place_residue( pose_dump.
residue( motifhitop->vbpos() ), *build_rotamer, trip_atom_1, trip_atom_2, trip_atom_3 );
1037 score_fxn->set_energy_method_options( options );
1049 movemap->set_chi( (*ir)->seqpos(), true );
1051 minmover->apply( pose_dump );
1054 ms_tr <<
"After sidechain refinement constraints score is " << sc_constraint_check << std::endl;
1077 pose_dump.
replace_residue( (*ir)->seqpos(), *(motifhitop->build_rotamer()),
true );
1078 (*ir)->keep_rotamer( (pose_dump.
residue((*ir)->seqpos())) );
1081 motif_output_file << *(motifhitop->motifcop());
1082 motif_output_file <<
"RESIDUE " << (pose_dump.
residue((*ir)->seqpos()));
1092 ms_tr <<
"RMSD, amino acid" << std::endl;
1093 for( std::map< Real, std::string >::const_iterator rmsd_it( rmsd_list.begin() ),
end( rmsd_list.end() ); rmsd_it !=
end; ++rmsd_it ) {
1094 ms_tr << rmsd_it->first <<
", " << rmsd_it->second << std::endl;
1099 motif_output_file.close();
1102 data_output_file.close();
1105 qd_output_file.close();
1114 ir != end_ir; ++ir ) {
1115 if ( ! ((*ir)->best_rotamers()).empty() ) {
1116 best_rotamers = (*ir)->best_rotamers();
1119 return best_rotamers;
1128 ir != end_ir; ++ir ) {
1129 if( (*ir)->seqpos() != seqpos )
continue;
1130 if ( ! ((*ir)->best_rotamers()).empty() ) {
1131 best_rotamers = (*ir)->best_rotamers();
1133 ms_tr <<
"There were no rotamers to be included for position " << seqpos << std::endl;
1136 return best_rotamers;
1143 using namespace core::chemical;
1145 bool protein_dna(
false );
1152 if ( ( res1->is_protein() && res2->is_DNA() ) || ( res2->is_protein() && res1->is_DNA() ) ) {
1156 ms_tr <<
"MotifLibrary has not been initialized yet, cannot yet identify the type of motifs being used, assuming protein-DNA with possible disastrous consequences." << std::endl;
1188 ms_tr <<
"ERROR! These motifs are not protein-DNA, need to add another else if statement that allows for a different type of interface finding function." << std::endl;
1200 using namespace core;
1201 using namespace ObjexxFCL;
1202 using namespace pose;
1203 using namespace chemical;
1204 using namespace scoring;
1205 using namespace optimization;
1208 std::set< core::Size > interface_target_res;
1209 for(
int lig_pos = 1 ; lig_pos <= nres ; ++lig_pos ) {
1213 if( lig_type.is_ligand() ) {
1214 ms_tr <<
"in get_sphere_aa, found my ligand, lig_pos is " << lig_pos << std::endl;
1215 interface_target_res.insert( lig_pos) ;
1230 for( std::set< core::Size >::const_iterator targ_it( interface_target_res.begin()),targ_end(interface_target_res.end());
1231 targ_it != targ_end; ++targ_it ) {
1244 if( prot_rsd.
has(
"CB") ) prot_cb = prot_rsd.
xyz(
"CB");
1245 if( prot_rsd.
has(
"CA") ) prot_ca = prot_rsd.
xyz(
"CA");
1246 core::Real ca_dist2 = targ_rsd.
xyz(k).distance_squared( prot_ca );
1247 if( ca_dist2 <= cut4_sq ) {
1248 if( ca_dist2 <= cut3_sq ) {
1249 if( ca_dist2 <= cut2_sq ) {
1250 if( ca_dist2 <= cut1_sq) {
1251 sphere_resi.push_back(i);
1254 else if( prot_rsd.
has(
"CB") ) {
1255 core::Real cb_dist2 = targ_rsd.
xyz(k).distance_squared( prot_cb );
1257 if( cb_dist2 < ca_dist2 ) {
1258 sphere_resi.push_back(i);
1262 else if ( prot_rsd.
has(
"2HA") ) {
1264 prot_cb = prot_rsd.
xyz(
"2HA");
1265 core::Real cb_dist2 = targ_rsd.
xyz(k).distance_squared( prot_cb );
1266 if( cb_dist2 < ca_dist2 ) {
1267 sphere_resi.push_back(i);
1272 ms_tr <<
"Weird residue without CB or 2HA. Watch out! Residue: " << i << std::endl;
1282 ms_tr <<
"Finished sphere check ok" << std::endl;
1321 for ( Sizes::const_iterator pos( positions.begin() ),
end( positions.end() );
1322 pos !=
end; ++pos ) {
1325 std::set< std::string > allowed_types;
1331 ms_tr <<
"ERROR! These motifs are not protein-DNA, need to add another else if statement that allows for a different type of interface finding function." << std::endl;
1343 std::set< std::string > allowed_types;
1358 std::map< Size, std::set< std::string > > mappositions(
defs2map( pose, defs ) );
1359 for ( std::map<
Size, std::set< std::string > >::const_iterator it( mappositions.begin() ),
1360 end( mappositions.end() ); it !=
end; ++it ) {
1365 ms_tr <<
"ERROR! These motifs are not protein-DNA, need to add another else if statement that allows for a different type of interface finding function." << std::endl;
1377 std::map< Size, std::set< std::string > > mappositions(
defs2map( pose, defs ) );
1378 for ( std::map<
Size, std::set< std::string > >::const_iterator it( mappositions.begin() ),
1379 end( mappositions.end() ); it !=
end; ++it ) {
1380 Size test(it->first);
1386 ms_tr <<
"ERROR! These motifs are not protein-DNA, need to add another else if statement that allows for a different type of interface finding function." << std::endl;
1392 std::map<
Size, std::set< std::string > > mappositions
1396 for ( std::map<
Size, std::set< std::string > >::const_iterator it( mappositions.begin() ),
1397 end( mappositions.end() ); it !=
end; ++it ) {
1398 positions.push_back( it->first );
1412 bps.push_back( bp );
1420 Sizes & build_positions,
1425 if ( ! target_positions.empty() ) {
1428 for ( protocols::dna::DnaNeighbors::const_iterator itr( protein_neighbors.begin() ),
1429 end( protein_neighbors.end() ); itr !=
end; ++itr ) {
1430 if ( (*itr).second.contact() ) {
1431 build_positions.push_back( itr->first );
1432 ms_tr <<
"Positions being targeted for motif design " << itr->first << std::endl;
1442 Sizes & build_positions,
1449 if ( ! build_positions.empty() ) {
1452 for ( protocols::dna::DnaNeighbors::const_iterator itr( dna_neighbors.begin() ),
1453 end( dna_neighbors.end() ); itr !=
end; ++itr ) {
1454 if ( (*itr).second.contact() ) {
1455 short_tl.push_back( itr->first );
1456 ms_tr <<
"Positions (DNA) being targeted for motif design " << itr->first << std::endl;
1484 ztest_cutoff_1_ = basic::options::option[ basic::options::OptionKeys::motifs::z1 ]();
1485 ztest_cutoff_2_ = basic::options::option[ basic::options::OptionKeys::motifs::z2 ]();
1486 rmsd_cutoff_1_ = basic::options::option[ basic::options::OptionKeys::motifs::r1 ]();
1487 rmsd_cutoff_2_ = basic::options::option[ basic::options::OptionKeys::motifs::r2 ]();
1488 dtest_cutoff_ = basic::options::option[ basic::options::OptionKeys::motifs::dtest ]();
1489 rot_level_ = basic::options::option[ basic::options::OptionKeys::motifs::rotlevel ]();
1497 for( protocols::motifs::MotifCOPs::const_iterator motifcop_itr = motiflibrary.
begin(), end_itr = motiflibrary.
end();
1498 motifcop_itr != end_itr; ++motifcop_itr ) {
1508 if( basic::options::option[ basic::options::OptionKeys::motifs::BPData ].user() ) {
1510 bpdata_filename_ = basic::options::option[ basic::options::OptionKeys::motifs::BPData ]();
1514 if( basic::options::option[ basic::options::OptionKeys::motifs::output_file ].user() ) {
1515 output_filename_ = basic::options::option[ basic::options::OptionKeys::motifs::output_file ]();
1520 if( basic::options::option[ basic::options::OptionKeys::motifs::data_file ].user() ) {
1521 data_filename_ = basic::options::option[ basic::options::OptionKeys::motifs::data_file ]();
1526 if( (basic::options::option[ basic::options::OptionKeys::motifs::quick_and_dirty ]).user() ) {
1531 if( (basic::options::option[ basic::options::OptionKeys::motifs::dump_motifs ]).user() ) {
1536 if( basic::options::option[ basic::options::OptionKeys::motifs::clear_bprots ].user() ) {
1541 if( basic::options::option[ basic::options::OptionKeys::motifs::rots2add ].user() ) {
1542 rots2add_ = basic::options::option[ basic::options::OptionKeys::motifs::rots2add ]();