Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LigandArea.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 core/pack/task/ResfileReader.cc
11 /// @brief implementation of resfile reader and its command classes
12 /// @author Gordon Lemmon (glemmon@gmail.com)
13 ///
14 
15 // Project Headers
16 #include <core/types.hh>
17 #include <basic/Tracer.hh>
18 
19 // Unit Headers
21 
22 // Utility headers
23 #include <utility/tag/Tag.hh>
24 
25 #include <utility/vector0.hh>
26 #include <utility/excn/Exceptions.hh>
27 #include <utility/vector1.hh>
28 
29 
30 namespace protocols {
31 namespace ligand_docking {
32 
33 static basic::Tracer ligand_area_tracer("protocols.ligand_docking.ligand_options.LigandArea", basic::t_debug);
34 
36  ReferenceCount(),
37  chain_('?'),
38  cutoff_(0),
39  Calpha_restraints_(0),
40  minimize_ligand_(0),
41  tether_ligand_(0),
42  high_res_angstroms_(0.1),
43  high_res_degrees_(2.8648),// the old code had 0.05 radians
44  add_nbr_radius_(false),
45  all_atom_mode_(false)
46 {}
47 
49 
51  utility::tag::TagPtr const tag
52 ){
53  if ( ! tag->hasOption("chain") ) throw utility::excn::EXCN_RosettaScriptsOption("'LigandArea' requires 'chain' tag");
54  chain_= tag->getOption<char>("chain");
55 
56  if ( ! tag->hasOption("cutoff") ) throw utility::excn::EXCN_RosettaScriptsOption("'LigandArea' requires 'cutoff' tag");
57  cutoff_= tag->getOption<core::Real>("cutoff");
58 
59  if ( tag->hasOption("Calpha_restraints") )
60  Calpha_restraints_= tag->getOption<core::Real>("Calpha_restraints");
61 
62  if ( tag->hasOption("minimize_ligand") )
63  minimize_ligand_= tag->getOption<core::Real>("minimize_ligand");
64 
65  if ( tag->hasOption("tether_ligand") )
66  tether_ligand_= tag->getOption<core::Real>("tether_ligand");
67 
68  if(tag->getOption<std::string>("add_nbr_radius") == "true")
69  add_nbr_radius_= true;
70  else if(tag->getOption<std::string>("add_nbr_radius") != "false")
71  throw utility::excn::EXCN_RosettaScriptsOption("'add_nbr_radius' option is true or false");
72 
73  if(tag->getOption<std::string>("all_atom_mode") == "true")
74  all_atom_mode_= true;
75  else if(tag->getOption<std::string>("all_atom_mode") != "false")
76  throw utility::excn::EXCN_RosettaScriptsOption("'all_atom_mode' option is true or false");
77 
78  if ( tag->hasOption("high_res_angstroms") )
79  high_res_angstroms_= tag->getOption<float>("high_res_angstroms");
80 
81  if ( tag->hasOption("high_res_degrees") )
82  high_res_degrees_= tag->getOption<float>("high_res_degrees");
83 
84 }
85 
86 } //namespace ligand_docking
87 } //namespace protocols