PROFASI
Version 1.5
|
An abstraction of one model in a PDB file. More...
#include <PDBReader.hh>
Public Member Functions | |
int | index_of_res (std::string chid, std::string resnum) |
Translate residue number written in file. | |
int | index_of (std::string chid) |
Return index of a given chain id. | |
When a PDB file is parsed, it is convenient to find out what models it contains, and store enough information about the models, so that a particular model can be easily selected for further processing.
int prf::PDB_model::index_of_res | ( | std::string | chid, |
std::string | resnum | ||
) |
Residue numbers written in a PDB file may start from 634, may not even be strictly numeric in nature. This function takes one such number label, and translates it into an integer index, measured from the first residue in the file for that chain.
The first residue is numbered 0, no matter what it is called in the PDB file. Given any PDB file, however bizarre, there exists this numbering relative to the first residue in that file, which is well defined. At least that is the faith.