Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Adduct.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 Adduct.cc
11 /// @brief definition of residue adduct class
12 /// @author Jim Havranek
13 
14 
15 // Unit headers
16 #include <core/chemical/Adduct.hh>
17 
18 // Utility headers
19 #include <utility/exit.hh>
20 
21 // Commented by inclean daemon #include <ObjexxFCL/ObjexxFCL.hh>
22 // Commented by inclean daemon #include <ObjexxFCL/string.functions.hh>
23 
24 // C++ headers
25 #include <string>
26 
27 
28 namespace core {
29 namespace chemical {
30 
32  adduct_name_(),
33  atom_name_(),
34  atom_type_name_(),
35  atom_type_(),
36  mm_atom_type_name_(),
37  mm_atom_type_(),
38  atom_charge_(0.0),
39  phi_(0.0),
40  theta_(0.0),
41  d_(0.0),
42  stub_atom1_(),
43  stub_atom2_(),
44  stub_atom3_()
45  {}
46 
47  /// constructor
49  std::string const & adduct_name,
50  std::string const & atom_name,
51  std::string const & atom_type_name,
52  std::string const & mm_atom_type_name,
53  Real const atom_charge_in,
54  Real const phi_in,
55  Real const theta_in,
56  Real const d_in,
57  std::string const & stub_atom1_name,
58  std::string const & stub_atom2_name,
59  std::string const & stub_atom3_name
60  ):
61  adduct_name_( adduct_name ),
62  atom_name_( atom_name ),
63  atom_type_name_( atom_type_name ),
64  atom_type_(),
65  mm_atom_type_name_( mm_atom_type_name ),
66  mm_atom_type_(),
67  atom_charge_( atom_charge_in ),
68  phi_( phi_in ),
69  theta_( theta_in ),
70  d_( d_in ),
71  stub_atom1_( stub_atom1_name ),
72  stub_atom2_( stub_atom2_name ),
73  stub_atom3_( stub_atom3_name )
74  {}
75 
76  /// accessor to adduct_name string
77  std::string const &
79  {
80  return adduct_name_;
81  }
82 
83  /// accessor to atom_name string
84  std::string const &
86  {
87  return atom_name_;
88  }
89 
90  /// accessor to atom type string
91  std::string const &
93  {
94  return atom_type_name_;
95  }
96 
97  /// accessor to mm type string
98  std::string const &
100  {
101  return mm_atom_type_name_;
102  }
103 
104  Real
106  {
107  return atom_charge_;
108  }
109 
110  /// accessor for Adduct geometric info
111  Real
112  Adduct::phi() const
113  {
114  return phi_;
115  }
116 
117  ///
118  Real
120  {
121  return theta_;
122  }
123 
124  ///
125  Real
126  Adduct::d() const
127  {
128  return d_;
129  }
130 
131  /// accessor to stub_atom1 name string
132  std::string const &
134  {
135  return stub_atom1_;
136  }
137 
138  /// accessor to stub_atom2 name string
139  std::string const &
141  {
142  return stub_atom2_;
143  }
144 
145  /// accessor to stub_atom3 name string
146  std::string const &
148  {
149  return stub_atom3_;
150  }
151 
152  /// const accessor to stub_atom strings by index
153  std::string const &
154  Adduct::stub_atom( int const atm ) const
155  {
156  switch( atm ) {
157  case 1: return stub_atom1_;
158  case 2: return stub_atom2_;
159  case 3: return stub_atom3_;
160  }
161  utility_exit_with_message( "ICoorAtomID::stub_atom should be 1--3" );
162  return stub_atom1_;
163  }
164 
165 } // chemical
166 } // core
167 
168