Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ElecAtom.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/hackelec/ElecAtom.hh
11 /// @brief
12 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13 
14 // Unit Headers
16 
17 // Project Headers
20 #include <core/types.hh>
21 
22 // STL Headers
23 #include <iostream>
24 
25 // Numceric Headers
26 #include <numeric/xyzVector.hh>
27 
28 #include <utility/vector1.hh>
29 
30 
31 namespace core {
32 namespace scoring {
33 namespace hackelec {
34 
35 
36 ElecAtom::ElecAtom() : parent(), isbb_( false ), is_hydrogen_( false ), charge_( 0.0 ) {}
37 
38 ElecAtom::ElecAtom( conformation::Residue const & res, Size atom_index )
39 :
40  parent( res.atom( atom_index ) ),
41  isbb_( res.atom_is_backbone( atom_index ) ),
42  is_hydrogen_( false ),
43  charge_( res.atomic_charge( atom_index ) )
44 {}
45 
47 
48 /// @brief send a description of the atom to standard out
49 void
50 ElecAtom::print() const { print( std::cout ); }
51 
52 /// @brief send a description of the atom to an output stream
53 void
54 ElecAtom::print( std::ostream & os ) const
55 {
56  os << "atom type: " << type() << " charge: " << charge_;
57  os << " isbb: " << isbb_;
58  os << " (" << xyz().x();
59  os << ", " << xyz().y();
60  os << ", " << xyz().z() << ")" << std::endl;
61 }
62 
63 std::ostream & operator << ( std::ostream & os, ElecAtom const & atom )
64 {
65  atom.print( os );
66  return os;
67 }
68 
69 } // namespace hackelec
70 } // namespace scoring
71 } // namespace core
72