Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RNA_DeNovoProtocol.cc
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file RNA de novo fragment assembly
11 /// @brief protocols that are specific to RNA_DeNovoProtocol
12 /// @detailed
13 /// @author Rhiju Das, Parin Sripakdeevong, Fang-Chieh Chou
14 
15 
16 // Unit headers
18 
19 // Package headers
35 #include <protocols/swa/StepWiseUtil.hh> //move this to toolbox/
38 
39 // Project headers
43 #include <core/scoring/rms_util.hh>
52 #include <core/id/AtomID_Map.hh>
53 #include <core/id/AtomID.hh>
54 #include <core/id/DOF_ID.hh>
56 #include <core/pose/Pose.hh>
57 #include <basic/database/open.hh>
61 #include <core/io/pdb/pose_io.hh>
63 // AUTO-REMOVED #include <protocols/viewer/viewers.hh>
66 
67 #include <core/scoring/Energies.hh>
69 
70 #include <utility/file/file_sys_util.hh>
71 
72 #include <core/types.hh>
73 #include <basic/Tracer.hh>
74 
75 #include <numeric/random/random.hh>
76 // AUTO-REMOVED #include <numeric/conversions.hh>
77 
78 // option key includes
79 #include <basic/options/option.hh>
80 #include <basic/options/keys/score.OptionKeys.gen.hh>
81 #include <basic/options/keys/rna.OptionKeys.gen.hh>
82 
83 // External library headers
84 
85 //C++ headers
86 #include <vector>
87 #include <list>
88 #include <string>
89 #include <sstream>
90 #include <fstream>
91 #ifdef WIN32
92 #include <ctime>
93 #endif
94 
95 //Auto Headers
97 #include <utility/vector1.hh>
98 #include <ObjexxFCL/format.hh>
99 
100 //Auto using namespaces
101 namespace ObjexxFCL { namespace fmt { } } using namespace ObjexxFCL::fmt; // AUTO USING NS
102 //Auto using namespaces end
103 
104 
105 using namespace core;
106 
107 namespace protocols {
108 namespace rna {
109 
110 static numeric::random::RandomGenerator RG(12320); // <- Magic number, do not change it!
111 
112 static basic::Tracer TR( "protocols.rna.rna_denovo_protocol" ) ;
113 
114 RNA_DeNovoProtocol::RNA_DeNovoProtocol(
115  Size const nstruct,
116  std::string const silent_file,
117  bool const heat_structure /*= true*/,
118  bool const minimize_structure /*= false*/,
119  bool const relax_structure /*=false*/,
120  bool const allow_bulge /*=false*/):
121  Mover(),
122  nstruct_( nstruct ),
123  monte_carlo_cycles_( 0 ), /* will be reset later */
124  monte_carlo_cycles_max_default_( 100000 ),
125  user_defined_cycles_( false ), /* will change to true if set_monte_carlo_cycles() is called */
126  all_rna_fragments_file_( basic::database::full_name("chemical/rna/RICHARDSON_RNA09.torsions") ),
127  silent_file_( silent_file ),
128  lores_silent_file_( "" ),
129  heat_structure_( heat_structure ),
130  dump_pdb_( false ), //RHIJU DO NOT CHECK THIS IN AS TRUE!
131  minimize_structure_( minimize_structure ),
132  relax_structure_( relax_structure ),
133  ignore_secstruct_( false ),
134  do_close_loops_( true ),
135  close_loops_at_end_( true ),
136  close_loops_in_last_round_( true ),
137  close_loops_after_each_move_( false ),
138  simple_rmsd_cutoff_relax_( false ),
139  allow_bulge_( allow_bulge ),
140  allow_consecutive_bulges_( false ),
141  use_chem_shift_data_( basic::options::option[
142  basic::options::OptionKeys::
143  score::rna_chemical_shift_exp_data].user()),
144  m_Temperature_( 2.0 ),
145  frag_size_( 3 ),
146  rna_params_file_( "" ),
147  rna_data_file_( "" ),
148  jump_library_file_( basic::database::full_name("chemical/rna/1jj2_RNA_jump_library.dat" ) ),
149  rna_structure_parameters_( RNA_StructureParametersOP( new RNA_StructureParameters ) ),
150  rna_data_reader_( RNA_DataReaderOP( new RNA_DataReader ) ),
151  output_lores_silent_file_( false ),
152  filter_lores_base_pairs_( false ),
153  filter_lores_base_pairs_early_( false ),
154  filter_chain_closure_( true ),
155  filter_chain_closure_distance_( 6.0 ), /* in Angstroms. This is pretty loose!*/
156  filter_chain_closure_halfway_( true ),
157  vary_bond_geometry_( false ),
158  binary_rna_output_( false ),
159  jump_change_frequency_( 0.1 ),
160  lores_scorefxn_( "rna_lores.wts" ),
161  chunk_coverage_( 0.0 ),
162  staged_constraints_( false ),
163  chainbreak_weight_( -1.0 ), /* use rna_lores.wts number unless user specified. -1.0 is never really used. */
164  linear_chainbreak_weight_( -1.0 ), /* use rna_lores.wts number unless user specified. -1.0 is never really used. */
165  titrate_stack_bonus_( true ),
166  move_first_rigid_body_( false ),
167  root_at_first_rigid_body_( false ),
168  output_filters_( false ),
169  lores_score_early_( false ),
170  lores_score_final_( false ),
171  autofilter_( false ),
172  autofilter_score_quantile_( 0.20 )
173 {
174  Mover::type("RNA_DeNovoProtocol");
176  // rna_loop_closer_->fast_scan( true );
178 }
179 
180 /// @brief Clone this object
182  return new RNA_DeNovoProtocol(*this);
183 }
184 
185 //////////////////////////////////////////////////
187 {
188 }
189 
190 /// @details Apply the RNA de novo modeling protocol to a pose.
191 ///
193 
194  using namespace core::pose;
195  using namespace core::scoring;
196  using namespace core::io::pdb;
197  using namespace core::io::silent;
198  using namespace protocols::rna;
199 
200  ///////////////////////////////////////////////////////////////////////////
201  // A bunch of initialization
202  ///////////////////////////////////////////////////////////////////////////
203  ////////////////////////////////////////
204  // Some useful movers...
205  ////////////////////////////////////////
206  initialize_movers( pose );
207  if (dump_pdb_) pose.dump_pdb( "init.pdb" );
208 
209  // RNA score function (both low-res and high-res).
210  initialize_scorefxn( pose );
211 
212  //Keep a copy for resetting after each decoy.
213  Pose start_pose = pose;
214 
216  setup_monte_carlo_cycles( pose );
217 
218  // Some other silent file setup
221 
222 
223  Size max_tries( 1 );
224  if (filter_lores_base_pairs_ || filter_chain_closure_ ) max_tries = 10;
225 
226  ///////////////////////////////////////////////////////////////////////////
227  // Main Loop.
228  ///////////////////////////////////////////////////////////////////////////
229  for (Size n = 1; n <= nstruct_; n++ ) {
230 
231  std::string const out_file_tag = "S_"+lead_zero_string_of( n, 6 );
232  if (tag_is_done_[ out_file_tag ] ) continue;
233 
234  //bool do_close_loops_( false );
235  Size ntries( 0 );
236  bool found_good_decoy( false );
237 
238  while( ++ntries <= max_tries && !found_good_decoy ) {
239 
240  time_t pdb_start_time = time(NULL);
241 
242  if ( ntries > 1 ) TR << "Did not pass filters. Trying the model again: trial " << ntries << " out of " << max_tries << std::endl;
243 
244  pose = start_pose;
245  rna_structure_parameters_->setup_fold_tree_and_jumps_and_variants( pose );
246  rna_structure_parameters_->setup_base_pair_constraints( pose ); // needs to happen after setting cutpoint variants, etc.
247  rna_chunk_library_->initialize_random_chunks( pose ); //actually not random if only one chunk in each region.
249  rna_loop_closer_->apply( pose );
250  //do_close_loops_ = true; // set but never used ~Labonte
251  }
252 
253  if (dump_pdb_) dump_pdb( pose, "start.pdb" );
254 
255  if (heat_structure_ ) do_random_moves( pose );
256 
257  if (dump_pdb_) dump_pdb( pose, "random.pdb" );
258  monte_carlo_->reset( pose );
259 
260  TR << "Beginning main loop... " << std::endl;
261 
262  Size const rounds = 10; //for now.
263  frag_size_ = 3;
264 
265  for (Size r = 1; r <= rounds; r++ ) {
266 
267  TR << "Beginning round " << r << " of " << rounds << std::endl;
268 
269  if ( r == rounds && close_loops_in_last_round_ ) do_close_loops_ = true;
270 
271  //Keep score function coarse for early rounds.
272  update_denovo_scorefxn_weights( r, rounds );
273 
274  monte_carlo_->score_function( *denovo_scorefxn_ );
275 
276  pose = monte_carlo_->lowest_score_pose();
277 
278  // Introduce constraints in stages.
279  update_pose_constraints( r, rounds, pose );
280  monte_carlo_->reset( pose );
281 
282  // Finer and finer fragments
283  update_frag_size( r, rounds );
284 
285  // finer rigid body moves
286  setup_rigid_body_mover( pose, r, rounds ); // needs to happen after fold_tree is decided...
287 
288  //////////////////////
289  // This is it ... do the loop.
290  //////////////////////
291  for( Size i=1; i <= monte_carlo_cycles_/rounds ; ++i ) {
292  // Make this generic fragment/jump multimover next?
293  RNA_move_trial( pose );
294  }
295 
296  if ( get_native_pose() ) {
297  Real const rmsd = all_atom_rmsd( *get_native_pose(), pose );
298  TR << "All atom rmsd: " << rmsd << std::endl;
299  }
300 
301  monte_carlo_->recover_low( pose );
302  monte_carlo_->show_counters();
303  monte_carlo_->reset_counters();
304 
305  if ( r == 2 ) { //special 'early' stage
306  lores_score_early_ = (*denovo_scorefxn_)( pose );
308  bool const base_pairs_OK = rna_structure_parameters_->check_base_pairs( pose );
309  TR << "Checking base pairs early! Result: " << base_pairs_OK << std::endl;
310  if (!base_pairs_OK) break;
311  }
312  }
313  if ( r == rounds/2 ){ // halway point
315  Real const filter_chain_closure_distance_halfway = 2 * filter_chain_closure_distance_;
316  bool const rna_loops_OK = rna_loop_closer_->check_closure( pose, filter_chain_closure_distance_halfway );
317  TR << "Checking loop closure with tolerance of " << filter_chain_closure_distance_halfway << " Angstroms! Result: " << rna_loops_OK << std::endl;
318  if (!rna_loops_OK) break;
319  }
320  }
321  }
322 
323  pose = monte_carlo_->lowest_score_pose();
324  denovo_scorefxn_->show( std::cout, pose );
325 
326  time_t pdb_end_time = time(NULL);
327  TR << "Finished fragment assembly of " << out_file_tag << " in " << (long)(pdb_end_time - pdb_start_time) << " seconds." << std::endl;
328 
329  if (close_loops_at_end_) rna_loop_closer_->apply( pose, rna_structure_parameters_->connections() );
330 
331  found_good_decoy = true;
332  if (filter_chain_closure_) found_good_decoy = found_good_decoy && rna_loop_closer_->check_closure( pose, filter_chain_closure_distance_ );
333  if (filter_lores_base_pairs_) found_good_decoy = found_good_decoy && rna_structure_parameters_->check_base_pairs( pose );
334 
335  lores_score_final_ = (*denovo_scorefxn_)( pose );
336  if ( found_good_decoy /*important!*/ && autofilter_ ) found_good_decoy = found_good_decoy && check_score_filter( lores_score_final_, all_lores_score_final_ );
337  } // ++ntries <= max_tries && !found_good_decoy
338 
340 
341 
343 
344  rna_minimizer_->apply( pose );
345 
347  rna_loop_closer_->apply(
348  pose, rna_structure_parameters_->connections() );
349  }
350  }
351 
352  if(use_chem_shift_data_) apply_chem_shift_data(pose, out_file_tag);
353 
354  if(relax_structure_) rna_relaxer_->apply( pose );
355 
356  if(allow_bulge_){
357 
359 
360  if(use_chem_shift_data_) curr_scorefxn = chem_shift_scorefxn_;
361 
362  //Identify and virtual the bulge residues.
363  Size const num_res_virtualized =
365  pose, allowed_bulge_res_, curr_scorefxn, out_file_tag,
366  true /*allow_pre_virtualize*/, allow_consecutive_bulges_,
367  true /*verbose*/ );
368 
369  //rescore the pose to add in bulge pseudo-energy term
370  (*curr_scorefxn)( pose );
371 
372  }
373 
374  std::string const out_file_name = out_file_tag + ".pdb";
375  if (dump_pdb_) dump_pdb( pose, out_file_name );
376 
377  align_and_output_to_silent_file( pose, silent_file_, out_file_tag );
378 
379  } //nstruct
380 
381 }
382 
383 
384 ///////////////////////////////////////////////////////////////////////////////////////////////////////
387  return "RNA_DeNovoProtocol";
388 }
389 
390 
391 ///////////////////////////////////////////////////////////////////////////////////////////////////////
392 void
394 
395  using namespace core::scoring;
396 
397  // RNA low-resolution score function.
399 
400  initialize_constraints( pose );
401 
403 
405 
407 
408 
409  // RNA high-resolution score function.
410  hires_scorefxn_ = rna_minimizer_->clone_scorefxn();
411 
412 
413  // RNA high-resolution score function + rna_chem_shift term
415 
416  Real const CS_weight = 4.0; //hard-coded to 4.0 based on CS-ROSETTA-RNA work (Parin et al. 2012).
417 
419 
421 
422  chem_shift_scorefxn_->set_weight( rna_chem_shift, CS_weight );
423  }
424 
425 }
426 
427 ///////////////////////////////////////////////////////////////////////////////////////////////////////
428 void
430 
431  using namespace core::scoring;
432 
433  if (pose.constraint_set()->has_constraints() ) {
434  denovo_scorefxn_->set_weight( atom_pair_constraint, 1.0 );
435  denovo_scorefxn_->set_weight( coordinate_constraint, 1.0 ); // now useable in RNA denovo!
436  constraint_set_ = pose.constraint_set()->clone();
437  }
438 
439 }
440 
441 ///////////////////////////////////////////////////////////////////////////////////////////////
442 void
444 
445  // all jumping, secondary structure, base pair constraint, allow_insertation
446  // will be stored in a .prm file.
448  rna_structure_parameters_->set_root_at_first_rigid_body( root_at_first_rigid_body_ );
449  rna_structure_parameters_->set_suppress_bp_constraint( suppress_bp_constraint_ );
450 
451  // reads in any data on, e.g., exposure of different bases --> saves inside the pose's rna_data_info.
452  rna_data_reader_->initialize( pose, rna_data_file_ );
453 
455 
456  if ( input_res_.size() > 0 ){
458  } else { // deprecate soon?
460  }
461 
462  chunk_coverage_ = rna_chunk_library_->chunk_coverage();
463 
464  // std::cout << "ALLOW_INSERT RIGHT AFTER INITIALIZATION: " << std::endl;
465  // rna_structure_parameters_->allow_insert()->show();
466 
467  rna_structure_parameters_->allow_insert()->and_allow_insert( rna_chunk_library_->allow_insert() );
468 
469  // std::cout << "ALLOW_INSERT RIGHT AFTER AND WITH CHUNK_LIBRARY: " << std::endl;
470  // rna_structure_parameters_->allow_insert()->show();
471  std::cout << pose.annotated_sequence() << std::endl;
472 
473  rna_chunk_library_->set_allow_insert( rna_structure_parameters_->allow_insert() );
475 
477  rna_minimizer_->set_allow_insert( rna_structure_parameters_->allow_insert() );
478  rna_minimizer_->vary_bond_geometry( vary_bond_geometry_ );
479  rna_minimizer_->set_extra_minimize_res( extra_minimize_res_ );
480  rna_minimizer_->set_move_first_rigid_body( move_first_rigid_body_ );
481 
482  rna_relaxer_ = new RNA_Relaxer( rna_fragment_mover_, rna_minimizer_);
483  rna_relaxer_->simple_rmsd_cutoff_relax( simple_rmsd_cutoff_relax_ );
484 
485 }
486 
487 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
488 void
490 
491  if (user_defined_cycles_) return;
492 
493  // figure out rough number of degrees of freedom.
494 
495  // first count up number of residues with allow_insert.
496  Size const nres_move = get_moving_res( pose ).size();
497  TR << "Number of moving residues: " << nres_move << std::endl;
498 
499  // then count up rigid bodies that need to be docked.
500  Size nbody_move = protocols::rna::get_rigid_body_jumps( pose ).size();
501  if ( nbody_move > 1 ) nbody_move--; // first rigid body does not move, by convention.
502  if ( nbody_move > 0 ) TR << "Number of moving bodies: " << nbody_move << std::endl;
503 
504  monte_carlo_cycles_ = 2000 * nres_move + 20000 * nbody_move;
505 
508  TR << "Using maximum default Monte Carlo cycles: " << monte_carlo_cycles_ << ". Use -cycles option to change this." << std::endl;
509  }
510 
511  TR << "Using " << monte_carlo_cycles_ << " cycles in de novo modeling." << std::endl;
512 
513 }
514 
515 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
516 void
518 {
519 
520  using namespace core::io::silent;
521 
522  tag_is_done_.clear();
523 
525 
526  SilentFileData silent_file_data;
528  tags_done = silent_file_data.read_tags_fast( silent_file_ );
529  for ( utility::vector1< std::string >::const_iterator iter = tags_done.begin(); iter != tags_done.end(); iter++ ) {
530  std::cout << "Already done: " << *iter << std::endl;
531  tag_is_done_[ *iter ] = true;
532  }
533  }
534 
535 }
536 
537 
538 
539 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
540 void
541 RNA_DeNovoProtocol::setup_rigid_body_mover( pose::Pose const & pose, Size const r, Size const rounds ){
542 
544  movemap.set_jump( false );
545 
546  bool rigid_body_moves = protocols::rna::let_rigid_body_jumps_move( movemap, pose, move_first_rigid_body_ );
547 
548  if ( !rigid_body_moves ) return;
549 
550  if ( !binary_rna_output_ ) utility_exit_with_message( "Asking for virtual anchor -- need to specify -binary_output" );
551 
552  //Keep moves coarse for early rounds. For the last 1/4 of modeling, plateau to the finest moves.
553  Real suppress = (r - 1.0)/( static_cast<Real>(rounds) * (3.0/4.0) - 1.0);
554  // Real suppress = (r - 1.0)/( static_cast<Real>(rounds) - 1.0);
555  if ( suppress > 1.0 ) suppress = 1.0;
556 
557  Real const rot_mag_init( 10.0 ), rot_mag_final( 0.2 );
558  Real const trans_mag_init( 5.0 ), trans_mag_final( 0.1 );
559  Real const rot_mag = rot_mag_init + (rot_mag_final - rot_mag_init ) * suppress;
560  Real const trans_mag = trans_mag_init + (trans_mag_final - trans_mag_init ) * suppress;
561 
562  rigid_body_mover_ = new protocols::rigid::RigidBodyPerturbMover( pose, movemap, rot_mag, trans_mag, protocols::rigid::partner_upstream /*because virtual anchor should be root*/ );
563  jump_change_frequency_ = 0.5; /* up from default of 0.1*/
564 
565  TR << " rot_mag: " << rot_mag << " trans_mag: " << trans_mag << std::endl;
566 
567 }
568 
569 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
570 void
572 
573  if ( !output_lores_silent_file_ ) return;
574 
575  static std::string const new_prefix( "_LORES.out" );
576 
577  std::string::size_type pos = silent_file_.find( ".out", 0 );
578  if (pos == std::string::npos ){
579  utility_exit_with_message( "If you want to output a lores silent file, better use .out suffix ==> " + silent_file_ );
580  }
582  lores_silent_file_.replace( pos, new_prefix.length(), new_prefix );
583 }
584 
585 //////////////////////////////////////////////////////////////////////
586 void
588 {
589  using namespace core::scoring;
590 
591  Real const rmsd = all_atom_rmsd( *get_native_pose(), pose );
592  TR << "All atom rmsd: " << rmsd << " for " << out_file_tag << std::endl;
593  s.add_energy( "rms", rmsd );
594 
595  Real rmsd_stems = 0.0;
596  std::list< Size > stem_residues( rna_structure_parameters_->get_stem_residues( pose ) );
597 
598  if ( stem_residues.size() > 0 ) {
599  rmsd_stems = all_atom_rmsd( *get_native_pose(), pose, stem_residues );
600  TR << "All atom rmsd over stems: " << rmsd_stems << " for " << out_file_tag << std::endl;
601  }
602  s.add_energy( "rms_stem", rmsd_stems );
603 
604 }
605 
606 ///////////////////////////////////////////////////////////////////////////////////////////
607 void
610  std::string const & silent_file, pose::Pose & pose, std::string const out_file_tag,
611  bool const score_only /* = false */) const
612 {
613 
614  using namespace core::io::silent;
615  using namespace core::scoring;
616 
617  if ( get_native_pose() ) calc_rmsds( s, pose, out_file_tag );
618 
619  TR << "ADD_NUMBER_BASE_PAIRS" << std::endl;
620  add_number_base_pairs( pose, s );
621  TR << "ADD_NUMBER_NATIVE_BASE_PAIRS" << std::endl;
622  if ( get_native_pose() ) add_number_native_base_pairs( pose, s );
623 
624  if ( output_filters_ ){
625  s.add_energy( "lores_early", lores_score_early_ ) ;
626  if ( minimize_structure_ ) s.add_energy( "lores_final", lores_score_final_ ) ;
627  }
628 
629  TR << "Outputting to silent file: " << silent_file << std::endl;
630  silent_file_data.write_silent_struct( s, silent_file, score_only );
631 
632 }
633 
634 
635 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
636 void
638  core::pose::Pose & pose,
639  std::string const & silent_file,
640  std::string const & out_file_tag,
641  bool const score_only /* = false */) const
642 {
643 
644  using namespace core::io::silent;
645  using namespace core::scoring;
646 
647  // Silent file setup?
648  //static SilentFileData silent_file_data;
649  SilentFileData silent_file_data;
650 
651  // What is all this rigamarole, making the silent struct data?
652  // Why do I need to supply the damn file name? That seems silly.
653  TR << "Making silent struct for " << out_file_tag << std::endl;
654 
655  if ( binary_rna_output_ ) {
656  BinaryRNASilentStruct s( pose, out_file_tag );
657 
659 
660  output_silent_struct( s, silent_file_data, silent_file, pose, out_file_tag, score_only );
661 
662  } else {
663  RNA_SilentStruct s( pose, out_file_tag );
664 
666 
667  output_silent_struct( s, silent_file_data, silent_file, pose, out_file_tag, score_only );
668 
669  }
670 
671 }
672 
673 
674 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
677 
678  utility::vector1< Size > moving_res;
679 
680  protocols::toolbox::AllowInsertOP const & allow_insert = rna_structure_parameters_->allow_insert();
681 
682  for( Size n = 1; n <= pose.total_residue(); n++ ){
683  if ( allow_insert->get( n ) ) {
684  moving_res.push_back( n );
685  }
686  }
687 
688  return moving_res;
689 
690 }
691 
692 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
693 void
694 RNA_DeNovoProtocol::align_and_output_to_silent_file( core::pose::Pose & pose, std::string const & silent_file, std::string const & out_file_tag ) const
695 {
696 
697  // if input pdbs were specified with -s or -silent, then automatic alignment to first of these input chunks.
698  // otherwise, align to native pose, if specified.
699  if ( input_res_.size() > 0 ){
700 
701  rna_chunk_library_->superimpose_to_first_chunk( pose );
702 
703  } else if ( get_native_pose() ){
704  Pose const & native_pose = *get_native_pose();
705 
706  //realign to native for ease of viewing.
707  // check for any fixed domains.
708  utility::vector1< Size > superimpose_res = get_moving_res( pose );
709 
710  // if no fixed domains, just superimpose over all residues.
711  if ( superimpose_res.size() == 0 ){
712  for( Size n = 1; n <= pose.total_residue(); n++ ) superimpose_res.push_back( n );
713  }
714 
715  id::AtomID_Map< id::AtomID > const & alignment_atom_id_map_native =
716  protocols::swa::create_alignment_id_map( pose, native_pose, superimpose_res ); // perhaps this should move to toolbox.
717 
718  std::cout << "Aligning pose to native." << std::endl;
719 
720  //pose.dump_pdb( "before_align.pdb");
721  // native_pose.dump_pdb( "native.pdb" );
722  core::scoring::superimpose_pose( pose, native_pose, alignment_atom_id_map_native );
723  // pose.dump_pdb( "after_align.pdb");
724 
725  }
726 
727  output_to_silent_file( pose, silent_file, out_file_tag );
728 }
729 
730 ////////////////////////////////////////////////////////////////////////////////////////
731 void
733 
734  rna_chunk_library_->check_fold_tree_OK( pose );
735  rna_chunk_library_->initialize_random_chunks( pose );
736 
737  if (dump_pdb_) pose.dump_pdb( "add_chunks.pdb" );
738 
739  Size const heat_cycles = 3 * pose.total_residue();
740  TR << "Heating up... " << std::endl;
741 
742  for (Size i = 1; i <= heat_cycles; i++ ){
743  rna_fragment_mover_->random_fragment_insertion( pose, 1 /*frag_size*/ );
744  }
745 
746  if (dump_pdb_) pose.dump_pdb( "random_moves1.pdb" );
747 
748  rna_chunk_library_->initialize_random_chunks( pose, dump_pdb_ );
749 
750  if (dump_pdb_) pose.dump_pdb( "random_moves2.pdb" );
751 
752  translate_virtual_anchor_to_first_rigid_body( pose ); //useful for graphics viewing & final output
753 
754  if (dump_pdb_) pose.dump_pdb( "random_moves3.pdb" );
755 
757 
758  if (dump_pdb_) pose.dump_pdb( "random_moves4.pdb" );
759 
760 }
761 
762 ////////////////////////////////////////////////////////////////////////////////////////
763 void
765 
766  using namespace protocols::rigid;
767  using namespace protocols::rna;
768  using namespace kinematics;
769 
770  utility::vector1< Size > const rigid_body_jumps = get_rigid_body_jumps( pose );
771  Size const found_jumps = rigid_body_jumps.size();
772  if ( found_jumps <= 1 ) return; // nothing to rotate/translate relative to another object.
773 
774  // translation to first, fixed rigid body.
775  Vector first_rigid_body_position = pose.jump( rigid_body_jumps[ 1 ] ).get_translation();
776 
777  for ( Size n = 2; n <= rigid_body_jumps.size(); n++ ) {
778  Size const i = rigid_body_jumps[ n ];
779 
780  // randomize orientation.
781  RigidBodyRandomizeMover rigid_body_randomize_mover( pose, i, partner_upstream );
782  rigid_body_randomize_mover.apply( pose );
783 
784  // randomize translation.
785  // how far out should we push this segment?
786  // For now, hard-wire a value, but later may want to take into account radius of gyration of the chunk.
787  Jump jump = pose.jump( i );
788  jump.set_translation( first_rigid_body_position );
789  pose.set_jump( i, jump ); // move to 'origin' -- position of first rigid body.
790 
791  Real const translation_magnitude( 20.0 );
792  RigidBodyPerturbMover rigid_body_perturb_mover( i, 0.0 /*rot_mag_in*/, translation_magnitude, partner_upstream );
793  rigid_body_perturb_mover.apply( pose );
794  }
795 
796 
797 }
798 
799 
800 ////////////////////////////////////////////////////////////////////////////////////////
801 void
803 {
804  using namespace core::scoring;
805 
806  Real const rna_base_axis_final_weight = initial_denovo_scorefxn_->get_weight( rna_base_axis );
807  Real const rna_base_stagger_final_weight = initial_denovo_scorefxn_->get_weight( rna_base_stagger );
808  Real const rna_base_stack_axis_final_weight = initial_denovo_scorefxn_->get_weight( rna_base_stack_axis );
809  Real const linear_chainbreak_final_weight = initial_denovo_scorefxn_->get_weight( linear_chainbreak );
810  Real const chainbreak_final_weight = initial_denovo_scorefxn_->get_weight( chainbreak );
811  Real const atom_pair_constraint_final_weight = initial_denovo_scorefxn_->get_weight( atom_pair_constraint );
812  Real const coordinate_constraint_final_weight = initial_denovo_scorefxn_->get_weight( coordinate_constraint );
813 
814  //Keep score function coarse for early rounds.
815  // Real const suppress = (r - 1.0) / (rounds - 1.0);
816  Real const suppress = r / static_cast<Real>( rounds );
817 
818  denovo_scorefxn_->set_weight( rna_base_axis, suppress*rna_base_axis_final_weight );
819  denovo_scorefxn_->set_weight( rna_base_stagger, suppress*rna_base_stagger_final_weight );
820  if ( titrate_stack_bonus_ ) denovo_scorefxn_->set_weight( rna_base_stack_axis,suppress*rna_base_stack_axis_final_weight );
821  denovo_scorefxn_->set_weight( atom_pair_constraint, suppress*atom_pair_constraint_final_weight );
822  denovo_scorefxn_->set_weight( coordinate_constraint, suppress*coordinate_constraint_final_weight );
823 
824 
825  // keep chainbreak extra low for early rounds... seems to be important for rigid body sampling.
826  Real suppress_chainbreak = ( r - (rounds/3.0) )/ ( static_cast<Real>(rounds) - (rounds/3.0) );
827  Real const suppress_chainbreak_min = 1 / static_cast< Real >( rounds );
828  if ( suppress_chainbreak < suppress_chainbreak_min ) suppress_chainbreak = suppress_chainbreak_min;
829 
830  denovo_scorefxn_->set_weight( linear_chainbreak, suppress*linear_chainbreak_final_weight );
831  denovo_scorefxn_->set_weight( chainbreak, suppress*chainbreak_final_weight );
832 
833 }
834 
835 
836 ////////////////////////////////////////////////////////////////////////////////////////
837 Size
838 RNA_DeNovoProtocol::figure_out_constraint_separation_cutoff( Size const & r, Size const & rounds, Size const & max_dist )
839 {
840 
841  //Keep score function coarse for early rounds.
842  Real const suppress = ( r )/(rounds - 4.0);
843 
844  Size separation_cutoff = static_cast< Size > ( suppress * max_dist ) + 2;
845  if ( separation_cutoff > max_dist ) separation_cutoff = max_dist;
846 
847  return separation_cutoff;
848 
849 }
850 
851 
852 ////////////////////////////////////////////////////////////////////////////////////////
853 void
855 {
856  using namespace core::scoring::constraints;
857 
858  if ( !staged_constraints_) return;
859 
860  if ( !constraint_set_ ) return;
861 
863 
864  static core::kinematics::ShortestPathInFoldTree shortest_path_in_fold_tree( pose.fold_tree() );
865  Size const separation_cutoff = figure_out_constraint_separation_cutoff( r, rounds, shortest_path_in_fold_tree.max_dist() );
866  TR << "ROUND " << r << " out of " << rounds << std::endl;
867  TR << "FOLD_TREE CURRENT SEPARATION CUTOFF " << separation_cutoff << " out of " << shortest_path_in_fold_tree.max_dist() << std::endl;
868 
869  ConstraintCOPs csts( constraint_set_->get_all_constraints() );
870 
871  for ( Size n = 1; n <= csts.size(); n++ ) {
872 
873  ConstraintCOP const & cst( csts[n] );
874 
875  if ( cst->natoms() == 2 ) { // currently only defined for pairwise distance constraints.
876  Size const i = cst->atom( 1 ).rsd();
877  Size const j = cst->atom( 2 ).rsd();
878  Size const dist( shortest_path_in_fold_tree.dist( i , j ) );
879  if ( dist > separation_cutoff ) continue;
880  }
881 
882  cst_set_new->add_constraint( cst );
883  }
884 
885  pose.constraint_set( cst_set_new );
886 
887  TR << "NUM CONSTRAINTS " << pose.constraint_set()->get_all_constraints().size() << " out of " <<
888  csts.size() << std::endl;
889 
890 }
891 
892 
893 
894 ////////////////////////////////////////////////////////////////////////////////////////
895 void
896 RNA_DeNovoProtocol::update_frag_size( Size const & r, Size const & rounds )
897 {
898  frag_size_ = 3;
899  if ( r > 1.0 * (rounds/3.0) ) frag_size_ = 2;
900  if ( r > 2.0 * (rounds/3.0) ) frag_size_ = 1;
901  TR << "Fragment size: " << frag_size_ << std::endl;
902 }
903 
904 
905 ////////////////////////////////////////////////////////////////////////////////////////
906 void
908 
909  //There are now two kinds of insertions --
910  // (1) fragment insertions for, e.g., contiguous 3-mers
911  // and
912  // (2) "chunk insertions", which change out whole loops, motifs, or
913  // junctions based on previous models stored in silent files
914  //
915 
916  //Following returns early if there are no jumps.
917  if ( RG.uniform() < jump_change_frequency_ ) {
918 
919  random_jump_trial( pose );
920 
921  } else {
922 
923  bool did_a_trial( false );
924  if ( RG.uniform() < chunk_coverage_ ) {
925  did_a_trial = random_chunk_trial( pose );
926  }
927 
928  if ( !did_a_trial ){
929  random_fragment_trial( pose );
930  }
931  }
932 
933 
934 }
935 
936 ////////////////////////////////////////////////////////////////////////////////////////
937 void
939 
940  bool success( false );
941  std::string move_type( "" );
942 
943  // pose.dump_pdb( "BEFORE.pdb" );
944  // std::cout << "BEFORE!" << std::endl;
945  // (*denovo_scorefxn_)( pose );
946  // denovo_scorefxn_->show( std::cout, pose );
947 
948  if ( rigid_body_mover_ && RG.uniform() < 0.8 /*totally arbitrary*/ ){
949  rigid_body_mover_->apply( pose );
950  success = true; /* rigid body mover is from docking */
951  move_type = "rigid_body";
952  } else {
953  success = rna_structure_parameters_->random_jump_change( pose );
954  move_type = "jump_change";
955  }
956 
957  if (!success) return;
958 
959  if ( do_close_loops_ ) rna_loop_closer_->apply( pose );
960 
961  // pose.dump_pdb( "AFTER.pdb" );
962  // std::cout << "AFTER!" << std::endl;
963  // (*denovo_scorefxn_)( pose );
964  // denovo_scorefxn_->show( std::cout, pose );
965  // exit( 0 );
966 
967  monte_carlo_->boltzmann( pose, move_type );
968 
969 }
970 
971 ////////////////////////////////////////////////////////////////////////////////////////
972 void
974 
975  rna_fragment_mover_->random_fragment_insertion( pose, frag_size_ );
976  if ( do_close_loops_ ) rna_loop_closer_->apply( pose );
977 
978  monte_carlo_->boltzmann( pose, "frag" + SS(frag_size_) );
979 
980 }
981 
982 ////////////////////////////////////////////////////////////////////////////////////////
983 bool
985 
986  // if ( frag_size_ == 2 ) {
987  // pose.dump_pdb( "before_chunk.pdb" );
988  // std::cout << "BEFORE: " << (*denovo_scorefxn_)( pose ) << std::endl;
989  // denovo_scorefxn_->show( std::cout, pose );
990  // }
991 
992  bool const did_an_insertion = rna_chunk_library_->random_chunk_insertion( pose );
993  if ( !did_an_insertion ) return false;
994 
995  // if ( frag_size_ == 2 ) {
996  // pose.dump_pdb( "after_chunk.pdb" );
997  // std::cout << "AFTER: " << (*denovo_scorefxn_)( pose ) << std::endl;
998  // denovo_scorefxn_->show( std::cout, pose );
999  // }
1000 
1001  if ( do_close_loops_ ) rna_loop_closer_->apply( pose );
1002 
1003  monte_carlo_->boltzmann( pose, "chunk" );
1004 
1005  return true /*did an insertion*/;
1006 
1007 }
1008 
1009 /////////////////////////////////////////////////////////////////////
1010 /////////////////////////////////////////////////////////////////////
1011 // Following may better fit in a util.cc ,or pose_metrics...
1012 void
1014 {
1015  using namespace scoring::rna;
1016  using namespace conformation;
1017 
1018  // pose::Pose pose = pose_input;
1019  // (*denovo_scorefxn_)( pose );
1020  // local_rna_low_resolution_potential_.update_rna_base_pair_list( pose );
1021 
1022  // RNA_ScoringInfo const & rna_scoring_info( rna_scoring_info_from_pose( pose ) );
1023  // RNA_FilteredBaseBaseInfo const & rna_filtered_base_base_info( rna_scoring_info.rna_filtered_base_base_info() );
1024  // Energy_base_pair_list const & scored_base_pair_list( rna_filtered_base_base_info.scored_base_pair_list() );
1025 
1027  utility::vector1< bool > is_bulged;
1028  classify_base_pairs( pose, base_pair_list, is_bulged );
1029 
1030  Size N_WC( 0 ), N_NWC( 0 );
1031 
1032  // for ( Energy_base_pair_list::const_iterator it = scored_base_pair_list.begin();
1033  // it != scored_base_pair_list.end(); ++it ){
1034  for ( Size n = 1; n <= base_pair_list.size(); n++ ) {
1035 
1036  Base_pair const base_pair = base_pair_list[ n ];
1037 
1038  Size const i = base_pair.res1;
1039  Size const j = base_pair.res2;
1040 
1041  Size const k = base_pair.edge1;
1042  Size const m = base_pair.edge2;
1043 
1044  Residue const & rsd_i( pose.residue( i ) );
1045  Residue const & rsd_j( pose.residue( j ) );
1046 
1047  if ( ( k == WATSON_CRICK && m == WATSON_CRICK
1048  && base_pair.orientation == 1 ) &&
1049  possibly_canonical( rsd_i.aa(), rsd_j.aa() ) ) {
1050  N_WC++;
1051  } else {
1052  N_NWC++;
1053  }
1054  }
1055 
1056  s.add_string_value( "N_WC", ObjexxFCL::fmt::I( 9, N_WC) );
1057  s.add_string_value( "N_NWC", ObjexxFCL::fmt::I( 9, N_NWC ) );
1058  s.add_string_value( "N_BS", ObjexxFCL::fmt::I( 9, get_number_base_stacks( pose ) ) );
1059 
1060  //s.add_energy( "N_WC", N_WC );
1061  // s.add_energy( "N_NWC", N_NWC );
1062  // s.add_energy( "N_BS", get_number_base_stacks( pose ) );
1063 }
1064 
1065 /////////////////////////////////////////////////////////////////////
1066 bool
1067 check_in_base_pair_list( scoring::rna::Base_pair const & base_pair /*from native*/,
1068  utility::vector1< core::scoring::rna::Base_pair > const & base_pair_list /*for decoy*/)
1069 {
1070  using namespace scoring::rna;
1071 
1072  bool in_list( false );
1073 
1074  for ( Size n = 1; n <= base_pair_list.size(); n++ ) {
1075 
1076  Base_pair const base_pair2 = base_pair_list[ n ];
1077 
1078  if ( ( base_pair.res1 == base_pair2.res1 && base_pair.res2 == base_pair2.res2 ) &&
1079  ( base_pair.edge1 == base_pair2.edge1 && base_pair.edge2 == base_pair2.edge2 ) &&
1080  base_pair.orientation == base_pair2.orientation ) {
1081  in_list = true;
1082  break;
1083  }
1084 
1085  if ( ( base_pair.res2 == base_pair2.res1 && base_pair.res1 == base_pair2.res2 ) &&
1086  ( base_pair.edge2 == base_pair2.edge1 && base_pair.edge1 == base_pair2.edge2 ) &&
1087  base_pair.orientation == base_pair2.orientation ) {
1088  in_list = true;
1089  break;
1090  }
1091 
1092  }
1093 
1094  return in_list;
1095 
1096 }
1097 
1098 /////////////////////////////////////////////////////////////////////
1099 void
1101 {
1102  if ( !get_native_pose() ) return;
1103 
1104  using namespace scoring::rna;
1105  using namespace conformation;
1106 
1107  pose::Pose native_pose = *get_native_pose();
1108 
1110  utility::vector1< bool > is_bulged;
1111  classify_base_pairs( pose, base_pair_list, is_bulged );
1112 
1114  utility::vector1< bool > is_bulged_native;
1115  classify_base_pairs( native_pose, base_pair_list_native, is_bulged_native );
1116 
1117 
1118  //(*denovo_scorefxn_)( pose );
1119  // (*denovo_scorefxn_)( native_pose );
1120  //local_rna_low_resolution_potential_.update_rna_base_pair_list( native_pose );
1121  //local_rna_low_resolution_potential_.update_rna_base_pair_list( pose );
1122 
1123  // RNA_ScoringInfo const & rna_scoring_info( rna_scoring_info_from_pose( pose ) );
1124  // RNA_FilteredBaseBaseInfo const & rna_filtered_base_base_info( rna_scoring_info.rna_filtered_base_base_info() );
1125  // Energy_base_pair_list const & scored_base_pair_list( rna_filtered_base_base_info.scored_base_pair_list() );
1126 
1127  // RNA_ScoringInfo const & rna_scoring_info_native( rna_scoring_info_from_pose( native_pose ) );
1128  // RNA_FilteredBaseBaseInfo const & rna_filtered_base_base_info_native( rna_scoring_info_native.rna_filtered_base_base_info() );
1129  // Energy_base_pair_list const & scored_base_pair_list_native( rna_filtered_base_base_info_native.scored_base_pair_list() );
1130 
1131  Size N_WC_NATIVE( 0 ), N_NWC_NATIVE( 0 );
1132  Size N_WC( 0 ), N_NWC( 0 );
1133 
1134  //std::cout << "BASE PAIR LIST " << std::endl;
1135  for ( Size n = 1; n <= base_pair_list_native.size(); n++ ) {
1136 
1137  //Real const score = it->first;
1138  // Real const SCORE_CUTOFF( -1.0 );
1139  // if (score > SCORE_CUTOFF) continue;
1140 
1141  core::scoring::rna::Base_pair const base_pair = base_pair_list_native[ n ];
1142 
1143  Size const i = base_pair.res1;
1144  Size const j = base_pair.res2;
1145 
1146  Size const k = base_pair.edge1;
1147  Size const m = base_pair.edge2;
1148 
1149  Residue const & rsd_i( pose.residue( i ) );
1150  Residue const & rsd_j( pose.residue( j ) );
1151 
1152  //std::cout << " NATIVE BASE PAIR " << i << " " << j << " " << k << " " << m << " " << it->first << std::endl;
1153 
1154  if ( ( k == WATSON_CRICK && m == WATSON_CRICK
1155  && base_pair.orientation == 1 ) &&
1156  possibly_canonical( rsd_i.aa(), rsd_j.aa() ) ) {
1157  N_WC_NATIVE++;
1158  if ( check_in_base_pair_list( base_pair /*from native*/, base_pair_list /*for decoy*/) ) N_WC++;
1159  } else {
1160  N_NWC_NATIVE++;
1161  if ( check_in_base_pair_list( base_pair /*from native*/, base_pair_list /*for decoy*/) ){
1162  N_NWC++;
1163  } else {
1164  std::cout << "Missing native base pair " << pose.residue( i ).name1() << i << " " << pose.residue(j).name1() << j << " " << get_edge_from_num( k ) << " " << get_edge_from_num( m ) << " " << std::endl;
1165  }
1166  }
1167  }
1168 
1169  Real f_natWC( 0.0 ), f_natNWC( 0.0 ), f_natBP( 0.0 );
1170  if (N_WC_NATIVE > 0 ) f_natWC = ( N_WC / (1.0 * N_WC_NATIVE) );
1171  if (N_NWC_NATIVE > 0 ) f_natNWC = ( N_NWC / (1.0 * N_NWC_NATIVE) );
1172  if ( (N_WC_NATIVE + N_NWC_NATIVE) > 0 ) f_natBP = ( (N_WC+N_NWC) / (1.0 * (N_WC_NATIVE + N_NWC_NATIVE) ));
1173 
1174  s.add_energy( "f_natWC" , f_natWC );
1175  s.add_energy( "f_natNWC", f_natNWC );
1176  s.add_energy( "f_natBP" , f_natBP );
1177 
1178 }
1179 
1180 ///////////////////////////////////////////////////////////////////////////////////////////////
1181 void
1183  extra_minimize_res_ = setting;
1184 }
1185 
1186 ///////////////////////////////////////////////////////////////////////////////////////////////
1187 bool
1188 RNA_DeNovoProtocol::check_score_filter( Real const lores_score, std::list< Real > & all_lores_score ){
1189 
1190  all_lores_score.push_back( lores_score );
1191 
1192  all_lores_score.sort(); // nice -- can do this with a list!
1193 
1194  // note that if autofilter_score_quantile_ = 0.20, the first decoy will be 'passed' for free.
1195  Size const n = all_lores_score.size();
1196  Size const cutoff_index = static_cast< Size >( n * autofilter_score_quantile_ ) + 1;
1197 
1198  // the one pain with lists -- need to iterate through to find the element corresponding to the quantile score.
1199  Real all_lores_score_cutoff = all_lores_score.front();
1200  Size i( 1 );
1201  for ( std::list< Real >::const_iterator iter = all_lores_score.begin(); iter != all_lores_score.end(); iter++, i++ ){
1202  if ( i == cutoff_index ) all_lores_score_cutoff = *iter;
1203  }
1204 
1205  TR << "Comparing current lores score " << lores_score << " to automatically determined cutoff: " << all_lores_score_cutoff << " based on " << autofilter_score_quantile_ << " quantile from " << n << " models so far" << std::endl;
1206  return ( lores_score <= all_lores_score_cutoff );
1207 }
1208 
1209 ///////////////////////////////////////////////////////////////////////////////////////////////
1210 void
1212 
1213  using namespace core::scoring;
1214  using namespace core::io::pdb;
1215 
1216  if(!use_chem_shift_data_) utility_exit_with_message("use_chem_shift_data_ == false!");
1217 
1218  if (minimize_structure_){
1219 
1220  rna_minimizer_->set_score_function(chem_shift_scorefxn_); //use the chem_shift_scorefxn_
1221 
1222  rna_minimizer_->apply( pose );
1223 
1224  rna_minimizer_->set_score_function(hires_scorefxn_); //set back the original scorefxn.
1225 
1226  if (close_loops_at_end_) rna_loop_closer_->apply( pose, rna_structure_parameters_->connections() );
1227  }
1228 
1229  (*chem_shift_scorefxn_)( pose );
1230 
1231 
1232 }
1233 
1234 
1235 void
1237  core::pose::Pose const & const_pose) const {
1238 
1239  using namespace core::scoring;
1240  using namespace core::pose;
1241 
1242  if(!use_chem_shift_data_){
1243  utility_exit_with_message("use_chem_shift_data_ == false!");
1244  }
1245 
1246  pose::Pose chem_shift_pose=const_pose; //HARD COPY SLOW!
1247 
1248  core::scoring::ScoreFunctionOP temp_scorefxn = new ScoreFunction;
1249 
1250  temp_scorefxn->set_weight( scoring::rna_chem_shift , 1.00 );
1251 
1252  (*temp_scorefxn)(chem_shift_pose);
1253 
1254  EnergyMap const & energy_map=chem_shift_pose.energies().total_energies();
1255 
1256  Real const rosetta_chem_shift_score= energy_map[ scoring::rna_chem_shift ];
1257 
1258  //This statement should be very fast except possibly the 1st call.
1260  rna_chemical_shift_potential( core::scoring::ScoringManager::
1261  get_instance()->get_RNA_ChemicalShiftPotential() );
1262 
1263  Size const num_chem_shift_data_points=rna_chemical_shift_potential.get_total_exp_chemical_shift_data_points();
1264 
1265  //rosetta_chem_shift_score --> Sum_square chemical_shift deviation.
1266 
1267  Real const chem_shift_RMSD=sqrt( rosetta_chem_shift_score /
1268  float(num_chem_shift_data_points) );
1269 
1270  silent_struct.add_energy( "chem_shift_RMSD", chem_shift_RMSD);
1271 
1272  silent_struct.add_energy( "num_chem_shift_data",
1273  float(num_chem_shift_data_points) );
1274 
1275  if(silent_struct.has_energy("rna_chem_shift")==false){
1276  //If missing this term, then the rna_chem_shift weight is probably
1277  //zero in the weight_file.
1278  silent_struct.add_energy( "rna_chem_shift", 0.0);
1279  }
1280 
1281 }
1282 
1283 
1284 } // namespace rna
1285 } // namespace protocols