Chemical Data Processing Library C++ API - Version 1.1.1
PDBData.hpp
Go to the documentation of this file.
1 /*
2  * PDBData.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_BIOMOL_PDBDATA_HPP
30 #define CDPL_BIOMOL_PDBDATA_HPP
31 
32 #include <cstddef>
33 #include <string>
34 #include <map>
35 #include <memory>
36 
38 
39 
40 namespace CDPL
41 {
42 
43  namespace Biomol
44  {
45 
50  {
51 
52  public:
53  typedef std::shared_ptr<PDBData> SharedPointer;
54 
56  {
57 
78  HET,
101  RESOLUTION
102  };
103 
104  private:
105  typedef std::map<RecordType, std::string> TypeToDataMap;
106 
107  public:
108  typedef typename TypeToDataMap::value_type Record;
109 
110  typedef typename TypeToDataMap::const_iterator ConstRecordIterator;
111 
112  typedef typename TypeToDataMap::iterator RecordIterator;
113 
115  data() {}
116 
117  PDBData(const PDBData& other):
118  data(other.data) {}
119 
120  void clear();
121 
122  std::size_t getNumRecords() const;
123 
124  bool isEmpty() const;
125 
126  bool containsRecord(const RecordType& type) const;
127 
129 
131 
132  std::string& getData(const RecordType& type);
133 
134  const std::string& getData(const RecordType& type) const;
135 
136  void removeRecord(const RecordIterator& it);
137 
138  bool removeRecord(const RecordType& type);
139 
141 
142  RecordIterator setRecord(const RecordType& type, const std::string& data);
143 
145 
147 
149 
151 
153 
155 
157 
159 
160  private:
161  TypeToDataMap data;
162  };
163  } // namespace Biomol
164 } // namespace CDPL
165 
166 #endif // CDPL_BIOMOL_PDBDATA_HPP
CDPL::Biomol::PDBData::getRecordsBegin
RecordIterator getRecordsBegin()
CDPL::Biomol::PDBData::SCALE2
@ SCALE2
Definition: PDBData.hpp:97
CDPL::Biomol::PDBData::getData
std::string & getData(const RecordType &type)
CDPL::Biomol::PDBData::LINK
@ LINK
Definition: PDBData.hpp:86
CDPL::Biomol::PDBData::EXPDTA
@ EXPDTA
Definition: PDBData.hpp:66
CDPL::Biomol::PDBData
A datastructure for the storage of imported PDB data records (see [CTFILE]).
Definition: PDBData.hpp:50
CDPL::Biomol::PDBData::CISPEP
@ CISPEP
Definition: PDBData.hpp:87
CDPL::Biomol::PDBData::Record
TypeToDataMap::value_type Record
Definition: PDBData.hpp:108
CDPL::Biomol::PDBData::MTRIX3
@ MTRIX3
Definition: PDBData.hpp:92
CDPL::Biomol::PDBData::COMPND
@ COMPND
Definition: PDBData.hpp:63
CDPL::Biomol::PDBData::STRUCTURE_ID
@ STRUCTURE_ID
Definition: PDBData.hpp:99
CDPL::Biomol::PDBData::MTRIX1
@ MTRIX1
Definition: PDBData.hpp:90
CDPL::Biomol::PDBData::SCALE1
@ SCALE1
Definition: PDBData.hpp:96
CDPL::Biomol::PDBData::end
ConstRecordIterator end() const
CDPL::Biomol::PDBData::setRecord
RecordIterator setRecord(const RecordType &type, const std::string &data)
CDPL::Biomol::PDBData::end
RecordIterator end()
CDPL::Biomol::PDBData::SCALE3
@ SCALE3
Definition: PDBData.hpp:98
CDPL::Biomol::PDBData::getRecordsBegin
ConstRecordIterator getRecordsBegin() const
CDPL::Biomol::PDBData::FORMUL
@ FORMUL
Definition: PDBData.hpp:79
CDPL::Biomol::PDBData::AUTHOR
@ AUTHOR
Definition: PDBData.hpp:67
CDPL::Biomol::PDBData::REMARK
@ REMARK
Definition: PDBData.hpp:71
CDPL::Biomol::PDBData::REVDAT
@ REVDAT
Definition: PDBData.hpp:68
CDPL::Biomol::PDBData::getRecordsEnd
RecordIterator getRecordsEnd()
CDPL::Biomol::PDBData::DEPOSITION_DATE
@ DEPOSITION_DATE
Definition: PDBData.hpp:100
CDPL::Biomol::PDBData::HETNAM
@ HETNAM
Definition: PDBData.hpp:80
CDPL::Biomol::PDBData::RecordType
RecordType
Definition: PDBData.hpp:56
CDPL::Biomol::PDBData::getRecord
ConstRecordIterator getRecord(const RecordType &type) const
CDPL::Biomol::PDBData::SPLIT
@ SPLIT
Definition: PDBData.hpp:61
CDPL::Biomol::PDBData::SEQADV
@ SEQADV
Definition: PDBData.hpp:75
CDPL::Biomol::PDBData::removeRecord
bool removeRecord(const RecordType &type)
CDPL::Biomol::PDBData::HELIX
@ HELIX
Definition: PDBData.hpp:82
CDPL::Biomol::PDBData::PDBData
PDBData(const PDBData &other)
Definition: PDBData.hpp:117
CDPL::Biomol::PDBData::TURN
@ TURN
Definition: PDBData.hpp:84
CDPL::Biomol::PDBData::ORIGX2
@ ORIGX2
Definition: PDBData.hpp:94
CDPL::Biomol::PDBData::SSBOND
@ SSBOND
Definition: PDBData.hpp:85
CDPL::Biomol::PDBData::RecordIterator
TypeToDataMap::iterator RecordIterator
Definition: PDBData.hpp:112
CDPL::Biomol::PDBData::SPRSDE
@ SPRSDE
Definition: PDBData.hpp:69
CDPL::Biomol::PDBData::getNumRecords
std::size_t getNumRecords() const
CDPL::Biomol::PDBData::HET
@ HET
Definition: PDBData.hpp:78
CDPL::Biomol::PDBData::SOURCE
@ SOURCE
Definition: PDBData.hpp:64
CDPL::Biomol::PDBData::setRecord
RecordIterator setRecord(const Record &rec)
CDPL::Biomol::PDBData::ORIGX3
@ ORIGX3
Definition: PDBData.hpp:95
APIPrefix.hpp
Definition of the preprocessor macro CDPL_BIOMOL_API.
CDPL::Biomol::PDBData::ConstRecordIterator
TypeToDataMap::const_iterator ConstRecordIterator
Definition: PDBData.hpp:110
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Biomol::PDBData::ORIGX1
@ ORIGX1
Definition: PDBData.hpp:93
CDPL::Biomol::PDBData::getRecordsEnd
ConstRecordIterator getRecordsEnd() const
CDPL::Biomol::PDBData::SEQRES
@ SEQRES
Definition: PDBData.hpp:76
CDPL::Biomol::PDBData::JRNL
@ JRNL
Definition: PDBData.hpp:70
CDPL::Biomol::PDBData::SITE
@ SITE
Definition: PDBData.hpp:88
CDPL::Biomol::PDBData::getData
const std::string & getData(const RecordType &type) const
CDPL::Biomol::PDBData::isEmpty
bool isEmpty() const
CDPL::Biomol::PDBData::CRYST1
@ CRYST1
Definition: PDBData.hpp:89
CDPL::Biomol::PDBData::DBREF
@ DBREF
Definition: PDBData.hpp:72
CDPL::Biomol::PDBData::OBSLTE
@ OBSLTE
Definition: PDBData.hpp:59
CDPL::Biomol::PDBData::getRecord
RecordIterator getRecord(const RecordType &type)
CDPL::Biomol::PDBData::MODRES
@ MODRES
Definition: PDBData.hpp:77
CDPL::Biomol::PDBData::DBREF2
@ DBREF2
Definition: PDBData.hpp:74
CDPL::Biomol::PDBData::DBREF1
@ DBREF1
Definition: PDBData.hpp:73
CDPL::Biomol::PDBData::removeRecord
void removeRecord(const RecordIterator &it)
CDPL::Biomol::PDBData::PDBData
PDBData()
Definition: PDBData.hpp:114
CDPL::Biomol::PDBData::clear
void clear()
CDPL::Biomol::PDBData::CAVEAT
@ CAVEAT
Definition: PDBData.hpp:62
CDPL_BIOMOL_API
#define CDPL_BIOMOL_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::Biomol::PDBData::SharedPointer
std::shared_ptr< PDBData > SharedPointer
Definition: PDBData.hpp:53
CDPL::Biomol::PDBData::begin
ConstRecordIterator begin() const
CDPL::Biomol::PDBData::begin
RecordIterator begin()
CDPL::Biomol::PDBData::MTRIX2
@ MTRIX2
Definition: PDBData.hpp:91
CDPL::Biomol::PDBData::SHEET
@ SHEET
Definition: PDBData.hpp:83
CDPL::Biomol::PDBData::HETSYN
@ HETSYN
Definition: PDBData.hpp:81
CDPL::Biomol::PDBData::TITLE
@ TITLE
Definition: PDBData.hpp:60
CDPL::Biomol::PDBData::containsRecord
bool containsRecord(const RecordType &type) const
CDPL::Biomol::PDBData::KEYWDS
@ KEYWDS
Definition: PDBData.hpp:65
CDPL::Biomol::PDBData::HEADER
@ HEADER
Definition: PDBData.hpp:58