Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | List of all members
CDPL::Biomol::PDBData Class Reference

Data structure for the storage of preprocessed Brookhaven Protein Data Bank (PDB) data. More...

#include <PDBData.hpp>

Public Types

enum  RecordType {
  HEADER ,
  OBSLTE ,
  TITLE ,
  SPLIT ,
  CAVEAT ,
  COMPND ,
  SOURCE ,
  KEYWDS ,
  EXPDTA ,
  AUTHOR ,
  REVDAT ,
  SPRSDE ,
  JRNL ,
  REMARK ,
  DBREF ,
  DBREF1 ,
  DBREF2 ,
  SEQADV ,
  SEQRES ,
  MODRES ,
  HET ,
  FORMUL ,
  HETNAM ,
  HETSYN ,
  HELIX ,
  SHEET ,
  TURN ,
  SSBOND ,
  LINK ,
  CISPEP ,
  SITE ,
  CRYST1 ,
  MTRIX1 ,
  MTRIX2 ,
  MTRIX3 ,
  ORIGX1 ,
  ORIGX2 ,
  ORIGX3 ,
  SCALE1 ,
  SCALE2 ,
  SCALE3 ,
  STRUCTURE_ID ,
  DEPOSITION_DATE ,
  RESOLUTION
}
 Specifies the type of a stored PDB data record. More...
 
typedef std::shared_ptr< PDBDataSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated PDBData instances. More...
 
typedef TypeToDataMap::value_type Record
 The type of the stored record type and data pairs. More...
 
typedef TypeToDataMap::const_iterator ConstRecordIterator
 A constant iterator over the stored records. More...
 
typedef TypeToDataMap::iterator RecordIterator
 A mutable iterator over the stored records. More...
 

Public Member Functions

 PDBData ()
 Constructs an empty PDBData instance. More...
 
 PDBData (const PDBData &other)
 Constructs a copy of the PDBData instance other. More...
 
void clear ()
 Removes all stored records. More...
 
std::size_t getNumRecords () const
 Returns the number of stored records. More...
 
bool isEmpty () const
 Tells whether no records are stored. More...
 
bool containsRecord (const RecordType &type) const
 Tells whether a record of the given type is stored. More...
 
RecordIterator getRecord (const RecordType &type)
 Returns an iterator to the record of the given type. More...
 
ConstRecordIterator getRecord (const RecordType &type) const
 Returns a constant iterator to the record of the given type. More...
 
std::string & getData (const RecordType &type)
 Returns the data string associated with the given record type. More...
 
const std::string & getData (const RecordType &type) const
 Returns the data string associated with the given record type. More...
 
void removeRecord (const RecordIterator &it)
 Removes the record referenced by the given iterator. More...
 
bool removeRecord (const RecordType &type)
 Removes the record of the given type. More...
 
RecordIterator setRecord (const Record &rec)
 Stores the given record (any pre-existing record of the same type is replaced). More...
 
RecordIterator setRecord (const RecordType &type, const std::string &data)
 Stores a record built from type and data (any pre-existing record of the same type is replaced). More...
 
ConstRecordIterator getRecordsBegin () const
 Returns a constant iterator pointing to the first stored record. More...
 
RecordIterator getRecordsBegin ()
 Returns a mutable iterator pointing to the first stored record. More...
 
ConstRecordIterator getRecordsEnd () const
 Returns a constant iterator pointing one past the last stored record. More...
 
RecordIterator getRecordsEnd ()
 Returns a mutable iterator pointing one past the last stored record. More...
 
ConstRecordIterator begin () const
 Returns a constant iterator pointing to the first stored record (range-based for support). More...
 
RecordIterator begin ()
 Returns a mutable iterator pointing to the first stored record (range-based for support). More...
 
ConstRecordIterator end () const
 Returns a constant iterator pointing one past the last stored record (range-based for support). More...
 
RecordIterator end ()
 Returns a mutable iterator pointing one past the last stored record (range-based for support). More...
 

Detailed Description

Data structure for the storage of preprocessed Brookhaven Protein Data Bank (PDB) data.

See also
[PDB]

Member Typedef Documentation

◆ SharedPointer

A reference-counted smart pointer [SHPTR] for dynamically allocated PDBData instances.

◆ Record

typedef TypeToDataMap::value_type CDPL::Biomol::PDBData::Record

The type of the stored record type and data pairs.

◆ ConstRecordIterator

typedef TypeToDataMap::const_iterator CDPL::Biomol::PDBData::ConstRecordIterator

