Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CSDAtomTypeSet.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/chemical/CSDAtomTypeSet.hh
11 /// @author Ian W. Davis
12 
13 
14 #ifndef INCLUDED_core_chemical_CSDAtomTypeSet_hh
15 #define INCLUDED_core_chemical_CSDAtomTypeSet_hh
16 
17 
18 // Unit headers
20 
21 // Project headers
23 
24 // Utility headers
25 #include <utility/vector1.hh>
26 #include <utility/pointer/ReferenceCount.hh>
27 
28 // C++ headers
29 #include <map>
30 
31 
32 namespace core {
33 namespace chemical {
34 
35 
36 /// @brief A set of CSDAtomTypes
37 ///
38 /// @details This class contains a vector of pointers each of
39 /// which points to an CSDAtomType and the vector index is looked
40 /// up by an atom_name string in a map.
42 
43 public:
46 
47  /// @brief Number of atom types in the set
48  Size
49  n_atomtypes() const;
50 
51  /// @brief Check if there is an atom_type associated with an
52  /// atom_type_name string
53  bool
54  contains_atom_type( std::string const & atom_type_name ) const;
55 
56  /// @brief Lookup the atom_type by the atom_type_name string
57  int
58  atom_type_index( std::string const & atom_type_name ) const;
59 
60  /// @brief Lookup an CSDAtomType by 1-based indexing
61  CSDAtomType const &
62  operator[] ( Size const index ) const;
63 
64  /// @brief Load the CSDAtomTypeSet from a file
65  void
66  read_file( std::string const & filename );
67 
68  /// @brief Print all of the names of all of the CSDAtomTypes in
69  /// the set. Useful for debugging.
70  void
72 
73  // data
74 private:
75 
76  /// @brief atom_type_index_ lookup map
77  ///
78  /// @details atom_type_index_ allows lookup of the atom type
79  /// index by a string
80  std::map< std::string, int > atom_type_index_;
81 
82  /// @brief a collection of CSDAtomTypes,
83  ///
84  /// @details CSDAtomType has data of atom properties, and it can be
85  /// looked up by atom_type_index.
87 
88 };
89 
90 } // chemical
91 } // core
92 
93 #endif // INCLUDED_core_chemical_CSDAtomTypeSet_HH