Loading...
Searching...
No Matches
PDBInfo.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_FORMAT_PDBINFO_H
#define BALL_FORMAT_PDBINFO_H
#include <vector>
#include <stdexcept>
#ifndef BALL_FORMAT_PDBRECORDS_H
# include <BALL/FORMAT/PDBRecords.h>
#endif
#ifndef BALL_FORMAT_PDBDEFS_H
# include <BALL/FORMAT/PDBdefs.h>
#endif
#ifndef BALL_CONCEPT_PERSISTENCEMANAGER_H
# include <BALL/CONCEPT/persistenceManager.h>
#endif
namespace BALL
{
class BALL_EXPORT PDBInfo
: public PersistentObject
{
public:
BALL_CREATE(PDBInfo)
PDBInfo() ;
PDBInfo(const PDBInfo& pdbi) ;
virtual ~PDBInfo() ;
virtual void clear();
PDBInfo& operator = (const PDBInfo& rhs);
bool operator == (const PDBInfo& rhs) const;
bool operator != (const PDBInfo& rhs) const;
PDBRecords& getSkippedRecords() { return skipped_records_; }
const PDBRecords& getSkippedRecords() const { return skipped_records_; }
PDBRecords& getInvalidRecords() { return invalid_records_; }
const PDBRecords& getInvalidRecords() const { return invalid_records_; }
const String& getFilename() const { return filename_; }
void setFilename(const String& filename) { filename_ = filename; }
const String& getID() const { return id_; }
void setID(const String& id) { id_ = id; }
Size getNumberOfRecords() const { return number_of_records_; }
void setNumberOfRecords(Size n) { number_of_records_ = n; }
Size getNumberOfModels() const { return number_of_models_; }
Size& getNumberOfModels() { return number_of_models_; }
void setNumberOfModels(Size n) { number_of_models_ = n; }
Position getCurrentModel() const { return model_read_; }
Position& getCurentModel() { return model_read_; }
void setCurrentModel(Position n) { model_read_ = n; }
Size getNumberOfATOMRecords() const { return number_of_atom_records_; }
Size& getNumberOfATOMRecords() { return number_of_atom_records_; }
void setNumberOfATOMRecords(Size n) { number_of_atom_records_ = n; }
Size getNumberOfHETATMRecords() const { return number_of_hetatm_records_; }
Size& getNumberOfHETATMRecords() { return number_of_hetatm_records_; }
void setNumberOfHETATMRecords(Size n) { number_of_hetatm_records_ = n; }
const String& getName() const { return name_; }
void setName(const String& name) { name_ = name; }
std::list<Position> getRecordIndices(PDB::RecordType record) const;
//void write(PersistenceManager& pm) const;
void persistentWrite(PersistenceManager& pm, const char* name) const;
//bool read(PersistenceManager& pm);
void persistentRead(PersistenceManager& pm);
protected:
PDBRecords skipped_records_;
PDBRecords invalid_records_;
String filename_;
String id_;
String name_;
Size number_of_records_;
Size number_of_models_;
Position model_read_;
Size number_of_atom_records_;
Size number_of_hetatm_records_;
};
} // namespace BALL
#endif // BALL_FORMAT_PDBINFO_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
PDBRecords.h
PDBdefs.h
BALL::PDBInfo::getID
const String & getID() const
Return the PDB ID.
Definition PDBInfo.h:82
BALL::PDBInfo::clear
virtual void clear()
Reset all attributes to their initial state.
BALL::PDBInfo::skipped_records_
PDBRecords skipped_records_
Skipped PDB records (not parsed).
Definition PDBInfo.h:143
BALL::PDBInfo::getNumberOfATOMRecords
Size & getNumberOfATOMRecords()
Return the number of atom records read.
Definition PDBInfo.h:104
BALL::PDBInfo::setID
void setID(const String &id)
Set the PDB ID.
Definition PDBInfo.h:84
BALL::PDBInfo::getCurrentModel
Position getCurrentModel() const
Return the number of the last model read.
Definition PDBInfo.h:96
BALL::PDBInfo::getInvalidRecords
PDBRecords & getInvalidRecords()
Return the unparsed records.
Definition PDBInfo.h:74
BALL::PDBInfo::persistentWrite
void persistentWrite(PersistenceManager &pm, const char *name) const
BALL::PDBInfo::setCurrentModel
void setCurrentModel(Position n)
Set the number of the model read.
Definition PDBInfo.h:100
BALL::PDBInfo::getInvalidRecords
const PDBRecords & getInvalidRecords() const
Return the unparsed records.
Definition PDBInfo.h:76
BALL::PDBInfo::getRecordIndices
std::list< Position > getRecordIndices(PDB::RecordType record) const
BALL::PDBInfo::model_read_
Position model_read_
Model last read.
Definition PDBInfo.h:157
BALL::PDBInfo::invalid_records_
PDBRecords invalid_records_
Invalid PDB records (tried to parse, but failed).
Definition PDBInfo.h:145
BALL::PDBInfo::getNumberOfHETATMRecords
Size getNumberOfHETATMRecords() const
Return the number of hetatm records read.
Definition PDBInfo.h:108
BALL::PDBInfo::persistentRead
void persistentRead(PersistenceManager &pm)
BALL::PDBInfo::number_of_records_
Size number_of_records_
Total file size in bytes.
Definition PDBInfo.h:153
BALL::PDBInfo::getName
const String & getName() const
Return the name of the system as contained in the HEADER record.
Definition PDBInfo.h:114
BALL::PDBInfo::filename_
String filename_
Filename.
Definition PDBInfo.h:147
BALL::PDBInfo::setNumberOfATOMRecords
void setNumberOfATOMRecords(Size n)
Set the number of atom records read.
Definition PDBInfo.h:106
BALL::PDBInfo::PDBInfo
PDBInfo()
BALL::PDBInfo::getFilename
const String & getFilename() const
Return the filename.
Definition PDBInfo.h:78
BALL::PDBInfo::setFilename
void setFilename(const String &filename)
Set the filename.
Definition PDBInfo.h:80
BALL::PDBInfo::getCurentModel
Position & getCurentModel()
Return the number of the last model read.
Definition PDBInfo.h:98
BALL::PDBInfo::getNumberOfModels
Size & getNumberOfModels()
Return the number of models.
Definition PDBInfo.h:92
BALL::PDBInfo::getNumberOfATOMRecords
Size getNumberOfATOMRecords() const
Return the number of atom records read.
Definition PDBInfo.h:102
BALL::PDBInfo::id_
String id_
PDB ID.
Definition PDBInfo.h:149
BALL::PDBInfo::getNumberOfRecords
Size getNumberOfRecords() const
Return the total number of records read.
Definition PDBInfo.h:86
BALL::PDBInfo::setNumberOfHETATMRecords
void setNumberOfHETATMRecords(Size n)
Set the number of hetatm records read.
Definition PDBInfo.h:112
BALL::PDBInfo::setNumberOfRecords
void setNumberOfRecords(Size n)
Set the number of records.
Definition PDBInfo.h:88
BALL::PDBInfo::number_of_models_
Size number_of_models_
Total number of models.
Definition PDBInfo.h:155
BALL::PDBInfo::getNumberOfModels
Size getNumberOfModels() const
Return the number of models.
Definition PDBInfo.h:90
BALL::PDBInfo::setNumberOfModels
void setNumberOfModels(Size n)
Set the number of models.
Definition PDBInfo.h:94
BALL::PDBInfo::number_of_atom_records_
Size number_of_atom_records_
Number of ATOM records.
Definition PDBInfo.h:159
BALL::PDBInfo::getNumberOfHETATMRecords
Size & getNumberOfHETATMRecords()
Return the number of hetatm records read.
Definition PDBInfo.h:110
BALL::PDBInfo::number_of_hetatm_records_
Size number_of_hetatm_records_
Number of HETATM records.
Definition PDBInfo.h:161
BALL::PDBInfo::getSkippedRecords
const PDBRecords & getSkippedRecords() const
Return the unparsed records.
Definition PDBInfo.h:72
BALL::PDBInfo::getSkippedRecords
PDBRecords & getSkippedRecords()
Return the unparsed records.
Definition PDBInfo.h:70
BALL::PDBInfo::setName
void setName(const String &name)
Set the name of the system. This is written to the HEADER record (truncated!).
Definition PDBInfo.h:116
BALL::PDBInfo::name_
String name_
Name.
Definition PDBInfo.h:151
BALL::PDBRecords
Definition PDBRecords.h:33
BALL::PersistenceManager
Definition persistenceManager.h:73
BALL::PersistentObject::PersistentObject
PersistentObject()
Definition persistentObject.h:39
BALL::String
Definition string.h:57
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
BALL::PDB::RecordType
RecordType
Definition PDBdefs.h:59
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Position
BALL_SIZE_TYPE Position
Definition COMMON/global.h:140
persistenceManager.h