#include <Residue.h>
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.
Definition at line 42 of file Residue.h.
Public Types | |
| enum | Type |
| enum | Atom_label |
| typedef PDB_index< Residue > | Index |
| typedef std::pair< Atom::Index, Atom::Index > | Bond |
| typedef std::vector< Bond > ::const_iterator | Bonds_iterator |
| typedef Atoms::iterator | Atoms_iterator |
| typedef Atoms::const_iterator | Const_atoms_iterator |
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 Atom & | atom (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) |
| typedef PDB_index<Residue> dsrpdb::Residue::Index |
| typedef std::pair<Atom::Index,Atom::Index> dsrpdb::Residue::Bond |
| typedef std::vector<Bond>::const_iterator dsrpdb::Residue::Bonds_iterator |
| typedef Atoms::iterator dsrpdb::Residue::Atoms_iterator |
| typedef Atoms::const_iterator dsrpdb::Residue::Const_atoms_iterator |
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.
| dsrpdb::Residue::Residue | ( | ) | [inline] |
| dsrpdb::Residue::Residue | ( | Type | al | ) |
Make a residue of a given type.
| Type dsrpdb::Residue::type | ( | ) | const |
The label for the residue.
| 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.
| Bonds_iterator dsrpdb::Residue::bonds_end | ( | ) | const [inline] |
| unsigned int dsrpdb::Residue::number_of_bonds | ( | ) | const |
The number of atoms present in the residue.
| Atoms_iterator dsrpdb::Residue::atoms_begin | ( | ) | [inline] |
| Atoms_iterator dsrpdb::Residue::atoms_end | ( | ) | [inline] |
| Const_atoms_iterator dsrpdb::Residue::atoms_begin | ( | ) | const [inline] |
| Const_atoms_iterator dsrpdb::Residue::atoms_end | ( | ) | const [inline] |
| unsigned int dsrpdb::Residue::number_of_atoms | ( | ) | const |
The number of atoms present in the residue.
| bool dsrpdb::Residue::has_atom | ( | Atom_label | al | ) | const |
Return true if the atom is in the atoms() list.
| bool dsrpdb::Residue::can_have_atom | ( | Atom_label | al | ) | const |
Return true if residues of this type can have atoms of that type.
| const Atom& dsrpdb::Residue::atom | ( | Atom_label | al | ) | const |
Return the data for an atom.
| Atom_label dsrpdb::Residue::atom_label | ( | Atom::Index | model_index | ) | const |
Return the label of the atom with this index.
Referenced by set_atom_from_string().
| 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().
| Atom::Index dsrpdb::Residue::last_atom_index | ( | ) | const |
The index of the last atom in the residue.
| Index dsrpdb::Residue::index | ( | ) | const [inline] |
| void dsrpdb::Residue::set_index | ( | Index | i | ) |
Set the index for the residue.
| void dsrpdb::Residue::dump | ( | std::ostream & | out | ) | const |
Write it for debugging.
| void dsrpdb::Residue::write | ( | char | chain, | |
| std::ostream & | out | |||
| ) | const |
Write the lines for a pdb file.
| 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.
| 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.
| bool dsrpdb::Residue::has_bonds | ( | ) | const [inline] |
| static Type dsrpdb::Residue::type | ( | const std::string & | st | ) | [static] |
Convert a string for an amino acid type into a tag.
| static std::string dsrpdb::Residue::type_string | ( | Type | rl | ) | [static] |
A string so you can write an amino acid type.
| static Atom::Type dsrpdb::Residue::element | ( | Atom_label | al | ) | [static] |
Return the element corresponding to an atom label.
| static std::string dsrpdb::Residue::atom_label_string | ( | Atom_label | al | ) | [static] |
return the string corresponding to an atom label
| 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.