Rosetta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ddg_monomer.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
11 /// @brief
12 /// @author Liz Kellogg ekellogg@u.washington.edu
13 /// comments by JKLeman (julia.koehler1982@gmail.com)
14 
15 #include <core/types.hh>
16 
17 #include <core/chemical/AA.hh>
18 #include <protocols/scoring/Interface.hh>
19 #include <core/conformation/Residue.hh>
20 #include <core/chemical/ResidueTypeSet.hh>
21 
22 #include <core/scoring/ScoreFunction.hh>
23 #include <core/scoring/ScoreFunctionFactory.hh>
24 
25 #include <core/pack/task/PackerTask.hh>
26 #include <core/pack/task/TaskFactory.hh>
27 
28 #include <core/pose/Pose.hh>
29 
30 #include <basic/options/util.hh>
34 #include <basic/options/keys/ddg.OptionKeys.gen.hh>
35 #include <basic/options/keys/in.OptionKeys.gen.hh>
36 #include <basic/options/keys/score.OptionKeys.gen.hh>
37 #include <basic/options/keys/packing.OptionKeys.gen.hh>
38 
39 #include <basic/database/open.hh>
40 
41 #include <devel/init.hh>
42 
43 #include <numeric/xyzVector.hh>
44 #include <core/pack/task/ResfileReader.hh>
45 
46 #include <fstream>
47 #include <iostream>
48 #include <sstream>
49 #include <ObjexxFCL/format.hh>
50 
51 // C++ headers
52 #include <cstdlib>
53 #include <string>
54 #include <protocols/ddg/ddGMover.hh>
55 
56 //Auto Headers
57 #include <core/import_pose/import_pose.hh>
58 #include <utility/vector0.hh>
59 #include <utility/vector1.hh>
61 #include <basic/Tracer.hh>
62 
63 //Auto Headers
64 using basic::T;
65 using basic::Error;
66 using basic::Warning;
67 static THREAD_LOCAL basic::Tracer TR( "apps.public.ddg.ddg_monomer" );
68 
69 using namespace core;
70 using namespace scoring;
71 
74 
75 ////////////////////////////////////////////////////////////////////////////////
76 /// @brief print ddGs
77 void
78 print_ddgs(std::string ddg_out,
79  std::string label,
80  ddgs delta_e_components,
81  //mjo commenting out 'mut_avg_components' because it is unused and causes a warning
82  ddgs /*mut_avg_components*/,
83  double total_ddgs,
84  protocols::ddg::ddGMover& mover,
85  bool print_header,
86  bool min_cst
87 )
88 {
89  std::ofstream ddg_output(ddg_out.c_str(), std::ios_base::app);
90 
91  // exit if failure
92  if ( !ddg_output ) {
93  TR << "having trouble opening output file for dumping predicted ddgs "
94  << ddg_out << std::endl;
95  utility::exit(EXIT_FAILURE, __FILE__, __LINE__);
96  }
97 
98  // get score function header
99  utility::vector1<std::string> scorefxn_header;
100  if ( min_cst ) {
101  mover.get_scorefunction_header(mover.minimization_score_function(),scorefxn_header);
102  } else {
103  mover.get_scorefunction_header(mover.score_function(),scorefxn_header);
104  }
105 
106  // print header
107  if ( print_header ) {
108  ddg_output << "ddG: description total ";
109  for ( Size i =1; i <=scorefxn_header.size(); i++ ) {
110  ddg_output << scorefxn_header[i] << " ";
111  }
112  ddg_output << "\n";
113  }
114 
115  // print ddGs
116  if ( label.compare("") != 0 ) {
117  ddg_output << "ddG: " << label << " " << ObjexxFCL::format::F(9,3,total_ddgs) << " ";
118  for ( Size m=1; m<=delta_e_components.size(); m++ ) {
119  ddg_output << ObjexxFCL::format::F(9,3,delta_e_components[m]) << " ";
120  }
121  ddg_output << "\n";
122  }
123 
124  ddg_output << std::endl;
125 
126 } // print ddGs
127 
128 
129 /// @brief The input file is a list of mutation blocks. Usually, this will be a set of point mutations.
130 /// where each "block" lists a single mutation. However, it is possible to specify multiple mutations
131 /// together in a single block.
132 ///
133 /// The file format is:
134 /// "total N"
135 /// followed by N blocks, where each block is
136 /// "M"
137 /// specifying followed by M lines of wt/resid/mutaa triples
138 /// "wtaa resid mutaa"
139 /// N, M and resid are all supposed to be integers.
140 /// wtaa, and mutaa are supposed to be 1-letter amino acid codes.
141 void
143  utility::vector1< mutations > & res_to_mut,
144  std::string filename,
145  pose::Pose & pose
146 )
147 {
148  std::ifstream inputstream;
149  inputstream.open(filename.c_str());
150 
151  if ( inputstream.is_open() ) {
152 
153  // total keyword
154  int total; std::string total_keyword;
155  inputstream >> total_keyword;
156  assert(total_keyword.compare("total") == 0);
157  inputstream >> total; //keep for cross-checking
158 
159  // rest of file
160  while ( !inputstream.eof() ) {
161 
162  // read number of mutations
163  mutations current_mutation(pose.total_residue(),core::chemical::aa_unk);
164  int num_mutations;
165  inputstream >> num_mutations;
166 
167  // get the actual mutations
168  while ( num_mutations > 0 ) {
169 
170  char wt; int resnum; char mut;
171  inputstream >> wt >> resnum >> mut;
172 
173  TR << "wt is " << wt << " resnum is " << resnum << " and mut is " << mut << std::endl;
174  runtime_assert(pose.residue(resnum).name1() == wt); /// APL -- never use regular asserts when it comes to user input
175  runtime_assert(core::chemical::oneletter_code_specifies_aa( mut ) ); /// APL -- input should specify the 1-letter code for an amino acid.
176 
177  // store mutations and keep track of the number
178  core::chemical::AA mutation= core::chemical::aa_from_oneletter_code(mut);
179  current_mutation[resnum]=mutation;
180  num_mutations--; total--;
181  }
182  TR << "end reading mutations for this" << std::endl;
183 
184  // error checking
185  if ( num_mutations < 0 ) {
186  TR.Error << "number of mutations mismatch! num_mutations < 0" << std::endl;
187  return;
188  } else {
189  // store mutation
190  res_to_mut.push_back(current_mutation);
191  }
192  }
193  // error checking
194  if ( total < 0 ) {
195  TR.Error << "total number of mutations mismatch! total < 0" << std::endl;
196  return;
197  }
198  }
199 } // read in mutations
200 
201 ////////////////////////////////////////////////////////////////////////////////
202 
203 int
204 main( int argc, char * argv [] )
205 {
206  try {
207 
208  using namespace pose;
209  using namespace scoring;
210  using namespace conformation;
211 
212  using namespace basic::options;
213  using namespace basic::options::OptionKeys;
214  using namespace core::pack::task;
215  using namespace protocols::moves;
216 
217  // store options?
218  OPT(ddg::weight_file);
219  OPT(ddg::iterations);
220  OPT(ddg::debug_output);
221  OPT(ddg::dump_pdbs);
222  OPT(ddg::out);
223  OPT(ddg::interface_ddg);
224  OPT(ddg::opt_radius);
225  // OPT(score::weights);
226  // OPT(score::patch);
227  OPT(in::file::s);
228 
229  // setup random numbers and options
230  devel::init(argc, argv);
231 
232  bool header_printed = false;
233 
234  // READ ALL THE OPTIONS======================================
235 
236  // read the pose
238  core::import_pose::pose_from_pdb( pose, basic::options::start_file() ); // gets filename from -s option
239 
240  // weights file
241  std::string weight_file = option[ OptionKeys::ddg::weight_file ]();
242 
243  /// Only change the fa_max_dis parameter if it is unspecified on the command line, otherwise, prefer the
244  /// command line definition of the parameter.
245  if ( ! basic::options::option[ score::fa_max_dis ].user() ) {
246  TR << "option score::fa_max_dis unspecified on the command ine. Setting fa_max_dis to 9.0 A." << std::endl;
247  //set fa_max_dis before scorefunction is created!
248  basic::options::option[ score::fa_max_dis ](9.0);
249  } else {
250  TR << "Using command line defined score::fa_max_dis of " << option[ score::fa_max_dis ] << " A." << std::endl;
251  }
252 
253  // create score function from options weights file
254  ScoreFunctionOP score_structure_scorefxn(ScoreFunctionFactory::create_score_function(weight_file));
255 
256  // create minize score function
257  ScoreFunctionOP minimize_sfxn;
258  if ( basic::options::option[OptionKeys::ddg::minimization_scorefunction].user() &&
259  basic::options::option[OptionKeys::ddg::minimization_patch].user() ) {
260 
261  minimize_sfxn=ScoreFunctionFactory::create_score_function(
262  basic::options::option[OptionKeys::ddg::minimization_scorefunction](),
263  basic::options::option[OptionKeys::ddg::minimization_patch]());
264  } else if ( basic::options::option[OptionKeys::ddg::minimization_scorefunction].user() ) {
265 
266  minimize_sfxn=ScoreFunctionFactory::create_score_function(basic::options::option[OptionKeys::ddg::minimization_scorefunction]());
267  } else {
268  minimize_sfxn=get_score_function();
269  }
270 
271  // number of iterations
272  int num_iterations = option[ OptionKeys::ddg::iterations ]();
273 
274  // radius for optimization
275  bool opt_nbrs = false;
276  double cutoff = -1;
277  if ( basic::options::option[ OptionKeys::ddg::opt_radius].user() ) {
278 
279  opt_nbrs = true;
280  cutoff = basic::options::option[ OptionKeys::ddg::opt_radius ]();
281  } else if ( basic::options::option[OptionKeys::ddg::local_opt_only]() ) {
282  opt_nbrs = true;
283  cutoff = 8.0; //default cutoff
284  }
285 
286  //initialize output options.
287  //debug output?
288  bool debug_output = option[ OptionKeys::ddg::debug_output ]();
289  if ( debug_output ) {
290  TR << "weights being used: " <<
291  score_structure_scorefxn->weights() << "\n";
292  }
293 
294  //dump repacked pdbs?
295  bool dump_pdbs = option[ OptionKeys::ddg::dump_pdbs ]();
296 
297  //output ddgs into what file?
298  std::string ddg_out = option[ OptionKeys::ddg::out ]();
299 
300 
301  //interface mode? setting = jump number to use for interface
302  Size const interface_ddg = option[ OptionKeys::ddg::interface_ddg ]();
303  runtime_assert( interface_ddg <= pose.num_jump() );
304 
305  //minimize after repacking?
306  bool min_cst = option[OptionKeys::ddg::min_cst]();
307 
308  //take mean or min energy as predicted ddg?
310  bool min = option[OptionKeys::ddg::min]();
311 
312  // initializations
313  ObjexxFCL::FArray2D<double> wt_scores(20,num_iterations);
314 
315  utility::vector1<core::chemical::AA> all_unk(pose.total_residue(),core::chemical::aa_unk);
316 
317  utility::vector1<double> wt_averaged_score_components;
318  utility::vector1<ddgs> delta_energy_components;
319  utility::vector1<double> total_ddgs;
320  utility::vector1<ddgs> mutant_averaged_score_components;
321  utility::vector1<std::string> delta_delta_G_label;
322 
323  // GET WILDTYPE SCORE
324  protocols::ddg::ddGMover get_wt_score(score_structure_scorefxn,minimize_sfxn,all_unk);
325  get_wt_score.set_min_cst(min_cst);
326  get_wt_score.set_min(min);
327  get_wt_score.set_mean(mean);
328 
329  // set neighbors for repacking
330  if ( !opt_nbrs ) {
331  get_wt_score.restrict_to_nbrs(opt_nbrs);
332  get_wt_score.neighbor_cutoff(cutoff);
333  get_wt_score.num_iterations(num_iterations);
334  get_wt_score.dump_pdbs(dump_pdbs);
335  get_wt_score.is_interface_ddg(interface_ddg);
336  get_wt_score.debug_output(debug_output);
337  get_wt_score.num_iterations(num_iterations);
338  get_wt_score.residues_to_mutate(all_unk);
339  get_wt_score.apply(pose);
340  wt_averaged_score_components=get_wt_score.get_wt_averaged_score_components();
341  }
342 
343  // if mutation file is specified
344  if ( option[ OptionKeys::ddg::mut_file ].user() ) {
345 
346  TR << "reading in mutfile" << std::endl;
347  std::string filename = option[OptionKeys::ddg::mut_file]();
349  read_in_mutations( res_to_mut, filename, pose);
350  TR << "size of res_to_mut is: " << res_to_mut.size() << std::endl;
351 
352  //initialize wildtype scores
353  for ( Size i=1; i <= res_to_mut.size(); i++ ) {
354 
355  utility::vector1<core::chemical::AA> residues_to_mutate = res_to_mut[i];
356 
357  //to check if any mutation was specified
358  bool mutation_defined = false;
359  for ( Size m =1; m<= residues_to_mutate.size(); m++ ) {
360  if ( residues_to_mutate[m] != core::chemical::aa_unk ) {
361  mutation_defined=true;
362  }
363  }
364  if ( mutation_defined ) {
365 
366  // create ddG Mover
367  protocols::ddg::ddGMover point_mutation(score_structure_scorefxn,minimize_sfxn,residues_to_mutate);
368  point_mutation.set_min_cst(min_cst);
369  point_mutation.set_min(min);
370  point_mutation.set_mean(mean);
371 
372  if ( !opt_nbrs && get_wt_score.is_wt_calc_complete() ) {
373  TR << "testing if wt calc is complete. should be complete!" << std::endl;
374  point_mutation.wt_score_components(get_wt_score.wt_score_components());
375  }
376 
377  // settings in ddGMover
378  point_mutation.restrict_to_nbrs(opt_nbrs);
379  point_mutation.neighbor_cutoff(cutoff);
380  point_mutation.dump_pdbs(dump_pdbs);
381  point_mutation.debug_output(debug_output);
382  point_mutation.num_iterations(num_iterations);
383 
384  // apply ddGMover
385  point_mutation.apply(pose);
386  delta_delta_G_label.push_back(point_mutation.mutation_label(pose));
387  TR << "mutation label for this round is " << point_mutation.mutation_label(pose) << std::endl;
388 
389  // store the ddGs
390  if ( point_mutation.is_wt_calc_complete() &&
391  point_mutation.is_mutant_calc_complete() ) {
392  //TR << " both calculations are complete so start storing info!" << std::endl;
393  //output everything or store everything for output later
394  delta_energy_components.push_back(point_mutation.get_delta_energy_components());
395  mutant_averaged_score_components.push_back(point_mutation.get_mutant_averaged_score_components());
396  total_ddgs.push_back(point_mutation.ddG());
397  print_ddgs(ddg_out,
398  point_mutation.mutation_label(pose),
399  point_mutation.get_delta_energy_components(),
400  point_mutation.get_mutant_averaged_score_components(),
401  point_mutation.ddG(),
402  point_mutation,
403  !header_printed,
404  min_cst);
405  if ( ! header_printed ) {
406  header_printed = true;
407  }
408  }
409  }
410  }
411  }
412 
413  // check if resfile is specified
414  if ( option[packing::resfile].user() ) {
415 
416  // create PackerTask
417  pack::task::PackerTaskOP storage_task(pack::task::TaskFactory::create_packer_task(pose));
418  storage_task->initialize_from_command_line();
419  pack::task::parse_resfile(pose, *storage_task);
420  storage_task->or_include_current(true);
421 
422  // iterate over all residues in the pose
423  for ( Size i =1; i<=pose.total_residue(); i++ ) {
424 
425  // if residue is designed
426  if ( storage_task->design_residue(i) ) {
427 
428  // iterate over allowed residues to mutate into
429  for ( ResidueLevelTask::ResidueTypeCOPListConstIter aa_iter(storage_task->residue_task(i).allowed_residue_types_begin()),
430  aa_end(storage_task->residue_task(i).allowed_residue_types_end());
431  aa_iter != aa_end; ++aa_iter ) {
432 
433  utility::vector1<core::chemical::AA> residues_to_mutate(pose.total_residue(),core::chemical::aa_unk);
434  residues_to_mutate[i]=((*aa_iter)->aa());
435 
436  // if mutation is not unknown amino acid
437  if ( residues_to_mutate[i] != core::chemical::aa_unk ) {
438 
439  // create ddGMover and set settigns
440  protocols::ddg::ddGMover point_mutation(score_structure_scorefxn,minimize_sfxn,residues_to_mutate);
441  point_mutation.set_min_cst(min_cst);
442  point_mutation.set_min(min);
443  point_mutation.set_mean(mean);
444 
445  //initialize wildtype scores
446  if ( !opt_nbrs && get_wt_score.is_wt_calc_complete() ) {
447  TR << "testing if wt calc is complete. should be complete!" << std::endl;
448  point_mutation.wt_score_components(get_wt_score.wt_score_components());
449  }
450 
451  // settings in ddGMover
452  point_mutation.restrict_to_nbrs(opt_nbrs);
453  point_mutation.neighbor_cutoff(cutoff);
454  point_mutation.dump_pdbs(dump_pdbs);
455  point_mutation.debug_output(debug_output);
456  point_mutation.num_iterations(num_iterations);
457 
458  // apply ddGMover
459  point_mutation.apply(pose);
460  delta_delta_G_label.push_back(point_mutation.mutation_label(pose));
461 
462  // store output
463  if ( point_mutation.is_wt_calc_complete() &&
464  point_mutation.is_mutant_calc_complete() ) {
465 
466  //TR << " both calculations are complete so start storing info!" << std::endl;
467  //output everything
468  delta_energy_components.push_back(point_mutation.get_delta_energy_components());
469  mutant_averaged_score_components.push_back(point_mutation.get_mutant_averaged_score_components());
470  total_ddgs.push_back(point_mutation.ddG());
471 
472  //output information to file
473  print_ddgs(ddg_out,
474  point_mutation.mutation_label(pose),
475  point_mutation.get_delta_energy_components(),
476  point_mutation.get_mutant_averaged_score_components(),
477  point_mutation.ddG(),
478  point_mutation,
479  !header_printed,
480  min_cst);
481  if ( ! header_printed ) {
482  header_printed = true;
483  }
484  }
485  }
486  }
487  }
488  }
489  }
490  //INTERFACE MODE
491  if ( interface_ddg > 0 ) {
492 
493  //TR << "[DEBUG]: now in interface mode"<< std::endl;
494  //detect interface residues
495  using namespace core;
496  using namespace core::conformation;
497  using namespace core::chemical;
498 
499  utility::vector1<core::chemical::AA> residues_to_mutate;
500  //set up interface object
501  protocols::scoring::Interface protein_interface(interface_ddg);
502  protein_interface.distance(10.0);
503  protein_interface.calculate(pose);
504  // protein_interface.print(pose); // unnecessary log output
505 
506  //debug statement
507  for ( Size i =1; i<=pose.total_residue(); i++ ) {
508  if ( protein_interface.is_interface(i) ) {
509  TR.Debug << "[DEBUG]:" << i << " is in the interface " << std::endl;
510  }
511  }
512  //debug statement end
513 
514  for ( Size i =1; i<=pose.total_residue(); i++ ) {
515 
516  if ( protein_interface.is_interface(i) ) { //is interface residue
517 
518  for ( Size j =1; j <= 20 ; j++ ) { //iterate through all amino acids
519 
520  residues_to_mutate = all_unk; //mutate each interface residue one at a time
521  core::chemical::AA curr_aa = (core::chemical::AA)j;
522 
523  // if the current AA isn't already in the pose and if the pose AA isn't unknown
524  if ( curr_aa != pose.aa(i) && (pose.aa(i) != aa_unk) ) {
525 
526  // get residues to mutate and create ddGMover
527  residues_to_mutate[i]=curr_aa;
528  protocols::ddg::ddGMover interface_mutation(score_structure_scorefxn,minimize_sfxn,residues_to_mutate);
529 
530  // settings in ddGMover
531  interface_mutation.set_min_cst(min_cst);
532  interface_mutation.is_interface_ddg(interface_ddg);
533  interface_mutation.set_min(min);
534  interface_mutation.set_mean(mean);
535 
536  // is testing wt score complete?
537  if ( get_wt_score.is_wt_calc_complete() ) {
538  TR << "testing if wt calc is complete. should be complete!" << std::endl;
539  interface_mutation.wt_score_components(get_wt_score.wt_score_components());
540  interface_mutation.wt_unbound_score_components(get_wt_score.wt_unbound_score_components());
541  }
542 
543  // settings in ddGMover
544  if ( dump_pdbs ) interface_mutation.dump_pdbs(dump_pdbs);
545  if ( debug_output ) interface_mutation.debug_output(debug_output);
546  interface_mutation.num_iterations(num_iterations);
547 
548  // run ddGMover
549  interface_mutation.apply(pose);
550  delta_delta_G_label.push_back(interface_mutation.mutation_label(pose));
551  TR << "mutation label for this round is " << interface_mutation.mutation_label(pose) << std::endl;
552 
553  // get output
554  if ( interface_mutation.is_wt_calc_complete() &&
555  interface_mutation.is_mutant_calc_complete() ) {
556 
557  delta_energy_components.push_back(interface_mutation.get_delta_energy_components());
558  mutant_averaged_score_components.push_back(interface_mutation.get_mutant_averaged_score_components());
559  total_ddgs.push_back(interface_mutation.ddG());
560 
561  print_ddgs(ddg_out,
562  interface_mutation.mutation_label(pose),
563  interface_mutation.get_delta_energy_components(),
564  interface_mutation.get_mutant_averaged_score_components(),
565  interface_mutation.ddG(),
566  interface_mutation,
567  !header_printed,
568  min_cst);
569  if ( ! header_printed ) {
570  header_printed = true;
571  }
572  TR << "interface mutation is complete and ddg is: " << interface_mutation.ddG() << std::endl;
573  }
574  }
575  }//iterate through all amino acids
576  }
577  }
578  }
579 
580  /**
581  //format and output all the stored information
582  utility::vector1<std::string> scorefxn_header = get_wt_score.get_scorefunction_header(score_structure_scorefxn);
583 
584 
585  ddg_output <<"\n***********************************\n" <<
586  "ddG: description total ";
587  for(Size i =1; i <=scorefxn_header.size();i++){
588  ddg_output << scorefxn_header[i] << " ";
589  }
590  ddg_output << "\n***********************************\n";
591 
592  for(Size c=1;c<=delta_delta_G_label.size();c++){
593  if(delta_delta_G_label[c].compare("") != 0){
594  ddg_output << "ddG: " << delta_delta_G_label[c] << " " << F(9,3,total_ddgs[c]) << " ";
595  ddgs ddg_score_components = delta_energy_components[c];
596  for(Size m=1;m<=ddg_score_components.size();m++){
597  ddg_output << F(9,3,ddg_score_components[m]) << " ";
598  }
599  ddg_output << "\n";
600  }
601  }
602  ddg_output << std::endl;
603  **/
604 
605  } catch ( utility::excn::EXCN_Base const & e ) {
606  std::cout << "caught exception " << e.msg() << std::endl;
607  return -1;
608  }
609 }
610 
static T min(T x, T y)
Definition: Svm.cc:16
#define THREAD_LOCAL
virtual std::string const msg() const
Definition: EXCN_Base.hh:70
void exit(std::string const &file, int const line, std::string const &message, int const status)
Exit with file + line + message + optional status.
Definition: exit.cc:108
vector0: std::vector with assert-checked bounds
void init(int argc, char *argv[])
Command line init() version.
Definition: init.cc:23
BooleanOptionKey const user("options:user")
Definition: OptionKeys.hh:40
void read_in_mutations(utility::vector1< mutations > &res_to_mut, std::string filename, pose::Pose &pose)
The input file is a list of mutation blocks. Usually, this will be a set of point mutations...
Definition: ddg_monomer.cc:142
core::pose::Pose Pose
Definition: supercharge.cc:101
#define runtime_assert(_Expression)
Assert that the condition holds. Evaluated for both debug and release builds.
Definition: exit.hh:63
Tracer & T(std::string const &channel, TracerPriority priority)
T is special function for assign tracer property on the static object.
Definition: Tracer.cc:567
common derived classes for thrown exceptions
std::string start_file()
kind of like the old -s – just one file
Definition: util.cc:41
static THREAD_LOCAL basic::Tracer TR("apps.public.ddg.ddg_monomer")
Functions for opening database files.
Tracer & Error(TracerPriority priority=t_error)
Predefined Error tracer.
Definition: Tracer.hh:395
utility::vector1< core::chemical::AA > mutations
Definition: ddg_monomer.cc:72
Tracer IO system.
basic::options::OptionKeys collection
utility::vector1< double > ddgs
Definition: ddg_monomer.cc:73
std::vector with 1-based indexing
Definition: vector1.fwd.hh:44
TracerProxy Error
Definition: Tracer.hh:262
rule< Scanner, options_closure::context_t > options
Definition: Tag.cc:377
void print_ddgs(std::string ddg_out, std::string label, ddgs delta_e_components, ddgs, double total_ddgs, protocols::ddg::ddGMover &mover, bool print_header, bool min_cst)
print ddGs
Definition: ddg_monomer.cc:78
Tracer & Warning(TracerPriority priority=t_warning)
Predefined Warning tracer.
Definition: Tracer.hh:398
list resnum
if line_edit[13:14]=='P': #Nucleic acid? Skip.
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:45
T mean(Iterator first, Iterator last, T)
mean value of an input vector
Definition: functions.hh:34
Option lookup functions emulating Rosetta++ equivalents for transitional use.
std::string F(int const w, int const d, float const &t)
Fixed Point Format: float.
Definition: format.cc:387
ocstream cout(std::cout)
Wrapper around std::cout.
Definition: ocstream.hh:287
vector1: std::vector with 1-based indexing
Class for handling user debug/warnings/errors. Use instance of this class instead of 'std::cout' for ...
Definition: Tracer.hh:134
int main(int argc, char *argv[])
Definition: ddg_monomer.cc:204
#define OPT(akey)
Fast (x,y,z)-coordinate numeric vector.
platform::Size Size
Definition: random.fwd.hh:30
StringOptionKey wt("revert_app:wt")
TracerProxy Debug
Definition: Tracer.hh:262
rule< Scanner, option_closure::context_t > option
Definition: Tag.cc:378