Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HeaderInformation.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/HeaderInformation.hh
12 ///
13 /// @brief Information stored in the HEADER record in the PDB format
14 /// @author Matthew O'Meara
15 
16 #ifndef INCLUDED_core_io_pdb_HeaderInformation_hh
17 #define INCLUDED_core_io_pdb_HeaderInformation_hh
18 
19 // Unit headers
21 #include <core/io/pdb/Field.fwd.hh>
22 
23 // Platform headers
24 #include <core/types.hh>
25 
26 // Utility headers
27 #include <utility/pointer/ReferenceCount.hh>
28 #include <utility/vector1.hh>
29 
30 // C++ headers
31 #include <string>
32 #include <list>
33 #include <utility>
34 
35 namespace core {
36 namespace io {
37 namespace pdb {
38 
39 ///@brief Information stored in the header records
40 ///http://www.wwpdb.org/documentation/format32/sect2.html
41 ///HEADER PEPTIDASE 13-JAN-98 1A2Z
43 public:
47 
48  void
50 
51  void
53 
54  bool
55  parse_in_progress() const;
56 
57  void
59  std::vector<Record> & VR) const;
60 
61 public: // Fields for HEADER Records
62  void
64 
66  classification() const;
67 
68  /// @brief Store the deposition date using the format like "84-DEC-18"
69  void
71 
72  /// @brief Store the deposition date using the format of two digit numbers
73  /// for the year, month and day of the month.
74  void
76  Size yy,
77  Size mm,
78  Size dd);
79 
81  deposition_date() const;
82 
83  /// @brief get the deposition date using the format of two digit numbers
84  /// for the year, month and day of the month
85  void
87  Size & yy,
88  Size & mm,
89  Size & dd) const;
90 
92  idCode() const;
93 
94  void
95  store_idCode(std::string const & id_code);
96 
97  void
98  fill_header_record(std::vector< Record > & VR) const;
99 
100 public: // Fields for the TITLE Record
101 
102  /// @brief Append title record onto current title string
103  void
104  store_title(std::string const & title);
105 
106  void
107  clear_title();
108 
109  std::string const &
110  title() const;
111 
112  void
113  fill_title_records(std::vector< Record > & VR) const;
114 
115 public: // Fields for KEYWDS Records
116 
117  typedef std::list< std::string > Keywords;
118 
119  void
121 
122  void
124 
125  bool
126  keyword_in_progress() const;
127 
128  void
129  clear_keywords();
130 
131  Keywords const &
132  keywords() const;
133 
134  // Undefined, commenting out to fix PyRosetta build std::string keywords_string() const;
135 
136  void
137  fill_keyword_records(std::vector< Record > & VR) const;
138 
139 public: // Fields for COMPND Records
140 
141  /*
142 
143  http://www.wwpdb.org/documentation/format23/sect2.html#COMPND
144 
145  The COMPND record describes the macromolecular contents of an
146  entry. Each macromolecule found in the entry is described by a set of
147  token: value pairs, and is referred to as a COMPND record
148  component. Since the concept of a molecule is difficult to specify
149  exactly, PDB staff may exercise editorial judgment in consultation
150  with depositors in assigning these names.
151 
152  * In the general case the PDB tends to reflect the
153  biological/functional view of the molecule. For example, the
154  hetero-tetramer hemoglobin molecule is treated as a discrete
155  component in COMPND.
156 
157  * In the case of synthetic molecules, e. g., hybrids, the depositor
158  will provide the description.
159 
160  * No specific rules apply to the ordering of the tokens, except that
161  the occurrence of MOL_ID or FRAGMENT indicates that the subsequent
162  tokens are related to that specific molecule or fragment of the
163  molecule.
164 
165  * Asterisks in nucleic acid names (in MOLECULE) are for ease of reading.
166 
167  * When insertion codes are given as part of the residue name, they
168  must be given within square brackets, i.e., H57[A]N. This might
169  occur when listing residues in FRAGMENT or OTHER_DETAILS.
170 
171  * For multi-chain molecules, e.g., the hemoglobin tetramer, a
172  comma-separated list of CHAIN identifiers is used.
173 
174  * When non-blank chain identifiers occur in the entry, they must be specified.
175 
176  ## Verification/Validation/Value Authority Control ##
177 
178  * CHAIN must match the chain identifiers(s) of the molecule(s). EC
179  numbers are also checked
180 
181  ## Relationships to Other Record Types ##
182 
183  * In the case of mutations, the SEQADV records will present
184  differences from the reference molecule. REMARK records may
185  further describe the contents of the entry. Also see verification
186  above.
187  */
188 
190  // Numbers each component; also used in SOURCE to associate the information.
192 
193  // Name of the macromolecule.
195 
196  // Comma-separated list of chain identifier(s).
198 
199  // Specifies a domain or region of the molecule.
201 
202  // Comma-separated list of synonyms for the MOLECULE.
204 
205  // The Enzyme Commission number associated with the
206  // molecule. If there is more than one EC number, they
207  // are presented as a comma-separated list.
208  EC,
209 
210  // Indicates that the molecule was produced using
211  // recombinant technology or by purely chemical synthesis.
213 
214  // Indicates if there is a mutation.
216 
217  // Additional comments.
219 
221  };
222 
224 
227 
229  static string_to_compound_token(std::string const & token);
230 
231  void
232  store_compound(std::string const & compound);
233 
234  void
235  store_compound(CompoundToken token, std::string const & value);
236 
237  Compounds const &
238  compounds() const;
239 
240  void
242 
243  bool
244  compound_in_progress() const;
245 
246  void
247  clear_compounds();
248 
249  void
250  fill_compound_records(std::vector< Record > & VR) const;
251 
252 public: /// Fields for the EXPDTA Record
253 
255  // Experimental Techniques for spec version 3.3
264 
267 
268  // Obsolete technique codes
273  NMR, // Note the qualifying information is parsed not stored
274 
276  };
277  typedef std::list< ExperimentalTechnique > ExperimentalTechniques;
278 
281 
283  static string_to_experimental_technique(std::string const &technique);
284 
285  /// @parse the list of techniques string following the technqiue
286  /// field in the EXPDTA record of the pdb format and store the techniques
287  void
289 
290  void
292 
293  ExperimentalTechniques const &
294  experimental_techniques() const;
295 
296  void
298 
299  bool
301 
302  void
304 
305  bool
307 
308  void
309  fill_experimental_technique_records(std::vector< Record > & VR) const;
310 
311 private: // Helper functions
312 
313  /// @brief create enough records of <record_type> to express the
314  /// <contents> string and save them into the Records vector
315  void
317  std::string const & record_type,
318  std::string const & field_name,
319  std::string const & contents,
320  Size & line_no,
321  std::vector< Record > & VR) const;
322 
323  void
325  Record & R,
326  Size const line_no) const;
327 
328 
329 private: // Data for HEADER Record
330 
331  /// @brief Possibly abbreviated classification type
333 
334  /// @brief Deposition date DD-MON-YY
338 
339  /// @brief 4-character PDB unique identifier
341 
342 
343 private: // Data for TITLE Record
344 
346 
347 private: // Date for KEYWDS Record
348 
350 
352 
353 private: // Data for COMPND Record
354 
356 
358 
359 private: // data for EXPDTA Record
360 
362 
364 };
365 
366 } // namespace pdb
367 } // namespace io
368 } // namespace core
369 
370 
371 #endif // INCLUDED_core_io_pdb_HeaderInformation_HH