Main Page | Namespace List | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Examples

dsrpdb::PDB Class Reference

#include <PDB.h>

List of all members.


Detailed Description

A class for representing a whole PDB file with possibly several models.

See pdb_split.cc for an example manipulating a PDB by splitting it into parts.

Examples:

pdb_align.cc, pdb_align_points.cc, pdb_distance.cc, and pdb_split.cc.

Definition at line 36 of file PDB.h.

Public Types

typedef std::vector< std::string
>::const_iterator 
Header_iterator
typedef std::vector< Model
>::const_iterator 
Const_models_iterator
typedef std::vector< Model
>::iterator 
Models_iterator

Public Member Functions

 PDB (std::istream &in, bool print_errors=false)
 PDB ()
void write (std::ostream &out) const
const Modelmodel (unsigned int i) const
Modelmodel (unsigned int i)
void new_model (const Model &m)
size_t number_of_models () const
Header_iterator header_begin () const
Header_iterator header_end () const
template<class It>
void set_header (It b, It e)
Const_models_iterator models_begin () const
Const_models_iterator models_end () const
Models_iterator models_begin ()
Models_iterator models_end ()

Protected Attributes

std::vector< std::string > header_
std::vector< Modelmodels_


Member Typedef Documentation

typedef std::vector<Model>::const_iterator dsrpdb::PDB::Const_models_iterator
 

iterator for models

Definition at line 73 of file PDB.h.

typedef std::vector<Model>::iterator dsrpdb::PDB::Models_iterator
 

non-const iterator for models

Definition at line 75 of file PDB.h.


Constructor & Destructor Documentation

dsrpdb::PDB::PDB std::istream &  in,
bool  print_errors = false
 

Read a pdb file from the stream.

The optional bool controls whether errors (such as unparsable PDB lines). Set it to false to disable printing errors.

dsrpdb::PDB::PDB  ) 
 

Construct a empty PDB.


Member Function Documentation

Header_iterator dsrpdb::PDB::header_begin  )  const
 

iterator through the lines of the header

Header_iterator dsrpdb::PDB::header_end  )  const
 

end iterator

Model& dsrpdb::PDB::model unsigned int  i  ) 
 

get the ith model

const Model& dsrpdb::PDB::model unsigned int  i  )  const
 

get the ith model

void dsrpdb::PDB::new_model const Model m  ) 
 

set a model

Examples:
pdb_split.cc.

size_t dsrpdb::PDB::number_of_models  )  const
 

how many models are there?

template<class It>
void dsrpdb::PDB::set_header It  b,
It  e
[inline]
 

Set the header.

Examples:
pdb_split.cc.

Definition at line 67 of file PDB.h.

References header_.

void dsrpdb::PDB::write std::ostream &  out  )  const
 

Write a pdb file to the stream.

Examples:
pdb_split.cc.


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