Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdb_dynamic_reader.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 // :noTabs=false:tabSize=4:indentSize=4:
4 //
5 // (c) Copyright Rosetta Commons Member Institutions.
6 // (c) This file is part of the Rosetta software suite and is made available under license.
7 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10 
11 /// @file core/io/pdb/pdb_dynamic_reader.hh
12 ///
13 /// @brief
14 /// @author Sergey Lyskov (Sergey.Lyskov@jhu.edu)
15 
16 #ifndef INCLUDED_core_io_pdb_pdb_dynamic_reader_hh
17 #define INCLUDED_core_io_pdb_pdb_dynamic_reader_hh
18 
19 
20 // Unit headers
23 
24 // Utility headers
25 #include <core/io/pdb/Field.hh>
26 #include <utility/Show.hh>
27 // AUTO-REMOVED #include <utility/vector1.hh>
28 
29 // C++ headers
30 //#include <cstdlib>
31 #ifdef WIN32
32 #include <string>
33 #endif
34 
35 #include <map>
36 #include <vector>
37 #include <iostream>
38 
39 #include <utility/vector1.fwd.hh>
40 
41 
42 namespace core {
43 namespace io {
44 namespace pdb {
45 
46 
47 /// Record type, represent one line in pdb file
48 typedef std::string String;
49 
50 /// @brief PDB Reader it self, D - for dynamic approch of type handling
52 {
53 public:
54  /// @brief creating record from given string. Also, read Field values from string.
55  static Record mapStringToRecord(const String & s);
56 
57 
58  /// @brief Reverse opearation - create PDB string from given Record
59  static String createPDBString(const Record & R);
60 
61 
62  /// @brief Parse whole PDB string and return vector of records in order they was in PDB.
63  static std::vector<Record> parse(const String &);
64 
65 
66  /// @brief create File data sturcture from array of Records.
67  static FileData createFileData(std::vector<Record> &);
68 
69  /// @brief create File data sturcture from array of Records and a set of options.
70  static FileData createFileData(std::vector<Record> &, PDB_DReaderOptions const & options);
71 
72  /// @brief create File data sturcture from string containing PDB information.
73  static FileData createFileData(const String & data);
74 
75  /// @brief create File data sturcture from string containing PDB information and a set of options.
76  static FileData createFileData(const String & data, PDB_DReaderOptions const & options);
77 
78  /// @brief create PDB-like string to represent given FileData object
79  static String createPDBData(FileData const &fd);
80 
81  /// @brief create PDB-like vector of string to represent given FileData object.
83 
84 
85  /// @brief create vector of records for given FileData object.
86  static std::vector<Record> createRecords(FileData const & fd);
87 
88 };
89 
90 } // namespace pdb
91 } // namespace io
92 } // namespace core
93 
94 
95 #endif // INCLUDED_core_io_pdb_pdb_dynamic_reader_HH