Minimalistic pdb parser. More...
#include <PDB.h>
Public Member Functions | |
bool | read (const std::string &file, bool naturalUnits, double scale) |
Read the pdb from a file, scaling positions by a factor scale. More... | |
bool | readFromFilepointer (FILE *fp, bool naturalUnits, double scale) |
Read from a file pointer. More... | |
const std::vector< Vector > & | getPositions () const |
Access to the position array. More... | |
const std::vector< double > & | getOccupancy () const |
Access to the occupancy array. More... | |
const std::vector< double > & | getBeta () const |
Access to the beta array. More... | |
void | setArgKeyword (const std::string &new_args) |
This is used to set the keyword ARG - this is so we we can use a1. More... | |
const std::vector< std::string > & | getRemark () const |
Access to the lines of REMARK. More... | |
const std::vector< AtomNumber > & | getAtomNumbers () const |
Access to the indexes. More... | |
unsigned | size () const |
Returns the number of atoms. More... | |
void | getChainNames (std::vector< std::string > &chains) const |
Get the names of all the chains in the pdb file. More... | |
void | getResidueRange (const std::string &chainname, unsigned &res_start, unsigned &res_end, std::string &errmsg) const |
Get the residues in each of the chains. More... | |
void | getAtomRange (const std::string &chainname, AtomNumber &a_start, AtomNumber &a_end, std::string &errmsg) const |
Get the atoms in each of the chains. More... | |
std::string | getChainID (const unsigned &resnumber) const |
Get the chain ID that a particular residue is a part of. More... | |
std::string | getAtomName (AtomNumber a) const |
return the name of a specific atom More... | |
unsigned | getResidueNumber (AtomNumber a) const |
return the residue number for a specific atom More... | |
std::string | getResidueName (AtomNumber a) const |
return the residue name for a specific atom More... | |
std::string | getResidueName (const unsigned &resnum) const |
get the name of the resnum'th residue More... | |
bool | checkForResidue (const std::string &name) const |
Check if any of the residues are named name. More... | |
bool | checkForAtom (const std::string &name) const |
Check if any of the atoms are named atom. More... | |
AtomNumber | getNamedAtomFromResidue (const std::string &aname, const unsigned &resnum) const |
Return the atom named aname from residue number resnum. More... | |
const std::vector< unsigned > & | getAtomBlockEnds () const |
Get the extents of the blocks containing the atoms. More... | |
unsigned | getNumberOfAtomBlocks () const |
Get the number of blocks of atoms in the pdb. More... | |
Private Attributes | |
std::vector< unsigned > | block_ends |
std::vector< std::string > | atomsymb |
std::vector< std::string > | chain |
std::vector< unsigned > | residue |
std::vector< Vector > | positions |
std::vector< double > | occupancy |
std::vector< double > | beta |
std::vector< std::string > | remark |
std::vector< AtomNumber > | numbers |
std::map< AtomNumber, unsigned > | number2index |
std::vector< std::string > | residuenames |
Friends | |
Log & | operator<< (Log &ostr, const PDB &pdb) |
use the log to dump information More... | |
Minimalistic pdb parser.
Contain positions, atomic indexes, occupancy and beta. We should also add other info (e.g. residue name etc).
bool PLMD::PDB::checkForAtom | ( | const std::string & | name | ) | const |
Check if any of the atoms are named atom.
bool PLMD::PDB::checkForResidue | ( | const std::string & | name | ) | const |
Check if any of the residues are named name.
const std::vector< unsigned > & PLMD::PDB::getAtomBlockEnds | ( | ) | const |
Get the extents of the blocks containing the atoms.
std::string PLMD::PDB::getAtomName | ( | AtomNumber | a | ) | const |
return the name of a specific atom
const std::vector< AtomNumber > & PLMD::PDB::getAtomNumbers | ( | ) | const |
Access to the indexes.
void PLMD::PDB::getAtomRange | ( | const std::string & | chainname, |
AtomNumber & | a_start, | ||
AtomNumber & | a_end, | ||
std::string & | errmsg | ||
) | const |
Get the atoms in each of the chains.
const std::vector< double > & PLMD::PDB::getBeta | ( | ) | const |
Access to the beta array.
std::string PLMD::PDB::getChainID | ( | const unsigned & | resnumber | ) | const |
Get the chain ID that a particular residue is a part of.
void PLMD::PDB::getChainNames | ( | std::vector< std::string > & | chains | ) | const |
Get the names of all the chains in the pdb file.
AtomNumber PLMD::PDB::getNamedAtomFromResidue | ( | const std::string & | aname, |
const unsigned & | resnum | ||
) | const |
Return the atom named aname from residue number resnum.
unsigned PLMD::PDB::getNumberOfAtomBlocks | ( | ) | const |
Get the number of blocks of atoms in the pdb.
const std::vector< double > & PLMD::PDB::getOccupancy | ( | ) | const |
Access to the occupancy array.
const std::vector< Vector > & PLMD::PDB::getPositions | ( | ) | const |
Access to the position array.
const std::vector< std::string > & PLMD::PDB::getRemark | ( | ) | const |
Access to the lines of REMARK.
std::string PLMD::PDB::getResidueName | ( | AtomNumber | a | ) | const |
return the residue name for a specific atom
std::string PLMD::PDB::getResidueName | ( | const unsigned & | resnum | ) | const |
get the name of the resnum'th residue
unsigned PLMD::PDB::getResidueNumber | ( | AtomNumber | a | ) | const |
return the residue number for a specific atom
void PLMD::PDB::getResidueRange | ( | const std::string & | chainname, |
unsigned & | res_start, | ||
unsigned & | res_end, | ||
std::string & | errmsg | ||
) | const |
Get the residues in each of the chains.
bool PLMD::PDB::read | ( | const std::string & | file, |
bool | naturalUnits, | ||
double | scale | ||
) |
Read the pdb from a file, scaling positions by a factor scale.
bool PLMD::PDB::readFromFilepointer | ( | FILE * | fp, |
bool | naturalUnits, | ||
double | scale | ||
) |
Read from a file pointer.
void PLMD::PDB::setArgKeyword | ( | const std::string & | new_args | ) |
This is used to set the keyword ARG - this is so we we can use a1.
unsigned PLMD::PDB::size | ( | ) | const |
Returns the number of atoms.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Hosted by GitHub | 1.8.7 |