A constant iterator over the stored records.

◆ RecordIterator

typedef TypeToDataMap::iterator CDPL::Biomol::PDBData::RecordIterator

A mutable iterator over the stored records.

Member Enumeration Documentation

◆ RecordType

Specifies the type of a stored PDB data record.

Enumerator
HEADER 

HEADER record (structure classification, deposition date, PDB ID).

OBSLTE 

OBSLTE record (PDB IDs that have replaced this entry).

TITLE 

TITLE record (title of the entry).

SPLIT 

SPLIT record (list of entries that together form the complete structure).

CAVEAT 

CAVEAT record (warns of errors and unresolved issues of the entry).

COMPND 

COMPND record (description of the macromolecular contents).

SOURCE 

SOURCE record (specifies the biological and/or chemical source of each biological molecule).

KEYWDS 

KEYWDS record (a set of terms relevant to the entry).

EXPDTA 

EXPDTA record (information about the experiment).

AUTHOR 

AUTHOR record (contains the names of the people responsible for the contents of the entry).

REVDAT 

REVDAT record (revision history of the entry).

SPRSDE 

SPRSDE record (PDB IDs that this entry supersedes).

JRNL 

JRNL record (literature citation associated with the entry).

REMARK 

REMARK record (experimental details, annotations, comments, and information not included in other records).

DBREF 

DBREF record (cross-reference links between PDB sequences and a corresponding database sequence).

DBREF1 

DBREF1 record (first part of a two-line database cross-reference).

DBREF2 

DBREF2 record (second part of a two-line database cross-reference).

SEQADV 

SEQADV record (differences between sequence information in the SEQRES record and the sequence database entry given in DBREF).

SEQRES 

SEQRES record (residue sequence of biopolymer chains).

MODRES 

MODRES record (descriptions of modifications to protein and nucleic acid residues).

HET 

HET record (describes non-standard residues for which coordinates are supplied).

FORMUL 

FORMUL record (chemical formula of non-standard residues).

HETNAM 

HETNAM record (chemical names of non-standard residues).

HETSYN 

HETSYN record (synonyms for non-standard residues).

HELIX 

HELIX record (helix secondary structure annotations).

SHEET 

SHEET record (sheet secondary structure annotations).

TURN 

TURN record (locations of short loop turns that connect standard secondary structure segments).

SSBOND 

SSBOND record (identifies disulfide bonds in protein and polypeptide structures).

LINK 

LINK record (bonds between residues that are not implied by the primary structure).

CISPEP 

CISPEP record (specifies prolines and other peptides found to be in the cis conformation).

SITE 

SITE record (specifies residues of an active or binding site).

CRYST1 

CRYST1 record (unit cell parameters, space group, and Z value).

MTRIX1 

MTRIX1 record (first row of a non-crystallographic symmetry transformation matrix).

MTRIX2 

MTRIX2 record (second row of a non-crystallographic symmetry transformation matrix).

MTRIX3 

MTRIX3 record (third row of a non-crystallographic symmetry transformation matrix).

ORIGX1 

ORIGX1 record (first row of the orthogonal to submitted coordinates transformation).

ORIGX2 

ORIGX2 record (second row of the orthogonal to submitted coordinates transformation).

ORIGX3 

ORIGX3 record (third row of the orthogonal to submitted coordinates transformation).

SCALE1 

SCALE1 record (first row of the orthogonal to fractional coordinates transformation).

SCALE2 

SCALE2 record (second row of the orthogonal to fractional coordinates transformation).

SCALE3 

SCALE3 record (third row of the orthogonal to fractional coordinates transformation).

STRUCTURE_ID 

The 4 character PDB identifier extracted from the HEADER record.

DEPOSITION_DATE 

The deposition date extracted from the HEADER record.

RESOLUTION 

The experimental resolution extracted from REMARK records.

Constructor & Destructor Documentation

◆ PDBData() [1/2]

CDPL::Biomol::PDBData::PDBData ( )
inline

Constructs an empty PDBData instance.

◆ PDBData() [2/2]

CDPL::Biomol::PDBData::PDBData ( const PDBData other)
inline

Constructs a copy of the PDBData instance other.

Parameters
otherThe PDBData instance to copy.

Member Function Documentation

◆ clear()

void CDPL::Biomol::PDBData::clear ( )

Removes all stored records.

◆ getNumRecords()

std::size_t CDPL::Biomol::PDBData::getNumRecords ( ) const

Returns the number of stored records.

Returns
The number of records.

◆ isEmpty()

