Rosetta
 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 //
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/io/pdb/HeaderInformation.hh
11 ///
12 /// @brief Information stored in the HEADER record in the PDB format
13 /// @author Matthew O'Meara
14 
15 #ifndef INCLUDED_core_io_pdb_HeaderInformation_hh
16 #define INCLUDED_core_io_pdb_HeaderInformation_hh
17 
18 // Unit headers
20 #include <core/io/pdb/Field.fwd.hh>
21 
22 // Platform headers
23 #include <core/types.hh>
24 
25 // Utility headers
26 #include <utility/pointer/ReferenceCount.hh>
27 #include <utility/vector1.hh>
28 
29 // C++ headers
30 #include <string>
31 #include <list>
32 #include <utility>
33 
34 #ifdef SERIALIZATION
35 // Cereal headers
36 #include <cereal/types/polymorphic.fwd.hpp>
37 #endif // SERIALIZATION
38 
39 namespace core {
40 namespace io {
41 namespace pdb {
42 
43 /// @brief Information stored in the header records
44 ///http://www.wwpdb.org/documentation/format32/sect2.html
45 ///HEADER PEPTIDASE 13-JAN-98 1A2Z
46 class HeaderInformation : public utility::pointer::ReferenceCount {
47 public:
51 
52  void
54 
55  void
57 
58  bool
59  parse_in_progress() const;
60 
61  void
63  std::vector<Record> & VR) const;
64 
65 public: // Fields for HEADER Records
66  void
68 
70  classification() const;
71 
72  /// @brief Store the deposition date using the format like "84-DEC-18"
73  void
75 
76  /// @brief Store the deposition date using the format of two digit numbers
77  /// for the year, month and day of the month.
78  void
80  Size yy,
81  Size mm,
82  Size dd);
83 
85  deposition_date() const;
86 
87  /// @brief get the deposition date using the format of two digit numbers
88  /// for the year, month and day of the month
89  void
91  Size & yy,
92  Size & mm,
93  Size & dd) const;
94 
96  idCode() const;
97 
98  void
99  store_idCode(std::string const & id_code);
100 
101  void
102  fill_header_record(std::vector< Record > & VR) const;
103 
104 public: // Fields for the TITLE Record
105 
106  /// @brief Append title record onto current title string
107  void
108  store_title(std::string const & title);
109 
110  void
111  clear_title();
112 
113  std::string const &
114  title() const;
115 
116  void
117  fill_title_records(std::vector< Record > & VR) const;
118 
119 public: // Fields for KEYWDS Records
120 
121  typedef std::list< std::string > Keywords;
122 
123  void
125 
126  void
128 
129  bool
130  keyword_in_progress() const;
131 
132  void
133  clear_keywords();
134 
135  Keywords const &
136  keywords() const;
137 
138  // Undefined, commenting out to fix PyRosetta build std::string keywords_string() const;
139 
140  void
141  fill_keyword_records(std::vector< Record > & VR) const;
142 
143 public: // Fields for COMPND Records
144 
145  /*
146 
147  http://www.wwpdb.org/documentation/format23/sect2.html#COMPND
148 
149  The COMPND record describes the macromolecular contents of an
150  entry. Each macromolecule found in the entry is described by a set of
151  token: value pairs, and is referred to as a COMPND record
152  component. Since the concept of a molecule is difficult to specify
153  exactly, PDB staff may exercise editorial judgment in consultation
154  with depositors in assigning these names.
155 
156  * In the general case the PDB tends to reflect the
157  biological/functional view of the molecule. For example, the
158  hetero-tetramer hemoglobin molecule is treated as a discrete
159  component in COMPND.
160 
161  * In the case of synthetic molecules, e. g., hybrids, the depositor
162  will provide the description.
163 
164  * No specific rules apply to the ordering of the tokens, except that
165  the occurrence of MOL_ID or FRAGMENT indicates that the subsequent
166  tokens are related to that specific molecule or fragment of the
167  molecule.
168 
169  * Asterisks in nucleic acid names (in MOLECULE) are for ease of reading.
170 
171  * When insertion codes are given as part of the residue name, they
172  must be given within square brackets, i.e., H57[A]N. This might
173  occur when listing residues in FRAGMENT or OTHER_DETAILS.
174 
175  * For multi-chain molecules, e.g., the hemoglobin tetramer, a
176  comma-separated list of CHAIN identifiers is used.
177 
178  * When non-blank chain identifiers occur in the entry, they must be specified.
179 
180  ## Verification/Validation/Value Authority Control ##
181 
182  * CHAIN must match the chain identifiers(s) of the molecule(s). EC
183  numbers are also checked
184 
185  ## Relationships to Other Record Types ##
186 
187  * In the case of mutations, the SEQADV records will present
188  differences from the reference molecule. REMARK records may
189  further describe the contents of the entry. Also see verification
190  above.
191  */
192 
194  // Numbers each component; also used in SOURCE to associate the information.
196 
197  // Name of the macromolecule.
199 
200  // Comma-separated list of chain identifier(s).
202 
203  // Specifies a domain or region of the molecule.
205 
206  // Comma-separated list of synonyms for the MOLECULE.
208 
209  // The Enzyme Commission number associated with the
210  // molecule. If there is more than one EC number, they
211  // are presented as a comma-separated list.
212  EC,
213 
214  // Indicates that the molecule was produced using
215  // recombinant technology or by purely chemical synthesis.
217 
218  // Indicates if there is a mutation.
220 
221  // Additional comments.
223 
225  };
226 
227  typedef utility::vector1< std::pair< CompoundToken, std::string > > Compounds;
228 
231 
233  static string_to_compound_token(std::string const & token);
234 
235  void
236  store_compound(std::string const & compound);
237 
238  void
239  store_compound(CompoundToken token, std::string const & value);
240 
241  Compounds const &
242  compounds() const;
243 
244  void
246 
247  bool
248  compound_in_progress() const;
249 
250  void
251  clear_compounds();
252 
253  void
254  fill_compound_records(std::vector< Record > & VR) const;
255 
256 public: /// Fields for the EXPDTA Record
257 
259  // Experimental Techniques for spec version 3.3
268 
271 
272  // Obsolete technique codes
277  NMR, // Note the qualifying information is parsed not stored
278 
280  };
281  typedef std::list< ExperimentalTechnique > ExperimentalTechniques;
282 
285 
287  static string_to_experimental_technique(std::string const &technique);
288 
289  /// @parse the list of techniques string following the technqiue
290  /// field in the EXPDTA record of the pdb format and store the techniques
291  void
293 
294  void
296 
297  ExperimentalTechniques const &
298  experimental_techniques() const;
299 
300  void
302 
303  bool
305 
306  void
308 
309  bool
311 
312  void
313  fill_experimental_technique_records(std::vector< Record > & VR) const;
314 
315 private: // Helper functions
316 
317  /// @brief create enough records of <record_type> to express the
318  /// <contents> string and save them into the Records vector
319  void
321  std::string const & record_type,
322  std::string const & field_name,
323  std::string const & contents,
324  Size & line_no,
325  std::vector< Record > & VR) const;
326 
327  void
329  Record & R,
330  Size const line_no) const;
331 
332 
333 private: // Data for HEADER Record
334 
335  /// @brief Possibly abbreviated classification type
337 
338  /// @brief Deposition date DD-MON-YY
342 
343  /// @brief 4-character PDB unique identifier
345 
346 
347 private: // Data for TITLE Record
348 
350 
351 private: // Date for KEYWDS Record
352 
354 
356 
357 private: // Data for COMPND Record
358 
360 
362 
363 private: // data for EXPDTA Record
364 
366 
368 #ifdef SERIALIZATION
369 public:
370  template< class Archive > void save( Archive & arc ) const;
371  template< class Archive > void load( Archive & arc );
372 #endif // SERIALIZATION
373 
374 };
375 
376 } // namespace pdb
377 } // namespace io
378 } // namespace core
379 
380 
381 #ifdef SERIALIZATION
382 CEREAL_FORCE_DYNAMIC_INIT( core_io_pdb_HeaderInformation )
383 #endif // SERIALIZATION
384 
385 
386 #endif // INCLUDED_core_io_pdb_HeaderInformation_HH
Size dep_year_
Deposition date DD-MON-YY.
Ramachandran R
Definition: Ramachandran.cc:80
void fill_wrapped_records(std::string const &record_type, std::string const &field_name, std::string const &contents, Size &line_no, std::vector< Record > &VR) const
create enough records of to express the string and save them into the Record...
static std::string experimental_technique_to_string(ExperimentalTechnique technique)
ExperimentalTechniques const & experimental_techniques() const
utility::vector1< std::pair< CompoundToken, std::string > > Compounds
Each line of a PDB file is a Record which is divided into Fields.
Keywords const & keywords() const
void store_title(std::string const &title)
Append title record onto current title string.
static CompoundToken string_to_compound_token(std::string const &token)
static std::string compound_token_to_string(CompoundToken token)
void fill_records(std::vector< Record > &VR) const
std::list< ExperimentalTechnique > ExperimentalTechniques
void store_classification(std::string const &classification)
platform::Size Size
Definition: types.hh:30
std::string classification_
Possibly abbreviated classification type.
void fill_header_record(std::vector< Record > &VR) const
void fill_title_records(std::vector< Record > &VR) const
void store_idCode(std::string const &id_code)
void fill_experimental_technique_records(std::vector< Record > &VR) const
Information stored in the header records http://www.wwpdb.org/documentation/format32/sect2.html HEADER PEPTIDASE 13-JAN-98 1A2Z.
rosetta project type declarations
ExperimentalTechnique
Fields for the EXPDTA Record.
void fill_keyword_records(std::vector< Record > &VR) const
std::string idCode_
4-character PDB unique identifier
bool is_experimental_technique(ExperimentalTechnique technique) const
std::list< std::string > Keywords
Information stored in the HEADER record in the PDB format.
void fill_compound_records(std::vector< Record > &VR) const
void set_line_continuation(Record &R, Size const line_no) const
void store_compound(std::string const &compound)
void store_keywords(std::string const &keywords)
std::string const & title() const
Compounds const & compounds() const
void store_experimental_techniques(std::string const &exp)
ExperimentalTechniques experimental_techniques_
static ExperimentalTechnique string_to_experimental_technique(std::string const &technique)
std::map< std::string, Field > Record
Definition: Field.fwd.hh:26
void store_deposition_date(std::string const &deposition_date)
Store the deposition date using the format like "84-DEC-18".
void store_experimental_technique(ExperimentalTechnique technique)