Rosetta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
supercharge.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 apps/pilot/bder/supercharge.cc
11 /// @brief This protocol supercharges the surface of an input pdb with either positive or negatively charged residues.
12 /// @details There are two modes for supercharging. The first is called AvNAPSA developed by the David Liu lab at Harvard. In this approach, surface residues are defined by the Average # Neighbor Atoms Per Sidechain Atom (AvNAPSA value), with a cutoff of 150. I think 100 is a safer cutoff. Arg, Lys, Asp, Glu, Asn, Gln are the only residues allowed to mutated. Lys is always chosen for positive, Glu is always chosen for negative, unless the native is Asn, then Asp is chosen. Thus, the sequence is deterministic. If one desires a particular net charge, the residues would be sorted from low to high AvNAPSA value and mutated one at a time until the target charge is achieved - this ignores the ceiling of 150 or 100. The second approach uses the Rosetta score function to guide the surface mutagenesis. The user must specifiy if Arg, Lys, or Asp, Glu are desired, and what the reference weights are. Alternatively, the user can specify a target net charge, and the reference weights of the charged residues will be incremented/decremented until the net charge is reached.
13 /// @author Bryan Der
14 
15 
16 //AvNAPSA-mode, target charge
17 //1. Define surface. sort NQ and RK/DE residues by AvNAPSA value (low to high)
18 //2. Next residue in sorted list: Positive: mutate DENQ-->K, Negative: mutate RKQ-->E and N-->D
19 //3. If net charge = target net charge, output pdb
20 
21 //AvNAPSA-mode, no target charge
22 //1. Define surface by AvNAPSA value (<100 default)
23 //2. For each NQ and DE/RK residue in the surface: Positive: mutate DENQ-->K, Negative: mutate RKQ-->E and N-->D
24 //3. Output pdb
25 
26 //Rosetta-mode, target charge
27 //1. Define surface. Neighbor by distance calculator (CB dist.), <16 neighbors default
28 // or Define surface by AvNAPSA value (<100 default)
29 //2. Set design task
30 // read user resfile, if provided
31 // dont_mutate gly, pro, cys
32 // dont_mutate h-bonded sidechains
33 // dont_mutate correct charge residues
34 //3. Set reference energies for RK/DE, starting at user input values
35 //4. pack rotamers mover
36 //5. check net charge, increment/decrement reference energies (back to step 3.)
37 //6. Once a pack rotamers run results in the correct net charge, output pdb
38 
39 //Rosetta-mode, no target charge
40 //1. Define surface. Neighbor by distance calculator (CB dist.), <16 neighbors default
41 // or Define surface by AvNAPSA value (<100 default)
42 //2. Set design task
43 // read user resfile, if provided
44 // dont_mutate gly, pro, cys
45 // dont_mutate h-bonded sidechains
46 // dont_mutate correct charge residues
47 //3. Set reference energies for RK/DE, using the user input values
48 //4. pack rotamers mover
49 //5. Output pdb
50 
51 
52 #include <devel/init.hh>
53 
54 #include <core/conformation/Residue.hh>
55 #include <core/kinematics/MoveMap.hh>
56 #include <core/pack/task/TaskFactory.hh>
57 #include <core/pack/task/operation/TaskOperations.hh>
58 #include <core/pack/task/operation/TaskOperation.hh>
59 #include <core/pose/Pose.hh>
60 #include <core/pose/PDBInfo.hh>
61 #include <core/pose/metrics/CalculatorFactory.hh>
62 #include <core/scoring/ScoreFunction.hh>
63 #include <core/scoring/ScoreFunctionFactory.hh>
64 #include <core/scoring/methods/EnergyMethodOptions.hh>
65 #include <core/scoring/hbonds/HBondOptions.hh>
66 #include <core/scoring/Energies.hh>
67 #include <core/scoring/hbonds/HBondSet.hh>
68 
69 #include <protocols/moves/Mover.hh>
70 #include <protocols/simple_moves/MinMover.hh>
71 #include <protocols/simple_moves/PackRotamersMover.hh>
72 #include <protocols/jd2/JobDistributor.hh>
73 #include <protocols/toolbox/pose_metric_calculators/NeighborsByDistanceCalculator.hh>
74 #include <protocols/toolbox/task_operations/RestrictToInterface.hh>
75 #include <basic/options/option.hh>
76 #include <basic/options/keys/packing.OptionKeys.gen.hh>
77 #include <basic/options/keys/out.OptionKeys.gen.hh>
78 #include <basic/MetricValue.hh>
79 #include <basic/Tracer.hh>
80 #include <utility/exit.hh>
81 #include <utility/file/FileName.hh>
82 #include <utility/io/ozstream.hh> // used to create a resfile
84 #include <sstream>
85 #include <string>
86 #include <fstream>
87 
88 #include <utility/vector0.hh>
89 #include <utility/vector1.hh>
91 #include <math.h>
92 
93 
94 //tracers
95 using basic::Error;
96 using basic::Warning;
97 using basic::T;
98 static THREAD_LOCAL basic::Tracer TR( "apps.public.design.supercharge" );
99 
100 using namespace core;
102 typedef std::set< Size > SizeSet;
103 
104 //local options
105 namespace local {
106 
107 //AvNAPSA-mode
108 basic::options::BooleanOptionKey const AvNAPSA_positive("AvNAPSA_positive");
109 basic::options::BooleanOptionKey const AvNAPSA_negative("AvNAPSA_negative");
110 
111 basic::options::BooleanOptionKey const target_net_charge_active("target_net_charge_active"); //ideally I'd use .user() to see if the option is active, but implementation on the ROSIE server requires this separate flag
112 basic::options::IntegerOptionKey const target_net_charge("target_net_charge");
113 
114 //AvNAPSA-mode or Rosetta-mode
115 basic::options::IntegerOptionKey const surface_atom_cutoff("surface_atom_cutoff"); // if target_net_charge is specified, the AvNAPSA cutoff is ignored
116 
117 //Rosetta-mode (these will be ignored if AvNAPSA mode is on via AvNAPSA_positive or AvNAPSA_negative)
118 basic::options::IntegerOptionKey const surface_residue_cutoff("surface_residue_cutoff"); //for choosing surface residues, cannot be done in AvNAPSA mode
119 basic::options::BooleanOptionKey const include_arg("include_arg");
120 basic::options::BooleanOptionKey const include_lys("include_lys");
121 basic::options::BooleanOptionKey const include_asp("include_asp");
122 basic::options::BooleanOptionKey const include_glu("include_glu");
123 basic::options::RealOptionKey const refweight_arg("refweight_arg");
124 basic::options::RealOptionKey const refweight_lys("refweight_lys");
125 basic::options::RealOptionKey const refweight_asp("refweight_asp");
126 basic::options::RealOptionKey const refweight_glu("refweight_glu");
127 basic::options::BooleanOptionKey const dont_mutate_glyprocys("dont_mutate_glyprocys"); // true by default
128 basic::options::BooleanOptionKey const dont_mutate_correct_charge("dont_mutate_correct_charge"); // true by default
129 basic::options::BooleanOptionKey const dont_mutate_hbonded_sidechains("dont_mutate_hbonded_sidechains"); // true by default
130 basic::options::BooleanOptionKey const pre_packminpack("pre_packminpack"); // true by default
131 basic::options::IntegerOptionKey const nstruct("nstruct"); // custom nstruct, not used in AvNAPSA mode bc that sequence is deterministic
132 
133 //AvNAPSA-mode or Rosetta-mode
134 basic::options::BooleanOptionKey const compare_residue_energies_all("compare_residue_energies_all");
135 basic::options::BooleanOptionKey const compare_residue_energies_mut("compare_residue_energies_mut");
136 
137 //Note: either mode will read a user input resfile, but be sure to use ALLAA as the default, because NATAA default will make the surface residues undesignable. Either mode will make a second resfile with NATAA as default.
138 
139 }//local
140 
141 
142 /// @brief Adds charged residues to a protein surface
144 public:
146  virtual ~supercharge(){};
147 
148 
149  virtual
150  void
151  apply( Pose & pose ) {
152  using namespace basic::options;
154 
155  //check for chain ID
156  char chain = pose.pdb_info()->chain(1);
157  if ( chain == ' ' ) {
158  TR << "chain is whitespace, setting chain ID to 'A' " << std::endl;
159  for ( Size i=1; i<=pose.total_residue(); ++i ) {
160  pose.pdb_info()->chain(i, 'A');
161  }
162  }
163 
164 
165  //If the target net charge is -10, current net charge is -4, need to perform positive-supercharging
167 
168  int current_net_charge = get_net_charge( pose );
170  int delta_charge = target_net_charge - current_net_charge;
171 
172  if ( delta_charge < 0 ) {
173 
175  TR << "Current charge: " << current_net_charge << ". Target charge: " << target_net_charge << ". Incompatible user inputs. Cannot add negative charge with current options. Try using the flags include_asp include_glu (Rosetta-mode) or AvNAPSA_negative (AvNAPSA-mode)." << std::endl;
176  set_last_move_status(protocols::moves::FAIL_DO_NOT_RETRY);
177  return;
178  }
179  } else if ( delta_charge > 0 ) {
181  TR << "Current charge: " << current_net_charge << ". Target charge: " << target_net_charge << ". Incompatible user inputs. Cannot add positive charge with current options. Try using the flags include_arg include_lys (Rosetta-mode) or AvNAPSA_positive (AvNAPSA-mode)." << std::endl;
182  set_last_move_status(protocols::moves::FAIL_DO_NOT_RETRY);
183  return;
184  }
185  } else if ( delta_charge == 0 ) {
186  TR << "Current charge: " << current_net_charge << ". Target charge: " << target_net_charge << ". Current charge equals target charge, no supercharging necessary." << std::endl;
187  set_last_move_status(protocols::moves::FAIL_DO_NOT_RETRY);
188  return;
189  }
190  }
191 
192 
193  option[OptionKeys::packing::use_input_sc](true); // always use_input_sc
194  prepack_input_structure( pose );
195 
196  Pose const starting_pose( pose ); //save starting pose to list mutations
197  Pose native( starting_pose );
198 
199  //AvNAPSA mode. Does not use Rosetta energy calculation, chooses mutable positions solely by number of atom neighbors per sidechain
201  AvNAPSA_values( pose );
202  set_resfile_AvNAPSA( pose );
203  design_supercharge_AvNAPSA( starting_pose, pose );
204  } else {
205  //Rosetta mode. Uses Rosetta energy function to choose which residues to mutate and to what residue type.
206  //score pose for hbond detection
207  using namespace core::scoring;
208  ScoreFunctionOP scorefxn = get_score_function();
209  scoring::methods::EnergyMethodOptions energymethodoptions( scorefxn->energy_method_options() );
210  energymethodoptions.hbond_options().decompose_bb_hb_into_pair_energies(true);
211  scorefxn->set_energy_method_options( energymethodoptions );
212  scorefxn->score( pose );
213 
214  set_surface( pose );
215  set_resfile( pose ); // default=NATRO, same-charge=NATAA, allow native+desired charge
216  design_supercharge( starting_pose, pose ); // sets reference energies, designs the surface, outputs with an informative name
217  }
218 
220  energy_comparison( native, pose );
221  }
222 
223  return;
224  }
225 
226 
227  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
228  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
229  /////////// BEGIN AVNAPSA MODE (average number of neighboring atoms per sidechain atom) //////////////////////////////////////
230  ////////// doesn't consider surface energetics, operates only on surface accessibility //////////////////////////////////////
231  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
232  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
233 
234  virtual
235  void
236  AvNAPSA_values( Pose const & pose ) { //average number of neighboring atoms per sidechain atom
237 
238  for ( Size i=1; i <= pose.n_residue(); ++i ) {
239  Real avnapsa_value( 9999 ); //high value will mean don't mutate, don't mutate by default
240 
241  std::string name3 = pose.residue(i).name3();
242 
243  if ( name3 == "ASP" || name3 == "GLU" || name3 == "ARG" || name3 == "LYS" || name3 == "ASN" || name3 == "GLN" ) {
244 
245  //don't mutate correct charge
247  if ( name3 == "ARG" || name3 == "LYS" ) {
248  AvNAPSA_values_.push_back( avnapsa_value );
249  TR << "residue " << i << " is already positive" << std::endl;
250  continue;
251  }
253  if ( name3 == "ASP" || name3 == "GLU" ) {
254  AvNAPSA_values_.push_back( avnapsa_value );
255  TR << "residue " << i << " is already negative" << std::endl;
256  continue;
257  }
258  }
259 
260  conformation::Residue const & i_rsd( pose.residue( i ) );
261  Size total_atom_neighbors_of_sidechain( 1 );
262 
263  for ( Size ii = i_rsd.first_sidechain_atom(); ii <= i_rsd.nheavyatoms(); ++ii ) {
264  conformation::Atom const & ii_atom( i_rsd.atom( ii ) );
265  Vector const & ii_atom_xyz = ii_atom.xyz();
266 
267  for ( Size j=1; j <= pose.n_residue(); ++j ) {
268 
269  conformation::Residue const & j_rsd( pose.residue( j ) );
270 
271 
272  for ( Size jj = 1; jj <= j_rsd.nheavyatoms(); ++jj ) {
273 
274  //TR << i << " " << ii << " " << j << " " << jj << " total " << total_atom_neighbors_of_sidechain << std::endl;
275 
276  conformation::Atom const & jj_atom( j_rsd.atom( jj ) );
277  Vector const & jj_atom_xyz = jj_atom.xyz();
278 
279  if ( ii_atom_xyz.distance( jj_atom_xyz ) < 10.0 ) {
280  ++total_atom_neighbors_of_sidechain;
281  }
282  }
283  }
284  }
285 
286 
287  Size number_of_sidechain_atoms = i_rsd.nheavyatoms() - 4; // four backbone atoms, would equal 0 if residue is Glycine and this would cause a crash
288  avnapsa_value = total_atom_neighbors_of_sidechain / number_of_sidechain_atoms;
289 
290  TR << "residue: " << i << " heavy: " << i_rsd.nheavyatoms() << " " << "sidechain: " << i_rsd.first_sidechain_atom() << " AvNAPSA_value: " << avnapsa_value << std::endl;
291 
292  }
293 
294  AvNAPSA_values_.push_back( avnapsa_value ); //index must equal the residue number
295  }
296 
297  TR << "there are " << pose.total_residue() << " residues and " << AvNAPSA_values_.size() << " AvNAPSA values" << std::endl;
298 
299  return;
300  }
301 
302 
303  virtual
304  void
306 
307  TR << "Creating a resfile, it will be saved as " << out_path_ << "resfile_output_Asc" << std::endl;
308  utility::io::ozstream OutputResfile;
309  OutputResfile.open( out_path_ + '/' + "resfile_output_Asc" );
310 
311  OutputResfile << "NATAA" << std::endl;
312  OutputResfile << "start" << std::endl;
313 
314  std::stringstream pymol_avnapsa_residues;
315  utility::vector1< Size > residues_to_mutate; //will be appended either to acheive correct charge or based on AvNAPSA value cutoff
316 
318  largest_mutated_AvNAPSA_ = (Size) basic::options::option[local::surface_atom_cutoff]; // no specified net charge, largest AvNAPSA allowed equals the cutoff. This value is used to name output PDBs.
319  for ( Size i(1); i <= AvNAPSA_values_.size(); ++i ) {
320  if ( AvNAPSA_values_[i] < basic::options::option[local::surface_atom_cutoff] && AvNAPSA_values_[i] != 9999 ) {
321  residues_to_mutate.push_back( i );
322  TR << "Mutate " << i << std::endl;
323  }
324  }
325  } else {
326  // if a target net charge is included, the AvNAPSA cutoff is ignored
327  //sort residues by their avnapsa value in ascending order
328  utility::vector1<std::pair<Size,Real> > pair_residue_avnapsa;
329  for ( Size i(1); i<= AvNAPSA_values_.size(); ++i ) {
330  if ( AvNAPSA_values_[i] != 9999 ) {
331  pair_residue_avnapsa.push_back( std::pair<Size,Real>(i,AvNAPSA_values_[i]) );
332  }
333  }
334  std::sort(pair_residue_avnapsa.begin(), pair_residue_avnapsa.end(), utility::SortSecond< Size, Real >() );
335 
336 
337  //append residues to mutate until the resulting net charge would be correct +- 1
338  int net_charge = get_net_charge( pose );
339  TR << "Starting net charge is " << net_charge << " and target_net_charge is " << basic::options::option[local::target_net_charge] << std::endl;
340 
341  for ( Size i(1); i <= pair_residue_avnapsa.size(); ++i ) {
342  Size this_res = pair_residue_avnapsa[i].first;
343  std::string name3 = pose.residue(this_res).name3();
344 
346  break; // if positive enough
347  } else if ( basic::options::option[local::AvNAPSA_negative] && net_charge <= basic::options::option[local::target_net_charge] ) {
348  break; // if negative enough
349  } else if ( pair_residue_avnapsa[i].second != 9999 ) { // if not charged enough, add another residue to mutate
350  residues_to_mutate.push_back(this_res);
351  TR << "Mutate " << this_res << std::endl;
352  }
353 
355  if ( name3 == "ASP" || name3 == "GLU" ) {
356  net_charge += 2;
357  } else if ( name3 == "ARG" || name3 == "LYS" ) {
358  net_charge += 0;
359  } else {
360  net_charge += 1;
361  }
362  }
364  if ( name3 == "ARG" || name3 == "LYS" ) {
365  net_charge -= 2;
366  } else if ( name3 == "ASP" || name3 == "GLU" ) {
367  net_charge -= 0;
368  } else {
369  net_charge -= 1;
370  }
371  }
372  //net charge will only be correct plus/minus 1
373  //pose net charge will actually change upon pack_rotamers->apply
374 
375  }
376 
377  Size number_to_mutate = residues_to_mutate.size();
378  largest_mutated_AvNAPSA_ = (Size) pair_residue_avnapsa[number_to_mutate].second; //for naming output PDBs
379  }
380 
381 
382  ////////// if no target net charge //////////////
383  for ( Size i(1); i <= residues_to_mutate.size(); ++i ) {
384  Size j = residues_to_mutate[i];
385  pymol_avnapsa_residues << j << "+";
387  OutputResfile << " " << pose.pdb_info()->pose2pdb( j ) /*prints resnum and chain*/ << " PIKAA K" << std::endl; //lysine only, see SuppInfo of Lawrence et al. 2007
389  std::string resname = pose.residue(j).name3();
390  if ( resname == "ASN" ) {
391  OutputResfile << " " << pose.pdb_info()->pose2pdb( j ) /*prints resnum and chain*/ << " PIKAA D" << std::endl; //Asp only if Asn is native
392  } else {
393  OutputResfile << " " << pose.pdb_info()->pose2pdb( j ) /*prints resnum and chain*/ << " PIKAA E" << std::endl; //Glu by default
394  }
395  }
396  }
397 
398  TR << "PYMOL_SELECT AVNAPSA residues: " << pymol_avnapsa_residues.str() << std::endl;
399 
400  return;
401  }
402 
403 
404  virtual
405  void
406  design_supercharge_AvNAPSA( Pose const & starting_pose, Pose & pose ) { //there are no choices, either NATRO or the only PIKAA residue from the AvNAPSA resfile
407 
408  using namespace core::pack::task;
409  using namespace core::pack::task::operation;
410  using namespace basic::options;
411  TaskFactoryOP task_factory( new TaskFactory() );
412  task_factory->push_back(TaskOperationCOP( new operation::InitializeFromCommandline() )); //ex1, ex1, minimize sidechains, use_input_sc
413 
414  // first, read in user resfile. Intended to only contain NATAA or NATRO to specify additional residues to not mutation MUST have ALLAA as default!!
415  if ( option[ OptionKeys::packing::resfile ].user() ) {
416  task_factory->push_back( TaskOperationCOP( new operation::ReadResfile ) );
417  TR << "Reading resfile from user input... make sure ALLAA is set as the default in your resfile!!" << std::endl;
418  }
419 
420  task_factory->push_back( TaskOperationCOP( new operation::ReadResfile( out_path_ + '/' + "resfile_output_Asc" ) ) ); // reads the resfile previously created, adds to the user resfile (if provided)
421 
422  using namespace core::scoring;
423  ScoreFunctionOP scorefxn = get_score_function();
424  scoring::methods::EnergyMethodOptions energymethodoptions( scorefxn->energy_method_options() );
425  energymethodoptions.hbond_options().decompose_bb_hb_into_pair_energies(true);
426  scorefxn->set_energy_method_options( energymethodoptions );
427  scorefxn_ = scorefxn;
428 
429  utility::file::FileName input_pdbname( pose.pdb_info()->name() );
430  std::string input_namebase( input_pdbname.base() );
431 
432  protocols::simple_moves::PackRotamersMoverOP packrot_mover( new protocols::simple_moves::PackRotamersMover );
433  packrot_mover->score_function( scorefxn );
434  packrot_mover->task_factory( task_factory );
435  packrot_mover->apply( pose ); /////////////////APPLY PACKROT MOVER
436  packrot_mover->apply( pose ); /////////////////APPLY PACKROT MOVER
437  packrot_mover->apply( pose ); /////////////////APPLY PACKROT MOVER
438 
439 
440  std::string pos_or_neg;
442  pos_or_neg = "pos";
443  } else {
444  pos_or_neg = "neg";
445  }
446 
447  int final_net_charge = get_net_charge( pose );
448  std::stringstream name_info;
449  name_info << "_AvNAPSA_" << pos_or_neg << "_" << largest_mutated_AvNAPSA_ << "_" << final_net_charge;
450 
451  outputname_ = input_namebase + name_info.str() + ".pdb";
452  TR << "NEW NAME FOR SUPERCHARGED OUTPUT: " << outputname_ << std::endl;
453 
454  scorefxn->score( pose );
455 
456  pose.dump_scored_pdb( out_path_ + '/' + outputname_, *scorefxn );
457 
458  print_netcharge_and_mutations(starting_pose, pose );
459 
460 
461  return;
462  }
463 
464 
465  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
466  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
467  ///////////////////////////////////// BEGIN ROSETTA MODE /////////////////////////////////////////////////////////
468  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
469  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
470 
471  virtual
472  void
474 
475  using namespace core::pack::task;
476  using namespace core::pack::task::operation;
477  using namespace basic::options;
478  TaskFactoryOP task_factory( new TaskFactory() );
479  task_factory->push_back(TaskOperationCOP( new operation::InitializeFromCommandline() )); //use_input_sc
480 
481  using namespace core::scoring;
482  ScoreFunctionOP scorefxn = get_score_function();
483  scoring::methods::EnergyMethodOptions energymethodoptions( scorefxn->energy_method_options() );
484  energymethodoptions.hbond_options().decompose_bb_hb_into_pair_energies(true);
485  scorefxn->set_energy_method_options( energymethodoptions );
486  scorefxn_ = scorefxn;
487 
488  protocols::simple_moves::PackRotamersMoverOP packrot_mover( new protocols::simple_moves::PackRotamersMover );
489  packrot_mover->score_function( scorefxn_ );
490 
491  core::pack::task::operation::RestrictToRepackingOP restrict_to_repack( new core::pack::task::operation::RestrictToRepacking() );
492  task_factory->push_back( restrict_to_repack );
493 
494  packrot_mover->task_factory( task_factory );
495 
496  kinematics::MoveMapOP movemap_sc( new kinematics::MoveMap );
497  kinematics::MoveMapOP movemap_scbb( new kinematics::MoveMap );
498  movemap_sc->set_chi( true );
499  movemap_sc->set_bb( false );
500  movemap_scbb->set_chi( true );
501  movemap_scbb->set_bb( true );
502 
503  protocols::simple_moves::MinMoverOP min_sc( new protocols::simple_moves::MinMover( movemap_sc, scorefxn_, "dfpmin_armijo", 0.01, true ) );
504  protocols::simple_moves::MinMoverOP min_scbb( new protocols::simple_moves::MinMover( movemap_scbb, scorefxn_, "dfpmin_armijo", 0.01, true ) );
505 
506 
507  TR << "Packrotamers" << std::endl;
508  packrot_mover->apply( pose );
509  packrot_mover->apply( pose );
510  packrot_mover->apply( pose );
511 
513  TR << "Minimizing sidechains..." << std::endl;
514  min_sc->apply( pose );
515  TR << "Packrotamers" << std::endl;
516  packrot_mover->apply( pose );
517  packrot_mover->apply( pose );
518  TR << "Minimizing sidechains and backbone..." << std::endl;
519  min_sc->apply( pose );
520  min_scbb->apply( pose );
521  TR << "Packrotamers" << std::endl;
522  packrot_mover->apply( pose );
523  packrot_mover->apply( pose );
524  TR << "Minimizing sidechains and backbone..." << std::endl;
525  min_sc->apply( pose );
526  min_scbb->apply( pose );
527  TR << "Packrotamers" << std::endl;
528  packrot_mover->apply( pose );
529  packrot_mover->apply( pose );
530  }
531 
532  return;
533  }
534 
535 
536  void set_surface( Pose const & pose ){
537 
538  //define surface by residue neighbors
540  // registering the calculators (in this way will not allow nstruct > 1)
541  Size biggest_calc(0);
542  std::string const calc_stem("nbr_dist_calc_");
543  std::ostringstream calcname;
544  for ( Size res(1); res <= pose.total_residue(); ++res ) {
545  if ( biggest_calc < res ) { //create calculator
546  calcname << calc_stem << res;
547  if ( pose::metrics::CalculatorFactory::Instance().check_calculator_exists( calcname.str() ) ) {
548  basic::Warning() << "Calculator " << calcname.str() << " already exists, this is hopefully correct for your purposes" << std::endl;
549  } else {
550  using pose::metrics::PoseMetricCalculatorOP;
551  pose::metrics::CalculatorFactory::Instance().register_calculator( calcname.str(), PoseMetricCalculatorOP( new protocols::toolbox::pose_metric_calculators::NeighborsByDistanceCalculator(res) ) );
552  }
553  calcname.str("");
554  ++biggest_calc;
555  }
556  }
557  //find surface residues (number of neighbors cutoff)
558 
559 
560  basic::MetricValue< Size > num_n; // number of neighbors
561  TR << pose.pdb_info()->name() << std::endl;
562  for ( Size i(1); i<=pose.total_residue(); ++i ) {
563  calcname << calc_stem << i;
564  pose.metric( calcname.str(), "num_neighbors", num_n);
565  calcname.str("");
566 
567  //TR << "residue " << i << " num_neighbors " << num_n.value() << std::endl;
568 
570  TR << "adding " << i << " to surface set" << std::endl;
571  surface_res_.insert(i);
572  }
573  }
574  } else {
575  //define surface by atom neighbors
576 
577  for ( Size i=1; i <= pose.n_residue(); ++i ) {
578  Real avnapsa_value( 9999 ); //high value will mean don't mutate, don't mutate by default
579 
580  std::string name3 = pose.residue(i).name3();
581 
582  if ( name3 == "GLY" ) {
583  continue;
584  }
585 
586 
587  conformation::Residue const & i_rsd( pose.residue( i ) );
588  Size total_atom_neighbors_of_sidechain( 1 );
589 
590  for ( Size ii = i_rsd.first_sidechain_atom(); ii <= i_rsd.nheavyatoms(); ++ii ) {
591  conformation::Atom const & ii_atom( i_rsd.atom( ii ) );
592  Vector const & ii_atom_xyz = ii_atom.xyz();
593 
594  for ( Size j=1; j <= pose.n_residue(); ++j ) {
595 
596  conformation::Residue const & j_rsd( pose.residue( j ) );
597 
598 
599  for ( Size jj = 1; jj <= j_rsd.nheavyatoms(); ++jj ) {
600 
601  conformation::Atom const & jj_atom( j_rsd.atom( jj ) );
602  Vector const & jj_atom_xyz = jj_atom.xyz();
603 
604  if ( ii_atom_xyz.distance( jj_atom_xyz ) < 10.0 ) {
605  ++total_atom_neighbors_of_sidechain;
606  }
607  }
608  }
609  }
610 
611 
612  Size number_of_sidechain_atoms = i_rsd.nheavyatoms() - 4; // four backbone atoms, would equal 0 if residue is Glycine and this would cause a crash
613  avnapsa_value = total_atom_neighbors_of_sidechain / number_of_sidechain_atoms;
614 
615  //TR << "residue: " << i << " heavy: " << i_rsd.nheavyatoms() << " " << "sidechain: " << i_rsd.first_sidechain_atom() << " AvNAPSA_value: " << avnapsa_value << std::endl;
616 
617  AvNAPSA_values_.push_back( avnapsa_value ); //index must equal the residue number
618  TR << "AvNAPSA score for residue " << i << " " << avnapsa_value << std::endl;
619 
620  for ( Size i(1); i<= AvNAPSA_values_.size(); ++i ) {
621  if ( AvNAPSA_values_[i] <= basic::options::option[local::surface_atom_cutoff] ) { //every residue has an AvNAPSA value, so i equals residue number
622  surface_res_.insert(i);
623  }
624  }
625  }
626 
627  } //else
628 
629 
630  return;
631  }
632 
633 
634  void set_resfile( Pose const & pose ){
635  using namespace basic::options;
636 
637  TR << "Creating a resfile, it will be saved as " << out_path_ << "resfile_output_Rsc" << std::endl;
638  utility::io::ozstream OutputResfile;
639  OutputResfile.open( out_path_ + '/' + "resfile_output_Rsc" );
640 
641  OutputResfile << "NATAA" << std::endl;
642  OutputResfile << "start" << std::endl;
643 
644 
645  //compute set of hbonds
646  core::scoring::hbonds::HBondSet hbond_set;
647  hbond_set.setup_for_residue_pair_energies( pose, false, false );
648 
649  for ( SizeSet::const_iterator it(surface_res_.begin()), end(surface_res_.end()); it!=end; ++it ) {
650 
651  char NATAA_oneletter = pose.residue(*it).name1();
652 
653  //gly, pro, and cys are specialized residues that might be better of unchanged
655  if ( NATAA_oneletter == 'G' || NATAA_oneletter == 'P' || NATAA_oneletter == 'C' ) {
656  continue;
657  }
658  }
659 
660  //if same-charge, leave as NATAA
662  if ( option[local::include_arg] && NATAA_oneletter == 'R' ) {
663  OutputResfile << " " << pose.pdb_info()->pose2pdb(*it) /*prints resnum and chain*/ << " NATAA #same charge" << std::endl;
664  continue;
665  }
666  if ( option[local::include_lys] && NATAA_oneletter == 'K' ) {
667  OutputResfile << " " << pose.pdb_info()->pose2pdb(*it) /*prints resnum and chain*/ << " NATAA #same charge" << std::endl;
668  continue;
669  }
670  if ( option[local::include_asp] && NATAA_oneletter == 'D' ) {
671  OutputResfile << " " << pose.pdb_info()->pose2pdb(*it) /*prints resnum and chain*/ << " NATAA #same charge" << std::endl;
672  continue;
673  }
674  if ( option[local::include_glu] && NATAA_oneletter == 'E' ) {
675  OutputResfile << " " << pose.pdb_info()->pose2pdb(*it) /*prints resnum and chain*/ << " NATAA #same charge" << std::endl;
676  continue;
677  }
678  }
679 
680  //dont_mutate strong sidechain hbonds
682  //hbond detection
683  bool found_sc_hbond( false );
684 
685  for ( Size i = 1; i<= hbond_set.nhbonds(); i++ ) {
686  core::scoring::hbonds::HBondCOP hbond(hbond_set.hbond(i).get_self_ptr());
687  if ( hbond->energy() > -0.5 ) { // a fun semi-arbitrary value for hbond strength cutoff
688  continue;
689  }
690  if ( hbond->don_res() == *it && !hbond->don_hatm_is_backbone() ) {
691 
692  OutputResfile << " " << pose.pdb_info()->pose2pdb(*it) /*prints resnum and chain*/ << " NATRO #has sc hbond energy=" << hbond->energy() << std::endl;
693 
694  found_sc_hbond = true;
695  break;
696  }
697  if ( hbond->acc_res() == *it && !hbond->acc_atm_is_protein_backbone() ) {
698  OutputResfile << " " << pose.pdb_info()->pose2pdb(*it) /*prints resnum and chain*/ << " NATRO #has sc hbond energy=" << hbond->energy() << std::endl;
699  found_sc_hbond = true;
700  break;
701  }
702  }
703  if ( found_sc_hbond ) {
704  continue;
705  }
706  }
707 
708 
709  //if there hasn't been a continue, it's a mutable position
710  utility::vector1<char> PIKAA_residues;
711  PIKAA_residues.push_back(NATAA_oneletter); // the native amino acid is allowed
712  if ( option[local::include_arg].value() ) {
713  PIKAA_residues.push_back('R');
714  }
715  if ( option[local::include_lys].value() ) {
716  PIKAA_residues.push_back('K');
717  }
718  if ( option[local::include_asp].value() ) {
719  PIKAA_residues.push_back('D');
720  }
721  if ( option[local::include_glu].value() ) {
722  PIKAA_residues.push_back('E');
723  }
724 
725  // print lines in the resfile uch as: 3 A PIKAA NRK
726  OutputResfile << " " << pose.pdb_info()->pose2pdb(*it) /*prints resnum and chain*/ << " PIKAA ";
727  for ( core::Size j(1); j<=PIKAA_residues.size(); ++j ) {
728  OutputResfile << PIKAA_residues[j];
729  }
730  OutputResfile << std::endl;
731 
732  }//iterate over surface residues
733 
734  return;
735  }
736 
737 
740  using namespace basic::options;
741  utility::vector1< Real > ref_weights;
742  ref_weights.push_back(0.16); //A 1
743  ref_weights.push_back(1.7); //C 2
744  ref_weights.push_back( option[local::refweight_asp] ); //D 3 (default=-0.67)
745  ref_weights.push_back( option[local::refweight_glu] ); //E 4 (default=-0.81)
746  ref_weights.push_back(0.63); //F 5
747  ref_weights.push_back(-0.17); //G 6
748  ref_weights.push_back(0.56); //H 7
749  ref_weights.push_back(0.24); //I 8
750  ref_weights.push_back( option[local::refweight_lys] ); //K 9 (default=-0.65)
751  ref_weights.push_back(-0.1); //L 10
752  ref_weights.push_back(-0.34); //M 11
753  ref_weights.push_back(-0.89); //N 12
754  ref_weights.push_back(0.02); //P 13
755  ref_weights.push_back(-0.97); //Q 14
756  ref_weights.push_back( option[local::refweight_arg] ); //R 15 (default=-0.98)
757  ref_weights.push_back(-0.37); //S 16
758  ref_weights.push_back(-0.27); //T 17
759  ref_weights.push_back(0.29); //V 18
760  ref_weights.push_back(0.91); //W 19
761  ref_weights.push_back(0.51); //Y 20
762  //0.16 1.7 -0.67 -0.81 0.63 -0.17 0.56 0.24 -0.65 -0.1 -0.34 -0.89 0.02 -0.97 -0.98 -0.37 -0.27 0.29 0.91 0.51
763 
764  return ref_weights;
765  }
766 
767  void
769 
770  using namespace core::pack::task;
771  using namespace core::pack::task::operation;
772  using namespace basic::options;
773  TaskFactoryOP task_factory( new TaskFactory() );
774  task_factory->push_back(TaskOperationCOP( new operation::InitializeFromCommandline() )); //ex1, ex1, minimize sidechains, use_input_sc
775 
776  // first, read in user resfile. Intended to only contain NATAA or NATRO to specify additional residues to not mutation MUST have ALLAA as default!!
777  if ( option[ OptionKeys::packing::resfile ].user() ) {
778  task_factory->push_back( TaskOperationCOP( new operation::ReadResfile ) );
779  TR << "Reading resfile from user input... make sure ALLAA is set as the default in your resfile!!" << std::endl;
780  }
781 
782  task_factory->push_back( TaskOperationCOP( new operation::ReadResfile( out_path_ + '/' + "resfile_output_Rsc" ) ) ); // reads the resfile previously created, adds to the user resfile (if provided)
783 
784  using namespace core::scoring;
785  ScoreFunctionOP scorefxn = get_score_function();
786  scoring::methods::EnergyMethodOptions energymethodoptions( scorefxn->energy_method_options() );
787  energymethodoptions.hbond_options().decompose_bb_hb_into_pair_energies(true);
788  scorefxn->set_energy_method_options( energymethodoptions );
789 
790  ScoreFunctionOP customref_scorefxn = get_score_function();
791  scoring::methods::EnergyMethodOptions energymethodoptions_customref( customref_scorefxn->energy_method_options() );
792  energymethodoptions_customref.hbond_options().decompose_bb_hb_into_pair_energies(true);
793  customref_scorefxn->set_energy_method_options( energymethodoptions_customref );
794  utility::vector1< Real > custom_ref_weights = set_reference_energies(); // SET REFERENCE ENERGIES function
795  customref_scorefxn->set_method_weights( ref, custom_ref_weights );
796  TR << "Using SCORE12 with custom reference weights\n" << *customref_scorefxn << std::flush;
797  scorefxn_ = scorefxn;
798 
799  protocols::simple_moves::PackRotamersMoverOP packrot_mover( new protocols::simple_moves::PackRotamersMover );
800  packrot_mover->score_function( customref_scorefxn );
801  packrot_mover->task_factory( task_factory );
802 
803  //Pose pre_design( pose );
804  //native_ = pre_design;
805 
806 
807  //if a target net charge is given as an option, iterate between packrot and incrementing refweights until target charge is acheived
809 
810  int net_charge_target = option[local::target_net_charge];
811  int charge_diff = std::abs( get_net_charge(pose) - net_charge_target );
812 
813 
814  Real refweight_max_absvalue(3.2);
815  bool refweight_under_max( true );
816  Real refweight_increment(0.10);
817  Size counter(0);
818  while ( charge_diff > 1 && counter < 40 && refweight_under_max ) {
819 
820  int net_charge = get_net_charge( pose );
821 
822  //fine-tunes the changes to refweight depending on the charge difference
823  if ( std::abs(net_charge - net_charge_target) > 10 ) { refweight_increment = 0.5; }
824  else if ( std::abs(net_charge - net_charge_target) > 2 ) { refweight_increment = 0.1; }
825  else if ( std::abs(net_charge - net_charge_target) < 2 ) { refweight_increment = 0.02;}
826 
827 
828  //not positive enough
829  if ( net_charge < net_charge_target && option[local::include_arg] ) {
830  custom_ref_weights[15] = custom_ref_weights[15] - refweight_increment;
831  }
832  if ( net_charge < net_charge_target && option[local::include_lys] ) {
833  custom_ref_weights[9] = custom_ref_weights[9] - refweight_increment;
834  }
835  //too positive
836  if ( net_charge > net_charge_target && option[local::include_arg] ) {
837  custom_ref_weights[15] = custom_ref_weights[15] + refweight_increment;
838  }
839  if ( net_charge > net_charge_target && option[local::include_lys] ) {
840  custom_ref_weights[9] = custom_ref_weights[9] + refweight_increment;
841  }
842 
843  //not negative enough
844  if ( net_charge > net_charge_target && option[local::include_asp] ) {
845  custom_ref_weights[3] = custom_ref_weights[3] - refweight_increment;
846  //TR << "TEST " << refweight_increment << std::endl;
847  }
848  if ( net_charge > net_charge_target && option[local::include_glu] ) {
849  custom_ref_weights[4] = custom_ref_weights[4] - refweight_increment;
850  }
851  //too negative
852  if ( net_charge < net_charge_target && option[local::include_asp] ) {
853  custom_ref_weights[3] = custom_ref_weights[3] + refweight_increment;
854  }
855  if ( net_charge < net_charge_target && option[local::include_glu] ) {
856  custom_ref_weights[4] = custom_ref_weights[4] + refweight_increment;
857  }
858 
859  customref_scorefxn->set_method_weights( ref, custom_ref_weights );
860  packrot_mover->score_function( customref_scorefxn );
861 
862  //////////////////////////////////////////////////////////////////////////////
863  ///////////////////////////// DESIGN STEP //////////////////////////////////
864  //////////////////////////////////////////////////////////////////////////////
865 
866  TR << "Supercharging the protein surface... current charge: " << net_charge << " target charge: " << net_charge_target << std::endl;
867  TR << "Refweights D E K R " << custom_ref_weights[3] << " " << custom_ref_weights[4] << " " << custom_ref_weights[9] << " " << custom_ref_weights[15] << std::endl;
868  packrot_mover->apply( pose );
869 
870  charge_diff = std::abs( get_net_charge(pose) - net_charge_target );
871 
872  counter++;
873 
874  if ( fabs(custom_ref_weights[15]) > refweight_max_absvalue || fabs(custom_ref_weights[9]) > refweight_max_absvalue || fabs(custom_ref_weights[3]) > refweight_max_absvalue || fabs(custom_ref_weights[4]) > refweight_max_absvalue ) {
875  refweight_under_max = false;
876  }
877 
878  }
879 
880  }
881 
882 
883  /////////////// rename pdb for output ////////////////////////////////////////
884 
885  utility::file::FileName input_pdbname( pose.pdb_info()->name() );
886  std::string input_namebase( input_pdbname.base() );
887  std::string include_RKDE = "_";
888  std::string weights_RKDE = "_";
889 
890  if ( option[local::include_arg] ) {
891  include_RKDE = include_RKDE + "R";
892  std::string s;
893  std::stringstream out;
894  out << std::setprecision(2) << std::fixed << custom_ref_weights[15];
895  //out << option[local::refweight_arg];
896  s = out.str();
897  if ( custom_ref_weights[15] > 0.0 ) { s = "+" + s; }
898  weights_RKDE = weights_RKDE + s + "_";
899  }
900  if ( option[local::include_lys] ) {
901  include_RKDE = include_RKDE + "K";
902  std::string s;
903  std::stringstream out;
904  out << std::setprecision(2) << std::fixed << custom_ref_weights[9];
905  //out << option[local::refweight_lys];
906  s = out.str();
907  if ( custom_ref_weights[9] > 0.0 ) { s = "+" + s; }
908  weights_RKDE = weights_RKDE + s + "_";
909  }
910  if ( option[local::include_asp] ) {
911  include_RKDE = include_RKDE + "D";
912  std::string s;
913  std::stringstream out;
914  out << std::setprecision(2) << std::fixed << custom_ref_weights[3];
915  //out << option[local::refweight_asp];
916  s = out.str();
917  if ( custom_ref_weights[3] > 0.0 ) { s = "+" + s; }
918  weights_RKDE = weights_RKDE + s + "_";
919  }
920  if ( option[local::include_glu] ) {
921  include_RKDE = include_RKDE + "E";
922  std::string s;
923  std::stringstream out;
924  out << std::setprecision(2) << std::fixed << custom_ref_weights[4];
925  //out << option[local::refweight_glu];
926  s = out.str();
927  if ( custom_ref_weights[4] > 0.0 ) { s = "+" + s; }
928  weights_RKDE = weights_RKDE + s + "_";
929  }
930 
931 
932  std::stringstream ss_i;
933  std::string i_string;
934 
935  if ( ! option[local::target_net_charge_active] ) {
936 
938  for ( Size i=1; i <= nstruct; ++i ) {
939  ss_i << i;
940  if ( i < 10 ) { i_string = "000" + ss_i.str(); }
941  else if ( i < 100 ) { i_string = "00" + ss_i.str(); }
942  else if ( i < 1000 ) { i_string = "0" + ss_i.str(); }
943  else { i_string = ss_i.str(); }
944  ss_i.str(""); // clear stringstream
945 
946  //////////////////////////////////////////////////////////////////////////////
947  ///////////////////////////// DESIGN STEP //////////////////////////////////
948  //////////////////////////////////////////////////////////////////////////////
949 
950  TR << "Supercharging the protein surface... nstruct = " << i << std::endl;
951  packrot_mover->apply( pose );
952  packrot_mover->apply( pose );
953  packrot_mover->apply( pose );
954 
955  outputname_ = input_namebase + include_RKDE + weights_RKDE + i_string + ".pdb";
956  TR << "NEW NAME FOR SUPERCHARGED OUTPUT: " << outputname_ << std::endl;
957 
958  scorefxn->score( pose );
959 
960  pose.dump_scored_pdb( out_path_ + '/' + outputname_, *scorefxn ); //score with regular-weighted scorefunction
961 
962  print_netcharge_and_mutations(starting_pose, pose );
963 
964 
965  }//for nstruct
966 
967  } else { //don't do nstruct if specifying a target charge
968  //apply packrot mover was already done until converging on target charge
969  ss_i << get_net_charge( pose );
970  i_string = ss_i.str();
971 
972  outputname_ = input_namebase + include_RKDE + weights_RKDE + i_string + ".pdb";
973  TR << "NEW NAME FOR SUPERCHARGED OUTPUT: " << outputname_ << std::endl;
974 
975  scorefxn->score( pose );
976 
977  pose.dump_scored_pdb( out_path_ + '/' + outputname_, *scorefxn ); //score with regular-weighted scorefunction
978 
979  print_netcharge_and_mutations(starting_pose, pose );
980 
981  }
982 
983 
984  }
985 
986  void
988  // net charge
989  Size num_arg = 0;
990  Size num_lys = 0;
991  Size num_asp = 0;
992  Size num_glu = 0;
993 
994  for ( Size i=1; i<=pose.total_residue(); i++ ) {
995  if ( pose.residue(i).name3() == "ARG" ) { num_arg++; }
996  else if ( pose.residue(i).name3() == "LYS" ) { num_lys++; }
997  else if ( pose.residue(i).name3() == "ASP" ) { num_asp++; }
998  else if ( pose.residue(i).name3() == "GLU" ) { num_glu++; }
999  }
1000  int net_charge = num_arg + num_lys - num_asp - num_glu;
1001  TR << outputname_ << " Net Charge of input structure = " << get_net_charge( starting_pose ) << std::endl;
1002  TR << outputname_ << " R=" << num_arg << ", K=" << num_lys << ", D=" << num_asp << ", E=" << num_glu << std::endl;
1003  TR << outputname_ << " Net Charge = " << net_charge << std::endl;
1004 
1005  Size num_mutations = 0;
1006  std::string pymol_sel_mutations = "select ";
1007  TR << outputname_ << " Mutations: ";
1008  for ( Size i=1; i<=pose.total_residue(); i++ ) {
1009  //TR << "name1: " << starting_pose.residue(i).name1() << " " << pose.residue(i).name1() << std::endl;
1010  if ( pose.residue(i).name1() != starting_pose.residue(i).name1() ) {
1011  num_mutations++;
1012  Size whitespace = pose.pdb_info()->pose2pdb(i).find(" ");
1013  std::string resnum_only = pose.pdb_info()->pose2pdb(i).substr(0, whitespace);
1014  TR << starting_pose.residue(i).name1() << resnum_only << pose.residue(i).name1() << ", ";
1015  pymol_sel_mutations = pymol_sel_mutations + resnum_only + "+";
1016  }
1017  }
1018  TR << std::endl;
1019  TR << outputname_ << " # of mutations: " << num_mutations << std::endl;
1020  TR << outputname_ << " " << pymol_sel_mutations << std::endl;
1021 
1022  }
1023 
1024 
1025  int
1026  get_net_charge( Pose const & pose ) {
1027  int net_charge(0);
1028  for ( Size i(1); i<=pose.total_residue(); ++i ) {
1029  std::string name3 = pose.residue(i).name3();
1030  if ( name3 == "ARG" || name3 == "LYS" ) {
1031  net_charge++;
1032  } else if ( name3 == "ASP" || name3 == "GLU" ) {
1033  net_charge--;
1034  }
1035  }
1036  return net_charge;
1037  }
1038 
1039 
1040  void
1042 
1043  TR << "Comparing energies of native and designed" << std::endl;
1044  assert(native.total_residue() == pose.total_residue());
1045 
1046  using namespace core::pack::task;
1047  using namespace core::pack::task::operation;
1048  using namespace basic::options;
1049  TaskFactoryOP task_factory( new TaskFactory() );
1050  task_factory->push_back(TaskOperationCOP( new operation::InitializeFromCommandline() )); //need for use_input_sc
1051  core::pack::task::operation::RestrictToRepackingOP restrict_to_repack( new core::pack::task::operation::RestrictToRepacking() );
1052  task_factory->push_back( restrict_to_repack );
1053 
1054  protocols::simple_moves::PackRotamersMoverOP packrot_mover( new protocols::simple_moves::PackRotamersMover );
1055  packrot_mover->score_function( scorefxn_ );
1056  packrot_mover->task_factory( task_factory );
1057 
1058  //kinematics::MoveMapOP movemap_sc = new kinematics::MoveMap;
1059  //kinematics::MoveMapOP movemap_scbb = new kinematics::MoveMap;
1060  //movemap_sc->set_chi( true );
1061  //movemap_scbb->set_chi( true );
1062  //movemap_scbb->set_bb( true );
1063 
1064  //protocols::simple_moves::MinMoverOP min_sc = new protocols::simple_moves::MinMover( movemap_sc, scorefxn_, "dfpmin_armijo", 0.01, true );
1065  //protocols::simple_moves::MinMoverOP min_scbb = new protocols::simple_moves::MinMover( movemap_scbb, scorefxn_, "dfpmin_armijo", 0.01, true );
1066 
1067  TR << "Packing designed" << std::endl;
1068  packrot_mover->apply( pose );
1069  packrot_mover->apply( pose );
1070  packrot_mover->apply( pose );
1071  TR << "Packing native" << std::endl;
1072  packrot_mover->apply( native );
1073  packrot_mover->apply( native );
1074  packrot_mover->apply( native );
1075 
1076  //min_sc->apply( pose );
1077  //min_scbb->apply( pose );
1078  //packrot_mover->apply( pose );
1079 
1080 
1081  TR << "Scoring native and design" << std::endl;
1082  scorefxn_->score(native);
1083  scorefxn_->score(pose);
1084 
1085  //native.dump_scored_pdb("native.pdb", *scorefxn_);
1086  //pose.dump_scored_pdb("pose.pdb", *scorefxn_);
1087 
1088  //talaris2013 score terms
1089  //total fa_atr fa_rep fa_sol fa_intra_rep fa_elec pro_close hbond_sr_bb hbond_lr_bb hbond_bb_sc hbond_sc dslf_fa13 rama omega fa_dun p_aa_pp ref
1090 
1091  utility::vector1< Real > total_native;
1092  utility::vector1< Real > fa_atr_native;
1093  utility::vector1< Real > fa_rep_native;
1094  utility::vector1< Real > fa_sol_native;
1095  utility::vector1< Real > fa_intra_rep_native;
1096  utility::vector1< Real > fa_elec_native;
1097  utility::vector1< Real > pro_close_native;
1098  utility::vector1< Real > hbond_sr_bb_native;
1099  utility::vector1< Real > hbond_lr_bb_native;
1100  utility::vector1< Real > hbond_bb_sc_native;
1101  utility::vector1< Real > hbond_sc_native;
1102  utility::vector1< Real > dslf_fa13_native;
1103  utility::vector1< Real > rama_native;
1104  utility::vector1< Real > omega_native;
1105  utility::vector1< Real > fa_dun_native;
1106  utility::vector1< Real > p_aa_pp_native;
1107  utility::vector1< Real > ref_native;
1108 
1110  utility::vector1< Real > fa_atr;
1111  utility::vector1< Real > fa_rep;
1112  utility::vector1< Real > fa_sol;
1113  utility::vector1< Real > fa_intra_rep;
1114  utility::vector1< Real > fa_elec;
1115  utility::vector1< Real > pro_close;
1116  utility::vector1< Real > hbond_sr_bb;
1117  utility::vector1< Real > hbond_lr_bb;
1118  utility::vector1< Real > hbond_bb_sc;
1119  utility::vector1< Real > hbond_sc;
1120  utility::vector1< Real > dslf_fa13;
1123  utility::vector1< Real > fa_dun;
1124  utility::vector1< Real > p_aa_pp;
1126 
1127  utility::vector1< Real > diff_total;
1128  utility::vector1< Real > diff_fa_atr;
1129  utility::vector1< Real > diff_fa_rep;
1130  utility::vector1< Real > diff_fa_sol;
1131  utility::vector1< Real > diff_fa_intra_rep;
1132  utility::vector1< Real > diff_fa_elec;
1133  utility::vector1< Real > diff_pro_close;
1134  utility::vector1< Real > diff_hbond_sr_bb;
1135  utility::vector1< Real > diff_hbond_lr_bb;
1136  utility::vector1< Real > diff_hbond_bb_sc;
1137  utility::vector1< Real > diff_hbond_sc;
1138  utility::vector1< Real > diff_dslf_fa13;
1139  utility::vector1< Real > diff_rama;
1140  utility::vector1< Real > diff_omega;
1141  utility::vector1< Real > diff_fa_dun;
1142  utility::vector1< Real > diff_p_aa_pp;
1143  utility::vector1< Real > diff_ref;
1144 
1145 
1146  utility::vector1< Size > resnums;
1147 
1148  //talaris2013 score terms
1149  //total fa_atr fa_rep fa_sol fa_intra_rep fa_elec pro_close hbond_sr_bb hbond_lr_bb hbond_bb_sc hbond_sc dslf_fa13 rama omega fa_dun p_aa_pp ref
1150 
1151  TR << "Initialized vectors" << std::endl;
1152  TR << "Adding native energies" << std::endl;
1153  for ( Size i(1); i <= native.total_residue(); ++i ) {
1154 
1155  total_native.push_back( native.energies().residue_total_energy(i) );
1156  fa_atr_native.push_back( native.energies().residue_total_energies(i)[scoring::fa_atr] );
1157  fa_rep_native.push_back( native.energies().residue_total_energies(i)[scoring::fa_rep] );
1158  fa_sol_native.push_back( native.energies().residue_total_energies(i)[scoring::fa_sol] );
1159  fa_intra_rep_native.push_back( native.energies().residue_total_energies(i)[scoring::fa_intra_rep] );
1160  fa_elec_native.push_back( native.energies().residue_total_energies(i)[scoring::fa_elec] );
1161  pro_close_native.push_back( native.energies().residue_total_energies(i)[scoring::pro_close] );
1162  hbond_sr_bb_native.push_back( native.energies().residue_total_energies(i)[scoring::hbond_sr_bb] );
1163  hbond_lr_bb_native.push_back( native.energies().residue_total_energies(i)[scoring::hbond_lr_bb] );
1164  hbond_bb_sc_native.push_back( native.energies().residue_total_energies(i)[scoring::hbond_bb_sc] );
1165  hbond_sc_native.push_back( native.energies().residue_total_energies(i)[scoring::hbond_sc] );
1166  dslf_fa13_native.push_back( native.energies().residue_total_energies(i)[scoring::dslf_fa13] );
1167  rama_native.push_back( native.energies().residue_total_energies(i)[scoring::rama] );
1168  omega_native.push_back( native.energies().residue_total_energies(i)[scoring::omega] );
1169  fa_dun_native.push_back( native.energies().residue_total_energies(i)[scoring::fa_dun] );
1170  p_aa_pp_native.push_back( native.energies().residue_total_energies(i)[scoring::p_aa_pp] );
1171  ref_native.push_back( native.energies().residue_total_energies(i)[scoring::ref] );
1172  }
1173 
1174  TR << "Adding designed energies" << std::endl;
1175  for ( Size i(1); i <= pose.total_residue(); ++i ) {
1176 
1177  total.push_back( pose.energies().residue_total_energy(i) );
1178  fa_atr.push_back( pose.energies().residue_total_energies(i)[scoring::fa_atr] );
1179  fa_rep.push_back( pose.energies().residue_total_energies(i)[scoring::fa_rep] );
1180  fa_sol.push_back( pose.energies().residue_total_energies(i)[scoring::fa_sol] );
1181  fa_intra_rep.push_back( pose.energies().residue_total_energies(i)[scoring::fa_intra_rep] );
1182  fa_elec.push_back( pose.energies().residue_total_energies(i)[scoring::fa_elec] );
1183  pro_close.push_back( pose.energies().residue_total_energies(i)[scoring::pro_close] );
1184  hbond_sr_bb.push_back( pose.energies().residue_total_energies(i)[scoring::hbond_sr_bb] );
1185  hbond_lr_bb.push_back( pose.energies().residue_total_energies(i)[scoring::hbond_lr_bb] );
1186  hbond_bb_sc.push_back( pose.energies().residue_total_energies(i)[scoring::hbond_bb_sc] );
1187  hbond_sc.push_back( pose.energies().residue_total_energies(i)[scoring::hbond_sc] );
1188  dslf_fa13.push_back( pose.energies().residue_total_energies(i)[scoring::dslf_fa13] );
1189  rama.push_back( pose.energies().residue_total_energies(i)[scoring::rama] );
1190  omega.push_back( pose.energies().residue_total_energies(i)[scoring::omega] );
1191  fa_dun.push_back( pose.energies().residue_total_energies(i)[scoring::fa_dun] );
1192  p_aa_pp.push_back( pose.energies().residue_total_energies(i)[scoring::p_aa_pp] );
1193  ref.push_back( pose.energies().residue_total_energies(i)[scoring::ref] );
1194 
1195  resnums.push_back( i ); //only need for pose or native, one or the other
1196 
1197  }
1198 
1199 
1200  Real sum_total(0);
1201  Real sum_fa_atr(0);
1202  Real sum_fa_rep(0);
1203  Real sum_fa_sol(0);
1204  Real sum_fa_intra_rep(0);
1205  Real sum_fa_elec(0);
1206  Real sum_pro_close(0);
1207  Real sum_hbond_sr_bb(0);
1208  Real sum_hbond_lr_bb(0);
1209  Real sum_hbond_bb_sc(0);
1210  Real sum_hbond_sc(0);
1211  Real sum_dslf_fa13(0);
1212  Real sum_rama(0);
1213  Real sum_omega(0);
1214  Real sum_fa_dun(0);
1215  Real sum_p_aa_pp(0);
1216  Real sum_ref(0);
1217 
1218 
1219  TR << "Subtracting design from native energies" << std::endl;
1220 
1221  for ( Size jj(1); jj <= resnums.size(); ++jj ) {
1222 
1223  Size ii = resnums[jj];
1224 
1225  std::string native_name3 = native.residue(ii).name3();
1226  std::string pose_name3 = pose.residue(ii).name3();
1227 
1228  bool is_mutation( native_name3 != pose_name3);
1230 
1231  //TR << "comparing residue " << ii << " " << native_name3 << " " << pose_name3 << " mutation? " << is_mutation << " mutation_option " << is_mutation_option << std::endl;
1232 
1233  if ( is_mutation || !is_mutation_option ) {
1234 
1235  Real diff_total = total[ii] - total_native[ii];
1236  Real diff_fa_atr = fa_atr[ii] - fa_atr_native[ii];
1237  Real diff_fa_rep = fa_rep[ii] - fa_rep_native[ii];
1238  Real diff_fa_sol = fa_sol[ii] - fa_sol_native[ii];
1239  Real diff_fa_intra_rep = fa_intra_rep[ii] - fa_intra_rep_native[ii];
1240  Real diff_fa_elec = fa_elec[ii] - fa_elec_native[ii];
1241  Real diff_pro_close = pro_close[ii] - pro_close_native[ii];
1242  Real diff_hbond_sr_bb = hbond_sr_bb[ii] - hbond_sr_bb_native[ii];
1243  Real diff_hbond_lr_bb = hbond_lr_bb[ii] - hbond_lr_bb_native[ii];
1244  Real diff_hbond_bb_sc = hbond_bb_sc[ii] - hbond_bb_sc_native[ii];
1245  Real diff_hbond_sc = hbond_sc[ii] - hbond_sc_native[ii];
1246  Real diff_dslf_fa13 = dslf_fa13[ii] - dslf_fa13_native[ii];
1247  Real diff_rama = rama[ii] - rama_native[ii];
1248  Real diff_omega = omega[ii] - omega_native[ii];
1249  Real diff_fa_dun = fa_dun[ii] - fa_dun_native[ii];
1250  Real diff_p_aa_pp = p_aa_pp[ii] - p_aa_pp_native[ii];
1251  Real diff_ref = ref[ii] - ref_native[ii];
1252 
1253  sum_total += diff_total ;
1254  sum_fa_atr += diff_fa_atr ;
1255  sum_fa_rep += diff_fa_rep ;
1256  sum_fa_sol += diff_fa_sol ;
1257  sum_fa_intra_rep += diff_fa_intra_rep ;
1258  sum_fa_elec += diff_fa_elec ;
1259  sum_pro_close += diff_pro_close ;
1260  sum_hbond_sr_bb += diff_hbond_sr_bb ;
1261  sum_hbond_lr_bb += diff_hbond_lr_bb ;
1262  sum_hbond_bb_sc += diff_hbond_bb_sc ;
1263  sum_hbond_sc += diff_hbond_sc ;
1264  sum_dslf_fa13 += diff_dslf_fa13 ;
1265  sum_rama += diff_rama ;
1266  sum_omega += diff_omega ;
1267  sum_fa_dun += diff_fa_dun ;
1268  sum_p_aa_pp += diff_p_aa_pp ;
1269  sum_ref += diff_ref ;
1270 
1271  //will print in columns
1272  TR << pose.pdb_info()->name() << " " << ii << " ";
1273  TR << std::setprecision(4) << std::fixed << diff_total << " ";
1274  TR << std::setprecision(4) << std::fixed << diff_fa_atr << " ";
1275  TR << std::setprecision(4) << std::fixed << diff_fa_rep << " ";
1276  TR << std::setprecision(4) << std::fixed << diff_fa_sol << " ";
1277  TR << std::setprecision(4) << std::fixed << diff_fa_intra_rep << " ";
1278  TR << std::setprecision(4) << std::fixed << diff_fa_elec << " ";
1279  TR << std::setprecision(4) << std::fixed << diff_pro_close << " ";
1280  TR << std::setprecision(4) << std::fixed << diff_hbond_sr_bb << " ";
1281  TR << std::setprecision(4) << std::fixed << diff_hbond_lr_bb << " ";
1282  TR << std::setprecision(4) << std::fixed << diff_hbond_bb_sc << " ";
1283  TR << std::setprecision(4) << std::fixed << diff_hbond_sc << " ";
1284  TR << std::setprecision(4) << std::fixed << diff_dslf_fa13 << " ";
1285  TR << std::setprecision(4) << std::fixed << diff_rama << " ";
1286  TR << std::setprecision(4) << std::fixed << diff_omega << " ";
1287  TR << std::setprecision(4) << std::fixed << diff_fa_dun << " ";
1288  TR << std::setprecision(4) << std::fixed << diff_p_aa_pp << " ";
1289  TR << std::setprecision(4) << std::fixed << diff_ref << " ";
1290  TR << std::endl;
1291 
1292  }
1293 
1294  }
1295 
1296  TR << pose.pdb_info()->name() << " SUM-DIFFS ";
1297  TR << sum_total << std::setprecision(4) << std::fixed << " ";
1298  TR << sum_fa_atr << std::setprecision(4) << std::fixed << " ";
1299  TR << sum_fa_rep << std::setprecision(4) << std::fixed << " ";
1300  TR << sum_fa_sol << std::setprecision(4) << std::fixed << " ";
1301  TR << sum_fa_intra_rep<< std::setprecision(4) << std::fixed << " ";
1302  TR << sum_fa_elec << std::setprecision(4) << std::fixed << " ";
1303  TR << sum_pro_close << std::setprecision(4) << std::fixed << " ";
1304  TR << sum_hbond_sr_bb << std::setprecision(4) << std::fixed << " ";
1305  TR << sum_hbond_lr_bb << std::setprecision(4) << std::fixed << " ";
1306  TR << sum_hbond_bb_sc << std::setprecision(4) << std::fixed << " ";
1307  TR << sum_hbond_sc << std::setprecision(4) << std::fixed << " ";
1308  TR << sum_dslf_fa13 << std::setprecision(4) << std::fixed << " ";
1309  TR << sum_rama << std::setprecision(4) << std::fixed << " ";
1310  TR << sum_omega << std::setprecision(4) << std::fixed << " ";
1311  TR << sum_fa_dun << std::setprecision(4) << std::fixed << " ";
1312  TR << sum_p_aa_pp << std::setprecision(4) << std::fixed << " ";
1313  TR << sum_ref << std::setprecision(4) << std::fixed << " ";
1314  TR << std::endl;
1315 
1316  TR << pose.pdb_info()->name() << " score_terms: total fa_atr fa_rep fa_sol fa_intra_rep fa_elec pro_close hbond_sr_bb hbond_lr_bb hbond_bb_sc hbond_sc dslf_fa13 rama omega fa_dun p_aa_pp ref" << std::endl;
1317 
1318  return;
1319  }
1320 
1321 
1322  virtual
1323  std::string
1324  get_name() const { return "supercharge"; }
1325 
1326 
1327 private:
1329  std::string outputname_;
1330  std::string out_path_;
1334 
1335  core::scoring::ScoreFunctionOP scorefxn_;
1336 };
1337 
1338 typedef utility::pointer::shared_ptr< supercharge > superchargeOP;
1339 
1340 int main( int argc, char* argv[] )
1341 {
1342  try {
1343 
1344  using basic::options::option;
1345  option.add( local::AvNAPSA_positive, "AvNAPSA positive supercharge").def(false);
1346  option.add( local::AvNAPSA_negative, "AvNAPSA negative supercharge").def(false);
1347 
1348  option.add( local::target_net_charge_active, "target net charge active").def(false);
1349  option.add( local::target_net_charge, "target net charge").def(0);
1350 
1351  option.add( local::surface_atom_cutoff, "AvNAPSA neighbor atom cutoff").def(120); // this is how AvNAPSA defines surface, can be used in the Rosetta approach
1352  option.add( local::surface_residue_cutoff, "cutoff for surface residues ( <= # is surface)" ).def(16);
1353 
1354  option.add( local::include_arg, "include arg in supercharge design").def(false);
1355  option.add( local::include_lys, "include lys in supercharge design").def(false);
1356  option.add( local::include_asp, "include asp in supercharge design").def(false);
1357  option.add( local::include_glu, "include glu in supercharge design").def(false);
1358  option.add( local::refweight_arg, "reference energy for Arg").def(-0.14916);
1359  option.add( local::refweight_lys, "reference energy for Lys").def(-0.287374);
1360  option.add( local::refweight_asp, "reference energy for Asp").def(-1.28682);
1361  option.add( local::refweight_glu, "reference energy for Glu").def(-1.55374);
1362  option.add( local::dont_mutate_glyprocys, "don't mutate gly, pro, cys").def(true);
1363  option.add( local::dont_mutate_correct_charge, "don't mutate correct charge").def(true);
1364  option.add( local::dont_mutate_hbonded_sidechains, "don't mutate hbonded sidechains").def(true);
1365  option.add( local::pre_packminpack, "pack-min-pack before supercharging").def(false);
1366 
1367  option.add( local::nstruct, "local nstruct").def(1);
1368 
1369  option.add( local::compare_residue_energies_all, "compare energy terms for all residues").def(false);
1370  option.add( local::compare_residue_energies_mut, "compare energy terms for mutated residues only").def(true);
1371 
1372  devel::init(argc, argv);
1373 
1374  protocols::jd2::JobDistributor::get_instance()->go(protocols::moves::MoverOP( new supercharge ));
1375 
1376  TR << "************************d**o**n**e**************************************" << std::endl;
1377 
1378  } catch ( utility::excn::EXCN_Base const & e ) {
1379  std::cout << "caught exception " << e.msg() << std::endl;
1380  return -1;
1381  }
1382  return 0;
1383 }
virtual void apply(Pose &pose)
Definition: supercharge.cc:151
SizeSet surface_res_
basic::options::BooleanOptionKey const include_asp("include_asp")
#define THREAD_LOCAL
virtual std::string const msg() const
Definition: EXCN_Base.hh:70
Size largest_mutated_AvNAPSA_
Automatic hidden index key for integer options.
basic::options::RealOptionKey const refweight_arg("refweight_arg")
T const & value() const
Definition: MetricValue.hh:60
basic::options::BooleanOptionKey const AvNAPSA_negative("AvNAPSA_negative")
core::scoring::ScoreFunctionOP scorefxn_
void energy_comparison(Pose &native, Pose &pose)
utility::keys::KeyLookup< KeyType >::const_iterator const_iterator
Key collection iterators.
vector0: std::vector with assert-checked bounds
std::string out_path_
virtual void prepack_input_structure(Pose &pose)
Definition: supercharge.cc:473
utility::vector1< Real > AvNAPSA_values_
void init(int argc, char *argv[])
Command line init() version.
Definition: init.cc:23
virtual ~supercharge()
Definition: supercharge.cc:146
BooleanOptionKey const user("options:user")
Definition: OptionKeys.hh:40
basic::options::RealOptionKey const refweight_glu("refweight_glu")
core::pose::Pose Pose
Definition: supercharge.cc:101
utility::keys::lookup::end< KeyType > const end
Automatic hidden index key for real options.
int main(int argc, char *argv[])
int get_net_charge(Pose const &pose)
File name class supporting Windows and UN*X/Linux format names.
Definition: FileName.hh:37
Tracer & T(std::string const &channel, TracerPriority priority)
T is special function for assign tracer property on the static object.
Definition: Tracer.cc:567
void set_surface(Pose const &pose)
Definition: supercharge.cc:536
common derived classes for thrown exceptions
basic::options::BooleanOptionKey const AvNAPSA_positive("AvNAPSA_positive")
basic::options::BooleanOptionKey const target_net_charge_active("target_net_charge_active")
virtual void design_supercharge_AvNAPSA(Pose const &starting_pose, Pose &pose)
Definition: supercharge.cc:406
basic::options::BooleanOptionKey const include_glu("include_glu")
tuple scorefxn
Definition: PyMOL_demo.py:63
basic::options::BooleanOptionKey const compare_residue_energies_all("compare_residue_energies_all")
basic::options::BooleanOptionKey const compare_residue_energies_mut("compare_residue_energies_mut")
std::set< Size > SizeSet
Definition: supercharge.cc:102
member1 value
Definition: Tag.cc:296
basic::options::IntegerOptionKey const surface_residue_cutoff("surface_residue_cutoff")
void set_resfile(Pose const &pose)
Definition: supercharge.cc:634
Program exit functions and macros.
Tracer & Error(TracerPriority priority=t_error)
Predefined Error tracer.
Definition: Tracer.hh:395
void design_supercharge(Pose const &starting_pose, Pose &pose)
Definition: supercharge.cc:768
basic::options::BooleanOptionKey const include_arg("include_arg")
xyzVector< Real > Vector
Tracer IO system.
basic::options::BooleanOptionKey const dont_mutate_correct_charge("dont_mutate_correct_charge")
virtual void AvNAPSA_values(Pose const &pose)
Definition: supercharge.cc:236
basic::options::IntegerOptionKey const surface_atom_cutoff("surface_atom_cutoff")
T abs(T const &x)
std::abs( x ) == | x |
Definition: Fmath.hh:295
Automatic hidden index key for boolean options.
utility::pointer::shared_ptr< supercharge > superchargeOP
File name class supporting Windows and UN*X/Linux format names.
basic::options::IntegerOptionKey const nstruct("nstruct")
rule< Scanner, options_closure::context_t > options
Definition: Tag.cc:377
Tracer & Warning(TracerPriority priority=t_warning)
Predefined Warning tracer.
Definition: Tracer.hh:398
utility::options::OptionCollection option
OptionCollection global.
Definition: option.cc:45
Output file stream wrapper for uncompressed and compressed files.
list native
Definition: ContactMap.py:108
double Real
Definition: types.hh:39
basic::options::RealOptionKey const refweight_lys("refweight_lys")
basic::options::BooleanOptionKey const include_lys("include_lys")
basic::options::IntegerOptionKey const target_net_charge("target_net_charge")
ocstream cout(std::cout)
Wrapper around std::cout.
Definition: ocstream.hh:287
basic::options::RealOptionKey const refweight_asp("refweight_asp")
utility::vector1< Real > set_reference_energies()
Definition: supercharge.cc:739
vector1: std::vector with 1-based indexing
Adds charged residues to a protein surface.
Definition: supercharge.cc:143
virtual void set_resfile_AvNAPSA(Pose const &pose)
Definition: supercharge.cc:305
Class for handling user debug/warnings/errors. Use instance of this class instead of 'std::cout' for ...
Definition: Tracer.hh:134
static THREAD_LOCAL basic::Tracer TR("apps.public.design.supercharge")
std::string outputname_
basic::options::BooleanOptionKey const pre_packminpack("pre_packminpack")
ozstream: Output file stream wrapper for uncompressed and compressed files
Definition: ozstream.hh:53
void print_netcharge_and_mutations(Pose const &starting_pose, Pose const &pose)
Definition: supercharge.cc:987
Program options global and initialization function.
void open(std::string const &filename_a, std::ios_base::openmode open_mode=std::ios_base::out)
Open a file.
Definition: ozstream.cc:62
platform::Size Size
Definition: random.fwd.hh:30
virtual std::string get_name() const
rule< Scanner, option_closure::context_t > option
Definition: Tag.cc:378
basic::options::BooleanOptionKey const dont_mutate_glyprocys("dont_mutate_glyprocys")
basic::options::BooleanOptionKey const dont_mutate_hbonded_sidechains("dont_mutate_hbonded_sidechains")