bool CDPL::Biomol::PDBData::isEmpty ( ) const

Tells whether no records are stored.

Returns
true if no records are stored, and false otherwise.

◆ containsRecord()

bool CDPL::Biomol::PDBData::containsRecord ( const RecordType type) const

Tells whether a record of the given type is stored.

Parameters
typeThe queried record type.
Returns
true if a record of the given type has been found, and false otherwise.

◆ getRecord() [1/2]

RecordIterator CDPL::Biomol::PDBData::getRecord ( const RecordType type)

Returns an iterator to the record of the given type.

Parameters
typeThe record type to look up.
Returns
An iterator pointing to the matching record, or to getRecordsEnd() if no matching record exists.

◆ getRecord() [2/2]

ConstRecordIterator CDPL::Biomol::PDBData::getRecord ( const RecordType type) const

Returns a constant iterator to the record of the given type.

Parameters
typeThe record type to look up.
Returns
A constant iterator pointing to the matching record, or to getRecordsEnd() if no matching record exists.

◆ getData() [1/2]

std::string& CDPL::Biomol::PDBData::getData ( const RecordType type)

Returns the data string associated with the given record type.

Parameters
typeThe record type whose data is requested.
Returns
A reference to the data string.
Exceptions
Base::ItemNotFoundif no record of the given type is stored.

◆ getData() [2/2]

const std::string& CDPL::Biomol::PDBData::getData ( const RecordType type) const

Returns the data string associated with the given record type.

Parameters
typeThe record type whose data is requested.
Returns
A const reference to the data string.
Exceptions
Base::ItemNotFoundif no record of the given type is stored.

◆ removeRecord() [1/2]

void CDPL::Biomol::PDBData::removeRecord ( const RecordIterator it)

Removes the record referenced by the given iterator.

Parameters
itIterator pointing to the record to remove.

◆ removeRecord() [2/2]

bool CDPL::Biomol::PDBData::removeRecord ( const RecordType type)

Removes the record of the given type.

Parameters
typeThe type of the record to remove.
Returns
true if the record was removed, and false if no matching record existed.

◆ setRecord() [1/2]

RecordIterator CDPL::Biomol::PDBData::setRecord ( const Record rec)

Stores the given record (any pre-existing record of the same type is replaced).

Parameters
recThe record to store.
Returns
An iterator pointing to the stored record.

◆ setRecord() [2/2]

RecordIterator CDPL::Biomol::PDBData::setRecord ( const RecordType type,
const std::string &  data 
)

Stores a record built from type and data (any pre-existing record of the same type is replaced).

Parameters
typeThe record type.
dataThe record data string.
Returns
An iterator pointing to the stored record.

◆ getRecordsBegin() [1/2]

ConstRecordIterator CDPL::Biomol::PDBData::getRecordsBegin ( ) const

Returns a constant iterator pointing to the first stored record.

Returns
A constant iterator pointing to the first record.

◆ getRecordsBegin() [2/2]

RecordIterator CDPL::Biomol::PDBData::getRecordsBegin ( )

Returns a mutable iterator pointing to the first stored record.

Returns
A mutable iterator pointing to the first record.

◆ getRecordsEnd() [1/2]

ConstRecordIterator CDPL::Biomol::PDBData::getRecordsEnd ( ) const

Returns a constant iterator pointing one past the last stored record.

Returns
A constant iterator pointing one past the last record.

◆ getRecordsEnd() [2/2]

RecordIterator CDPL::Biomol::PDBData::getRecordsEnd ( )

Returns a mutable iterator pointing one past the last stored record.

Returns
A mutable iterator pointing one past the last record.

◆ begin() [1/2]

ConstRecordIterator CDPL::Biomol::PDBData::begin ( ) const

Returns a constant iterator pointing to the first stored record (range-based for support).

Returns
A constant iterator pointing to the first record.

◆ begin() [2/2]

RecordIterator CDPL::Biomol::PDBData::begin ( )

Returns a mutable iterator pointing to the first stored record (range-based for support).

Returns
A mutable iterator pointing to the first record.

◆ end() [1/2]

ConstRecordIterator CDPL::Biomol::PDBData::end ( ) const

Returns a constant iterator pointing one past the last stored record (range-based for support).

Returns
A constant iterator pointing one past the last record.

◆ end() [2/2]

RecordIterator CDPL::Biomol::PDBData::end ( )

Returns a mutable iterator pointing one past the last stored record (range-based for support).

Returns
A mutable iterator pointing one past the last record.

The documentation for this class was generated from the following file: