41 #include <basic/datacache/BasicDataCache.hh>
42 #include <basic/datacache/DiagnosticData.hh>
43 #include <basic/options/option.hh>
44 #include <basic/options/keys/antibody.OptionKeys.gen.hh>
45 #include <basic/options/keys/constraints.OptionKeys.gen.hh>
46 #include <basic/options/keys/in.OptionKeys.gen.hh>
47 #include <basic/options/keys/out.OptionKeys.gen.hh>
48 #include <basic/options/keys/run.OptionKeys.gen.hh>
49 #include <basic/prof.hh>
50 #include <basic/Tracer.hh>
65 #include <ObjexxFCL/format.hh>
66 #include <ObjexxFCL/string.functions.hh>
67 using namespace ObjexxFCL::fmt;
76 static basic::Tracer
TR(
"protocols.antibody2.AntibodyModelerProtocol");
83 AntibodyModelerProtocol::AntibodyModelerProtocol() : Mover() {
101 Mover::type(
"AntibodyModelerProtocol" );
112 TR <<
"Setting Up defaults.........." << std::endl;
149 using namespace basic::options;
151 option.add_relevant( OptionKeys::antibody::model_h3 );
152 option.add_relevant( OptionKeys::antibody::snugfit );
153 option.add_relevant( OptionKeys::antibody::camelid );
154 option.add_relevant( OptionKeys::antibody::camelid_constraints );
155 option.add_relevant( OptionKeys::run::benchmark );
156 option.add_relevant( OptionKeys::constraints::cst_weight );
157 option.add_relevant( OptionKeys::constraints::cst_file );
158 option.add_relevant( OptionKeys::antibody::constrain_vlvh_qq );
159 option.add_relevant( OptionKeys::antibody::constrain_cter );
160 option.add_relevant( OptionKeys::in::file::native );
161 option.add_relevant( OptionKeys::antibody::refine_h3 );
162 option.add_relevant( OptionKeys::antibody::h3_filter );
163 option.add_relevant( OptionKeys::antibody::cter_insert );
164 option.add_relevant( OptionKeys::antibody::sc_min);
165 option.add_relevant( OptionKeys::antibody::rt_min);
166 option.add_relevant( OptionKeys::antibody::flank_residue_min);
168 option.add_relevant( OptionKeys::antibody::remodel);
169 option.add_relevant( OptionKeys::antibody::refine);
171 option.add_relevant( OptionKeys::antibody::h3_filter_tolerance);
172 option.add_relevant( OptionKeys::antibody::bad_nter);
181 using namespace basic::options;
182 using namespace basic::options::OptionKeys;
184 TR <<
"Start Reading and Setting Options ..." << std::endl;
186 if ( option[OptionKeys::antibody::model_h3].user() ){
187 set_ModelH3( option[OptionKeys::antibody::model_h3]() );
189 if ( option[ OptionKeys::antibody::snugfit ].user() ){
190 set_SnugFit( option[ OptionKeys::antibody::snugfit ]() );
192 if ( option[ OptionKeys::antibody::refine_h3 ].user() ){
193 set_refine_h3( option[ OptionKeys::antibody::refine_h3 ]() );
195 if ( option[ OptionKeys::antibody::cter_insert ].user() ){
200 if ( option[ OptionKeys::antibody::h3_filter ].user() ) {
201 set_H3Filter ( option[ OptionKeys::antibody::h3_filter ]() );
203 if ( option[ OptionKeys::antibody::h3_filter_tolerance ].user() ){
206 if ( option[ OptionKeys::antibody::flank_residue_min ].user() ) {
209 if ( option[ OptionKeys::run::benchmark ].user() ){
212 if ( option[ OptionKeys::constraints::cst_weight ].user() ) {
213 set_cst_weight( option[ OptionKeys::constraints::cst_weight ]() );
215 if ( option[ OptionKeys::constraints::cst_file].user() ){
218 if ( option[ OptionKeys::antibody::constrain_cter ].user() ){
221 if ( option[ OptionKeys::antibody::constrain_vlvh_qq ].user() ){
224 if ( option[ OptionKeys::antibody::sc_min ].user() ) {
225 set_sc_min( option[ OptionKeys::antibody::sc_min ]() );
227 if ( option[ OptionKeys::antibody::rt_min ].user() ) {
228 set_rt_min( option[ OptionKeys::antibody::rt_min ]() );
230 if ( option[ OptionKeys::antibody::remodel ].user() ) {
233 if ( option[ OptionKeys::antibody::refine ].user() ) {
236 if ( option[ OptionKeys::antibody::bad_nter].user() ){
237 set_bad_nter(option[ OptionKeys::antibody::bad_nter]() );
244 if ( option[ OptionKeys::in::file::native ].user() ) {
254 TR <<
"Finish Reading and Setting Options !!!" << std::endl;
289 using namespace protocols::moves;
296 return "AntibodyModelerProtocol";
319 TR <<
"Danger Will Robinson! Native is an impostor!" << std::endl;
320 TR <<
" 'native_pose' is just a copy of the 'input_pose' " << std::endl;
321 TR <<
" since you didn't sepcifiy the native pdb name"<<std::endl;
349 using namespace chemical;
351 using namespace scoring;
352 using namespace core::scoring::constraints;
353 using namespace protocols::moves;
389 if(
cter_insert_ ==
false) { model_cdrh3->turn_off_cter_insert(); }
390 if(
h3_filter_ ==
false) { model_cdrh3->turn_off_H3_filter(); }
392 model_cdrh3->apply( pose );
400 if(
sc_min_) cdrs_min_pack_min->set_sc_min(
true);
401 if(
rt_min_) cdrs_min_pack_min->set_rt_min(
true);
402 cdrs_min_pack_min ->
apply(pose);
411 if(
sc_min_) { refine_beta_barrel->set_sc_min(
true); }
412 if(
rt_min_) { refine_beta_barrel->set_rt_min(
true); }
413 refine_beta_barrel->apply(pose);
423 cdr_highres_refine_ -> set_h3_filter(
h3_filter_);
427 cdr_highres_refine_ -> pass_start_pose(start_pose_);
428 cdr_highres_refine_ ->
apply(pose);
433 cdrs_min_pack_min ->
apply(pose);
457 ( *loop_scorefxn_highres_ )( pose );
465 TR<<
" atom_pair_constraint_score= "<<atom_pair_constraint_score<<std::endl;
466 TR<<
" dihedral_constraint_score= "<<dihedral_constraint_score<<std::endl;
488 TR<<
"Antibody Modeling Protocol Finished!!!!"<<std::endl<<std::endl<<std::endl;
509 Size H1_Cys(0), H3_Cys(0);
511 if( pose.
residue( pose.
pdb_info()->pdb2pose(
'H',32 ) ).name3() ==
"CYS" ){
512 H1_Cys = pose.
pdb_info()->pdb2pose(
'H', 32 );
514 else if( pose.
residue( pose.
pdb_info()->pdb2pose(
'H',33 ) ).name3() ==
"CYS" ){
515 H1_Cys = pose.
pdb_info()->pdb2pose(
'H', 33 );
524 if( ( H1_Cys != 0 ) && ( H3_Cys != 0 ) ){
525 TR <<
"CONSTRAINTS: "<<
"AtomPair CA " << H1_Cys <<
" CA " << H3_Cys
526 <<
" BOUNDED 4.0 6.1 0.6 BOND; mean 5.6 sd 0.6" << std::endl;
531 Size hfr_46(0), h3_closest(0);
532 hfr_46 = pose.
pdb_info()->pdb2pose(
'H', 46 );
534 if( h3_closest != 0 ) {
535 TR <<
"CONSTRAINTS: " <<
"AtomPair CA " << hfr_46 <<
" CA " << h3_closest
536 <<
" BOUNDED 6.5 9.1 0.7 DISTANCE; mean 8.0 sd 0.7" << std::endl;
561 using namespace ObjexxFCL::fmt;
565 out <<
"////////////////////////////////////////////////////////////////////////////////" << std::endl;
566 out << line_marker << std::endl;
567 out << line_marker <<
A( 47,
"Rosetta 3 Antibody Modeler" ) << space( 27 ) << line_marker << std::endl;
568 out << line_marker << space( 74 ) << line_marker << std::endl;
571 out << line_marker <<
" camelid : " << ab_m.
camelid_ << std::endl;
572 out << line_marker << std::endl;
573 out << line_marker <<
" ****** model_h3 : " << ab_m.
model_h3_ << std::endl;
574 out << line_marker <<
" h3_perturb_type = '"<< ab_m.
h3_perturb_type_<<
"'"<< std::endl;
575 out << line_marker <<
" cter_insert = " << ab_m.
cter_insert_ << std::endl;
576 out << line_marker <<
" h3_filter = " << ab_m.
h3_filter_ << std::endl;
577 out << line_marker << std::endl;
578 out << line_marker <<
" ****** snugfit : " << ab_m.
snugfit_ << std::endl;
579 out << line_marker <<
" LH_repulsive_ramp = " << ab_m.
LH_repulsive_ramp_ << std::endl;
580 out << line_marker << std::endl;
581 out << line_marker <<
" ****** refine_h3 : " << ab_m.
refine_h3_ << std::endl;
582 out << line_marker <<
" h3_refine_type = '"<< ab_m.
h3_refine_type_<<
"'" << std::endl;
583 out << line_marker <<
" h3_filter = " << ab_m.
h3_filter_ << std::endl;
585 out << line_marker << std::endl;
586 out <<
"////////////////////////////////////////////////////////////////////////////////" << std::endl;