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

dsrpdb::Residue Class Reference

#include <Residue.h>

List of all members.


Detailed Description

The class representing a residue.

All the information concerning atoms and bonds for each residue is stored here. To add atoms to residues, new residues, or bonds to residues, look in Residue_data.cc. There is documentation there of what you need to do.

Examples:

check_protein.cc.

Definition at line 42 of file Residue.h.

Public Types

typedef PDB_index< ResidueIndex
typedef std::pair< Atom::Index,
Atom::Index
Bond
typedef small_map< Atom_label,
Atom
Atoms
typedef std::vector< Bond
>::const_iterator 
Bonds_iterator
typedef Atoms::iterator Atoms_iterator
typedef Atoms::const_iterator Const_atoms_iterator
enum  Type
enum  Atom_label

Public Member Functions

 Residue ()
 Residue (Type al)
Type type () const
Bonds_iterator bonds_begin () const
Bonds_iterator bonds_end () const
unsigned int number_of_bonds () const
Atoms_iterator atoms_begin ()
Atoms_iterator atoms_end ()
Const_atoms_iterator atoms_begin () const
Const_atoms_iterator atoms_end () const
unsigned int number_of_atoms () const
bool has_atom (Atom_label al) const
bool can_have_atom (Atom_label al) const
const Atomatom (Atom_label al) const
Atom_label atom_label (Atom::Index model_index) const
void set_atom (Atom_label al, const Atom &a)
void set_atom_from_string (const char *str, const Atom &a)
Atom::Index last_atom_index () const
Index index () const
void set_index (Index i)
void dump (std::ostream &out) const
void write (char chain, std::ostream &out) const
Point sidechain_point () const
void set_has_bonds (bool tf)
bool has_bonds () const

Static Public Member Functions

static Type type (const std::string &st)
static std::string type_string (Type rl)
static Atom::Type element (Atom_label al)
static std::string atom_label_string (Atom_label al)
static Atom_label atom_label (const char *c)

Protected Member Functions

Atom::Index min_atom_index () const

Friends

class Protein


Member Typedef Documentation

typedef Atoms::iterator dsrpdb::Residue::Atoms_iterator
 

An iterator to list all the atoms.

Definition at line 137 of file Residue.h.

typedef std::pair<Atom::Index,Atom::Index> dsrpdb::Residue::Bond
 

A bond between two atoms in a residue.

The ints refer the the atom index.

Definition at line 102 of file Residue.h.

typedef std::vector<Bond>::const_iterator dsrpdb::Residue::Bonds_iterator
 

Return a list of all the bonds in the residue.

Definition at line 117 of file Residue.h.

typedef Atoms::const_iterator dsrpdb::Residue::Const_atoms_iterator
 

An iterator to list all the atoms.

Definition at line 150 of file Residue.h.

typedef PDB_index<Residue> dsrpdb::Residue::Index
 

The type for storing residue indices in the PDB.

Definition at line 48 of file Residue.h.


Member Enumeration Documentation

enum dsrpdb::Residue::Atom_label
 

The labels of atoms within residues.

These are the labels for each atom in each residue. The identifiers are attempting to following the PDB specs. Feel free to add more if needed.

AL_N must be before AL_CA which must be before AL_C to get the backbone order correct.

Definition at line 64 of file Residue.h.

enum dsrpdb::Residue::Type
 

The labels for the types of residues.

Definition at line 51 of file Residue.h.


Constructor & Destructor Documentation

dsrpdb::Residue::Residue  )  [inline]
 

Default constructor. Makes and invalid residue.

Definition at line 107 of file Residue.h.

dsrpdb::Residue::Residue Type  al  ) 
 

Make a residue of a given type.


Member Function Documentation

const Atom& dsrpdb::Residue::atom Atom_label  al  )  const
 

Return the data for an atom.

static Atom_label dsrpdb::Residue::atom_label const char *  c  )  [static]
 

Return an atom label from a string.

Note, this label may be adjusted when the atoms is added to a residue to address naming inconsistencies.

Atom_label dsrpdb::Residue::atom_label Atom::Index  model_index  )  const
 

