Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PoseBallsLite.hh
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/packing/PoseBallsLite.hh
11 /// @brief
12 /// @author
13 
14 #ifndef INCLUDED_core_scoring_packing_PoseBallsLite_hh
15 #define INCLUDED_core_scoring_packing_PoseBallsLite_hh
16 
17 
18 // Project headers
19 // AUTO-REMOVED #include <core/pose/Pose.hh>
20 #include <core/id/AtomID.hh>
21 #include <core/id/AtomID_Map.hh>
22 
24 
25 #include <utility/pointer/ReferenceCount.hh>
26 
27 #include <core/pose/Pose.fwd.hh>
28 #include <utility/vector1.hh>
29 
30 
31 namespace core {
32 namespace scoring {
33 namespace packing {
34 
36 public:
37  ///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
38  virtual ~PoseBallsLite();
39 
40  // hmode = 0 --> no hydrogens
41  // hmode = 1 --> polar H's
42  // hmode = 2 --> all H's
43  // in all cases, H area is added to the "parent" atom
44  PoseBallsLite( core::pose::Pose const & pose, core::Size Hmode = 0, bool ignore_water = true );
45 
46  inline core::Size const & nballs() const {
47  return nballs_;
48  }
49 
50  inline core::Size const & id_to_index( core::id::AtomID const & aid ) const {
51  return id_to_index_[aid];
52  }
53 
54  inline core::id::AtomID const & index_to_id( core::Size const & index ) const {
55  return index_to_id_[index];
56  }
57 
58  inline Ball const & ball( core::Size const & index ) const {
59  return balls_[index];
60  }
61 
62  inline Ball const & ball( core::id::AtomID const & id ) const {
63  return balls_[ id_to_index_[id] ];
64  }
65 
66  inline Ball & ball( core::Size const & index ) { return balls_[index]; }
67  inline Ball & ball( core::id::AtomID const & id ) { return balls_[ id_to_index_[id] ]; }
68 
69  inline core::Size const & atom_num( core::Size const & index ) const {
70  return atom_num_[index];
71  }
72  inline core::Size const & res_num( core::Size const & index ) const {
73  return res_num_[index];
74  }
75 
76 
77 private:
78 
79  // core::pose::Pose pose_;
86 
87 };
88 
89 template< class T >
90 void
92  for( Size i = 1; i <= pb.nballs(); i++ ) {
93  Size res_num = pb.res_num(i);
94  Size atom_num = pb.atom_num(i);
95  map.resize( std::max(map.size(),res_num) );
96  map.resize( res_num, std::max(map.n_atom(res_num),atom_num) );
97  }
98 }
99 
100 
101 } // namespace packing
102 } // namespace scoring
103 } // namespace core
104 
105 
106 #endif // INCLUDED_core_scoring_packing_PoseBallsLite_HH