Rosetta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MMEnergyTableAtom.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/mm/mmtrie/MMEnergyTableAtom.cc
11 /// @brief Implimentation for the MMEnergyTableAtom. Heavily coppied from the EtableAtom.cc
12 /// @author P. Douglas Renfrew (renfrew@nyu.edu)
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 #ifdef SERIALIZATION
32 // Utility serialization headers
33 #include <utility/serialization/serialization.hh>
34 
35 // Cereal headers
36 #include <cereal/types/polymorphic.hpp>
37 #endif // SERIALIZATION
38 
39 namespace core {
40 namespace scoring {
41 namespace mm {
42 namespace mmtrie {
43 
44 
45 MMEnergyTableAtom::MMEnergyTableAtom() : parent(), is_hydrogen_( false ) {}
46 
48 :
49  parent( res.atom( atom_index ) ),
50  is_hydrogen_( false )
51 {}
52 
54 
55 /// @brief send a description of the atom to standard out
56 void
57 MMEnergyTableAtom::print() const { print( std::cout ); }
58 
59 /// @brief send a description of the atom to an output stream
60 void
61 MMEnergyTableAtom::print( std::ostream & os ) const
62 {
63  os << "mm atom type" << mm_type() << " ";
64  os << "(" << xyz().x();
65  os << ", " << xyz().y();
66  os << ", " << xyz().z() << ")" << std::endl;
67 }
68 
69 std::ostream & operator << ( std::ostream & os, MMEnergyTableAtom const & atom )
70 {
71  atom.print( os );
72  return os;
73 }
74 
75 } // namespace mmtrie
76 } // namespace mm
77 } // namespace scoring
78 } // namespace core
79 
80 
81 #ifdef SERIALIZATION
82 
83 /// @brief Automatically generated serialization method
84 template< class Archive >
85 void
86 core::scoring::mm::mmtrie::MMEnergyTableAtom::save( Archive & arc ) const {
87  arc( cereal::base_class< core::conformation::Atom >( this ) );
88  arc( CEREAL_NVP( is_hydrogen_ ) ); // _Bool
89 }
90 
91 /// @brief Automatically generated deserialization method
92 template< class Archive >
93 void
94 core::scoring::mm::mmtrie::MMEnergyTableAtom::load( Archive & arc ) {
95  arc( cereal::base_class< core::conformation::Atom >( this ) );
96  arc( is_hydrogen_ ); // _Bool
97 }
98 
99 SAVE_AND_LOAD_SERIALIZABLE( core::scoring::mm::mmtrie::MMEnergyTableAtom );
100 CEREAL_REGISTER_TYPE( core::scoring::mm::mmtrie::MMEnergyTableAtom )
101 
102 CEREAL_REGISTER_DYNAMIC_INIT( core_scoring_mm_mmtrie_MMEnergyTableAtom )
103 #endif // SERIALIZATION
ShortSize mm_type() const
get the mm atom type number
Definition: Atom.hh:94
platform::Size Size
Definition: types.hh:30
Instance Residue class, used for placed residues and rotamers.
Definition: Residue.hh:90
Vector const & xyz() const
Returns the atom coordinates as an xyzVector.
Definition: Atom.hh:101
rosetta project type declarations
Header for the MMEnergyTableAtom. Heavily coppied from the EtableAtom.hh.
Method declarations and simple accessor definitions for the Residue class.
Class definitions for conformation::Atom.
virtual ~MMEnergyTableAtom()
non-virtual destructor to keep MMEnergyTableAtom small and lightweight as a virtual destructor would ...
std::ostream & operator<<(std::ostream &os, MMEnergyTableAtom const &atom)
void print() const
send a description of the atom to standard out