Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ElectronDensityOptions.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/scoring/methods/electron_density/ElectronDensityOptions.cc
11 /// @brief Options for constructing an electron density map
12 /// @author Matthew O'Meara (mattjomeara@gmail.com)
13 
14 // Unit Headers
17 #include <utility/tag/Tag.hh>
18 
19 // Plaform Headers
20 #include <core/types.hh>
21 
22 // C++ Headers
23 #include <string>
24 
25 namespace core {
26 namespace scoring {
27 namespace electron_density {
28 
29 using basic::resource_manager::ResourceOptionsOP;
30 using basic::resource_manager::ResourceOptions;
31 using std::string;
33 
34 ///// ElectronDensityOptionsCreator /////
36 
38 
39 ResourceOptionsOP
41  return new ElectronDensityOptions;
42 }
43 
44 string
46  return "ElectronDensityOptions";
47 }
48 
50  ResourceOptions(),
51  mapreso_(3.0),
52  grid_spacing_(0.0) // if <= 0 then do not resize gride spacing
53 {}
54 
56  string const & name
57 ) :
58  ResourceOptions(name),
59  mapreso_(3.0),
60  grid_spacing_(0.0) // if <= 0 then do not resize gride spacing
61 {}
62 
64  string const & name,
65  Real mapreso,
66  Real grid_spacing
67 ) :
68  ResourceOptions(name),
69  mapreso_(mapreso),
70  grid_spacing_(grid_spacing) // if <= 0 then do not resize gride spacing
71 {}
72 
74 
76  ElectronDensityOptions const & src
77 ) :
78  ResourceOptions(src),
79  mapreso_(src.mapreso_),
80  grid_spacing_(src.grid_spacing_)
81 {}
82 
83 Real
85 ) const {
86  return mapreso_;
87 }
88 
89 void
91  Real mapreso
92 ) {
93  mapreso_ = mapreso;
94 }
95 
96 Real
98 ) const {
99  return grid_spacing_;
100 }
101 
102 void
104  Real grid_spacing
105 ) {
106  grid_spacing_ = grid_spacing;
107 }
108 
109 void
111  TagPtr tag
112 ) {
113  mapreso_ = tag->getOption<Real>("mapreso", 3.0);
114  grid_spacing_ = tag->getOption<Real>("grid_spacing", 0.0);
115 }
116 
117 
118 
119 } // namespace
120 } // namespace
121 } // namespace