BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PDBInfo.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_FORMAT_PDBINFO_H
6 #define BALL_FORMAT_PDBINFO_H
7 
8 #include <vector>
9 #include <stdexcept>
10 
11 #ifndef BALL_FORMAT_PDBRECORDS_H
12 # include <BALL/FORMAT/PDBRecords.h>
13 #endif
14 
15 #ifndef BALL_FORMAT_PDBDEFS_H
16 # include <BALL/FORMAT/PDBdefs.h>
17 #endif
18 
19 #ifndef BALL_CONCEPT_PERSISTENCEMANAGER_H
21 #endif
22 
23 namespace BALL
24 {
25 
32  : public PersistentObject
33  {
34  public:
35 
37 
38 
40  PDBInfo() ;
43  PDBInfo(const PDBInfo& pdbi) ;
45  virtual ~PDBInfo() ;
47  virtual void clear();
49 
53  PDBInfo& operator = (const PDBInfo& rhs);
56 
60  bool operator == (const PDBInfo& rhs) const;
63  bool operator != (const PDBInfo& rhs) const;
65 
69  PDBRecords& getSkippedRecords() { return skipped_records_; }
72  const PDBRecords& getSkippedRecords() const { return skipped_records_; }
74  PDBRecords& getInvalidRecords() { return invalid_records_; }
76  const PDBRecords& getInvalidRecords() const { return invalid_records_; }
78  const String& getFilename() const { return filename_; }
80  void setFilename(const String& filename) { filename_ = filename; }
82  const String& getID() const { return id_; }
84  void setID(const String& id) { id_ = id; }
86  Size getNumberOfRecords() const { return number_of_records_; }
88  void setNumberOfRecords(Size n) { number_of_records_ = n; }
90  Size getNumberOfModels() const { return number_of_models_; }
92  Size& getNumberOfModels() { return number_of_models_; }
94  void setNumberOfModels(Size n) { number_of_models_ = n; }
96  Position getCurrentModel() const { return model_read_; }
98  Position& getCurentModel() { return model_read_; }
100  void setCurrentModel(Position n) { model_read_ = n; }
102  Size getNumberOfATOMRecords() const { return number_of_atom_records_; }
104  Size& getNumberOfATOMRecords() { return number_of_atom_records_; }
106  void setNumberOfATOMRecords(Size n) { number_of_atom_records_ = n; }
108  Size getNumberOfHETATMRecords() const { return number_of_hetatm_records_; }
110  Size& getNumberOfHETATMRecords() { return number_of_hetatm_records_; }
112  void setNumberOfHETATMRecords(Size n) { number_of_hetatm_records_ = n; }
114  const String& getName() const { return name_; }
116  void setName(const String& name) { name_ = name; }
121  std::list<Position> getRecordIndices(PDB::RecordType record) const;
123 
127 
130  //void write(PersistenceManager& pm) const;
131  void persistentWrite(PersistenceManager& pm, const char* name) const;
132 
135  //bool read(PersistenceManager& pm);
136  void persistentRead(PersistenceManager& pm);
137 
139 
140 
141  protected:
162  };
163 
164 } // namespace BALL
165 
166 #endif // BALL_FORMAT_PDBINFO_H
Size & getNumberOfATOMRecords()
Return the number of atom records read.
Definition: PDBInfo.h:104
#define BALL_CREATE(name)
Definition: create.h:62
PDBRecords skipped_records_
Skipped PDB records (not parsed)
Definition: PDBInfo.h:143
void setNumberOfRecords(Size n)
Set the number of records.
Definition: PDBInfo.h:88
void setNumberOfATOMRecords(Size n)
Set the number of atom records read.
Definition: PDBInfo.h:106
Position getCurrentModel() const
Return the number of the last model read.
Definition: PDBInfo.h:96
void setNumberOfModels(Size n)
Set the number of models.
Definition: PDBInfo.h:94
Size & getNumberOfHETATMRecords()
Return the number of hetatm records read.
Definition: PDBInfo.h:110
Size number_of_hetatm_records_
Number of HETATM records.
Definition: PDBInfo.h:161
Position & getCurentModel()
Return the number of the last model read.
Definition: PDBInfo.h:98
Size getNumberOfHETATMRecords() const
Return the number of hetatm records read.
Definition: PDBInfo.h:108
Size & getNumberOfModels()
Return the number of models.
Definition: PDBInfo.h:92
const String & getFilename() const
Return the filename.
Definition: PDBInfo.h:78
Size number_of_atom_records_
Number of ATOM records.
Definition: PDBInfo.h:159
const String & getName() const
Return the name of the system as contained in the HEADER record.
Definition: PDBInfo.h:114
Size getNumberOfRecords() const
Return the total number of records read.
Definition: PDBInfo.h:86
void setNumberOfHETATMRecords(Size n)
Set the number of hetatm records read.
Definition: PDBInfo.h:112
Size getNumberOfModels() const
Return the number of models.
Definition: PDBInfo.h:90
BALL_EXPORT bool operator!=(const String &s1, const String &s2)
void setFilename(const String &filename)
Set the filename.
Definition: PDBInfo.h:80
Position model_read_
Model last read.
Definition: PDBInfo.h:157
const String & getID() const
Return the PDB ID.
Definition: PDBInfo.h:82
const PDBRecords & getInvalidRecords() const
Return the unparsed records.
Definition: PDBInfo.h:76
PDBRecords & getInvalidRecords()
Return the unparsed records.
Definition: PDBInfo.h:74
Size number_of_models_
Total number of models.
Definition: PDBInfo.h:155
void setCurrentModel(Position n)
Set the number of the model read.
Definition: PDBInfo.h:100
Size number_of_records_
Total file size in bytes.
Definition: PDBInfo.h:153
Size getNumberOfATOMRecords() const
Return the number of atom records read.
Definition: PDBInfo.h:102
BALL_EXPORT bool operator==(const String &s1, const String &s2)
void setID(const String &id)
Set the PDB ID.
Definition: PDBInfo.h:84
RecordType
Definition: PDBdefs.h:58
PDBRecords invalid_records_
Invalid PDB records (tried to parse, but failed)
Definition: PDBInfo.h:145
String filename_
Filename.
Definition: PDBInfo.h:147
String name_
Name.
Definition: PDBInfo.h:151
#define BALL_EXPORT
Definition: COMMON/global.h:50
String id_
PDB ID.
Definition: PDBInfo.h:149
void setName(const String &name)
Set the name of the system. This is written to the HEADER record (truncated!).
Definition: PDBInfo.h:116
const PDBRecords & getSkippedRecords() const
Return the unparsed records.
Definition: PDBInfo.h:72