BALL 1.5.0
Loading...
Searching...
No Matches
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
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
23namespace BALL
24{
25
32 : public PersistentObject
33 {
34 public:
35
37
38
43 PDBInfo(const PDBInfo& pdbi) ;
45 virtual ~PDBInfo() ;
47 virtual void clear();
49
54 PDBInfo& operator = (const PDBInfo& rhs);
56
61 bool operator == (const PDBInfo& rhs) const;
63 bool operator != (const PDBInfo& rhs) const;
65
70 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);
137
139
140
141 protected:
162 };
163
164} // namespace BALL
165
166#endif // BALL_FORMAT_PDBINFO_H
#define BALL_CREATE(name)
Definition create.h:62
const String & getID() const
Return the PDB ID.
Definition PDBInfo.h:82
PDBRecords skipped_records_
Skipped PDB records (not parsed)
Definition PDBInfo.h:143
Size & getNumberOfATOMRecords()
Return the number of atom records read.
Definition PDBInfo.h:104
void setID(const String &id)
Set the PDB ID.
Definition PDBInfo.h:84
Position getCurrentModel() const
Return the number of the last model read.
Definition PDBInfo.h:96
PDBRecords & getInvalidRecords()
Return the unparsed records.
Definition PDBInfo.h:74
void persistentWrite(PersistenceManager &pm, const char *name) const
void setCurrentModel(Position n)
Set the number of the model read.
Definition PDBInfo.h:100
const PDBRecords & getInvalidRecords() const
Return the unparsed records.
Definition PDBInfo.h:76
std::list< Position > getRecordIndices(PDB::RecordType record) const
Position model_read_
Model last read.
Definition PDBInfo.h:157
PDBRecords invalid_records_
Invalid PDB records (tried to parse, but failed)
Definition PDBInfo.h:145
Size getNumberOfHETATMRecords() const
Return the number of hetatm records read.
Definition PDBInfo.h:108
void persistentRead(PersistenceManager &pm)
Size number_of_records_
Total file size in bytes.
Definition PDBInfo.h:153
const String & getName() const
Return the name of the system as contained in the HEADER record.
Definition PDBInfo.h:114
String filename_
Filename.
Definition PDBInfo.h:147
void setNumberOfATOMRecords(Size n)
Set the number of atom records read.
Definition PDBInfo.h:106
const String & getFilename() const
Return the filename.
Definition PDBInfo.h:78
void setFilename(const String &filename)
Set the filename.
Definition PDBInfo.h:80
Position & getCurentModel()
Return the number of the last model read.
Definition PDBInfo.h:98
Size & getNumberOfModels()
Return the number of models.
Definition PDBInfo.h:92
Size getNumberOfATOMRecords() const
Return the number of atom records read.
Definition PDBInfo.h:102
String id_
PDB ID.
Definition PDBInfo.h:149
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
void setNumberOfRecords(Size n)
Set the number of records.
Definition PDBInfo.h:88
Size number_of_models_
Total number of models.
Definition PDBInfo.h:155
Size getNumberOfModels() const
Return the number of models.
Definition PDBInfo.h:90
void setNumberOfModels(Size n)
Set the number of models.
Definition PDBInfo.h:94
Size number_of_atom_records_
Number of ATOM records.
Definition PDBInfo.h:159
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
const PDBRecords & getSkippedRecords() const
Return the unparsed records.
Definition PDBInfo.h:72
void setName(const String &name)
Set the name of the system. This is written to the HEADER record (truncated!).
Definition PDBInfo.h:116
String name_
Name.
Definition PDBInfo.h:151
#define BALL_EXPORT