Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
WaterPackingInfo.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 src/core/pack/rotamer_set/WaterPackingInfo.cc
11 /// @brief
12 /// @author
13 
14 
15 #include <core/types.hh>
16 // AUTO-REMOVED #include <core/chemical/ResidueType.hh>
17 #include <basic/datacache/CacheableData.hh>
20 
21 // utility headers
22 
23 namespace core {
24 namespace pack {
25 namespace rotamer_set {
26 
28 
30  CacheableData(),
31  data_( src.data_ )
32 {
33  for ( Size i=1; i<= data_.size(); ++i ) {
34  if ( data_[ i ] ) data_[i] = new WaterAnchorInfo( *data_[i] );
35  }
36 }
37 
38 basic::datacache::CacheableDataOP
40  return new WaterPackingInfo( *this );
41 }
42 
45  if ( seqpos > data_.size() ) data_.resize( seqpos, 0 );
46  if ( data_[seqpos] == 0 ) {
47  data_[seqpos] = new WaterAnchorInfo();
48  }
49  return *( data_[ seqpos ] );
50 }
51 
52 WaterAnchorInfo const &
53 WaterPackingInfo::operator[] ( Size const seqpos ) const {
54  assert( seqpos <= data_.size() && data_[ seqpos ] );
55  return *( data_[ seqpos ] );
56 }
57 
58 
59 void
61  data_.clear();
62 }
63 
64 } // namespace rotamer_set
65 } // namespace pack
66 } // namespace core