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< 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)

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

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

Write a pdb file to the stream.

Examples:
pdb_align.cc, and pdb_split.cc.

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

get the ith model

Examples:
pdb_align.cc, pdb_distance.cc, and pdb_split.cc.

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

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?

Examples:
pdb_align.cc, pdb_distance.cc, and pdb_split.cc.

Header_iterator dsrpdb::PDB::header_begin (  )  const

iterator through the lines of the header

Examples:
pdb_split.cc.

Header_iterator dsrpdb::PDB::header_end (  )  const

end iterator

Examples:
pdb_split.cc.

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.


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