Return the label of the atom with this index.

Examples:
check_protein.cc.

Referenced by set_atom_from_string().

static std::string dsrpdb::Residue::atom_label_string Atom_label  al  )  [static]
 

return the string corresponding to an atom label

Const_atoms_iterator dsrpdb::Residue::atoms_begin  )  const [inline]
 

Return a list of the labels of all the atoms which are present.

Definition at line 153 of file Residue.h.

References dsrpdb::small_map< Key, Data >::begin().

Atoms_iterator dsrpdb::Residue::atoms_begin  )  [inline]
 

Return a list of the labels of all the atoms which are present.

Definition at line 140 of file Residue.h.

References dsrpdb::small_map< Key, Data >::begin().

Const_atoms_iterator dsrpdb::Residue::atoms_end  )  const [inline]
 

End iterating through the atoms.

Definition at line 158 of file Residue.h.

References dsrpdb::small_map< Key, Data >::end().

Atoms_iterator dsrpdb::Residue::atoms_end  )  [inline]
 

End iterating through the atoms.

Definition at line 145 of file Residue.h.

References dsrpdb::small_map< Key, Data >::end().

Bonds_iterator dsrpdb::Residue::bonds_begin  )  const [inline]
 

Begin iterating through the list of all the bonds.

Note that the iterator will be invalidated if the residue is changed.

Note that if Residue::has_bonds() is false, this returns an empty sequence.

Definition at line 125 of file Residue.h.

Bonds_iterator dsrpdb::Residue::bonds_end  )  const [inline]
 

End bond iteration.

Definition at line 129 of file Residue.h.

bool dsrpdb::Residue::can_have_atom Atom_label  al  )  const
 

Return true if residues of this type can have atoms of that type.

void dsrpdb::Residue::dump std::ostream &  out  )  const
 

Write it for debugging.

static Atom::Type dsrpdb::Residue::element Atom_label  al  )  [static]
 

Return the element corresponding to an atom label.

bool dsrpdb::Residue::has_atom Atom_label  al  )  const
 

Return true if the atom is in the atoms() list.

bool dsrpdb::Residue::has_bonds  )  const [inline]
 

Return whether this residue has the inter-atom bonds computed.

Definition at line 228 of file Residue.h.

Index dsrpdb::Residue::index  )  const [inline]
 

The index for the residue.

This is 0 based index so it is the PDB index -1.

Definition at line 198 of file Residue.h.

Atom::Index dsrpdb::Residue::last_atom_index  )  const
 

The index of the last atom in the residue.

unsigned int dsrpdb::Residue::number_of_atoms  )  const
 

The number of atoms present in the residue.

unsigned int dsrpdb::Residue::number_of_bonds  )  const
 

The number of atoms present in the residue.

void dsrpdb::Residue::set_atom Atom_label  al,
const Atom a
 

Set an atom.

If the atom is not already there, then the bonds iterators are invalidated.

Referenced by set_atom_from_string().

void dsrpdb::Residue::set_atom_from_string const char *  str,
const Atom a
[inline]
 

Set an atom using a string as a label.

Definition at line 188 of file Residue.h.

References atom_label(), and set_atom().

void dsrpdb::Residue::set_has_bonds bool  tf  ) 
 

Set whether all the inter-atom bonds are present or not.

This must be true before Residue::bonds_begin() is called.

void dsrpdb::Residue::set_index Index  i  ) 
 

Set the index for the residue.

Point dsrpdb::Residue::sidechain_point  )  const
 

Return a point representing the sidechain.

If the sidechain is empty this returns the CA location. Otherwise it returns the location of some atom or the average of some atom locations.

static Type dsrpdb::Residue::type const std::string &  st  )  [static]
 

Convert a string for an amino acid type into a tag.

Type dsrpdb::Residue::type  )  const
 

The label for the residue.

static std::string dsrpdb::Residue::type_string Type  rl  )  [static]
 

A string so you can write an amino acid type.

void dsrpdb::Residue::write char  chain,
std::ostream &  out
const
 

Write the lines for a pdb file.


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