Minimalistic pdb parser. More...
#include <PDB.h>
Public Member Functions | |
void | addBlockEnd (const unsigned &end) |
Check if the properties that are required are in this pdb this is used in PLMD::mapping::Mapping. More... | |
void | addRemark (std::vector< std::string > &v1) |
Add data to argnames map. More... | |
bool | checkForAtom (AtomNumber a) const |
Check if specific atom exists. More... | |
bool | checkForAtom (const std::string &name) const |
Check if any of the atoms are named atom. More... | |
bool | checkForResidue (const std::string &name) const |
Check if any of the residues are named name. More... | |
std::vector< std::string > | getArgumentNames () const |
bool | getArgumentValue (const std::string &name, double &value) const |
Get the value of one of the arguments in the PDB file. More... | |
const std::vector< unsigned > & | getAtomBlockEnds () const |
Get the extents of the blocks containing the atoms. More... | |
std::string | getAtomName (AtomNumber a) const |
return the name of a specific atom More... | |
const std::vector< AtomNumber > & | getAtomNumbers () const |
Access to the indexes. 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::vector< AtomNumber > | getAtomsInChain (const std::string &chainid) const |
Access to the atoms of a chain. More... | |
std::vector< AtomNumber > | getAtomsInResidue (const unsigned &resnum, const std::string &chainid) const |
Access to the atoms of a residue. More... | |
const std::vector< double > & | getBeta () const |
Access to the beta array. More... | |
const Vector & | getBoxAng () const |
Returns box axis angles. More... | |
const Vector & | getBoxAxs () const |
Returns box axis lengths. More... | |
const Tensor & | getBoxVec () const |
Returns box axis vectors. More... | |
std::string | getChainID (AtomNumber a) const |
Get the chain ID from atom number. More... | |
std::string | getChainID (const unsigned &resnumber) const |
Get the chain ID that a particular residue is a part of. More... | |
void | getChainNames (std::vector< std::string > &chains) const |
Get the names of all the chains in the pdb file. More... | |
std::string | getMtype () const |
Get the metric type. More... | |
AtomNumber | getNamedAtomFromResidue (const std::string &aname, const unsigned &resnum) const |
Return the atom named aname from residue number resnum. More... | |
AtomNumber | getNamedAtomFromResidueAndChain (const std::string &aname, const unsigned &resnum, const std::string &chain) const |
Return the atom named aname from residue number resnum and chain. More... | |
unsigned | getNumberOfAtomBlocks () const |
Get the number of blocks of atoms in the pdb. More... | |
const std::vector< double > & | getOccupancy () const |
Access to the occupancy array. More... | |
Vector | getPosition (AtomNumber a) const |
Access to the position array. More... | |
const std::vector< Vector > & | getPositions () const |
Access to the position array. 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... | |
std::string | getResidueName (const unsigned &resnum, const std::string &chain) const |
get the name of the resnum'th residue of chain Chain=="*" matches any chain and makes it equivalent to getResidueName More... | |
unsigned | getResidueNumber (AtomNumber a) const |
return the residue number for a specific atom 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... | |
bool | hasFlag (const std::string &fname) const |
Does the PDB have this flag. More... | |
void | print (const double &lunits, GenericMolInfo *mymoldat, OFile &ofile, const std::string &fmt) |
Print out a PDB object. More... | |
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... | |
void | setArgumentNames (const std::vector< std::string > &argument_names) |
Set the argument names that you would like to use. More... | |
void | setArgumentValue (const std::string &argname, const double &val) |
This is used in PLMD::analysis::AnalysisWithDataCollection to set the argument values. More... | |
void | setAtomNumbers (const std::vector< AtomNumber > &atoms) |
This is used in PLMD::analysis::AnalysisWithDataCollection to add the numbers of the atoms. More... | |
void | setAtomPositions (const std::vector< Vector > &pos) |
This is used in PLMD::analysis::AnalysisWithDataCollection to set the atom positions. More... | |
void | setPositions (const std::vector< Vector > &v) |
Set the position array. More... | |
unsigned | size () const |
Returns the number of atoms. More... | |
Private Attributes | |
std::map< std::string, double > | arg_data |
std::vector< std::string > | argnames |
std::vector< std::string > | atomsymb |
std::vector< double > | beta |
std::vector< unsigned > | block_ends |
Tensor | Box |
Vector | BoxABG |
Vector | BoxXYZ |
std::vector< std::string > | chain |
std::vector< std::string > | flags |
std::string | mtype |
std::map< AtomNumber, unsigned > | number2index |
std::vector< AtomNumber > | numbers |
std::vector< double > | occupancy |
std::vector< Vector > | positions |
std::vector< unsigned > | residue |
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).
void PLMD::PDB::addBlockEnd | ( | const unsigned & | end | ) |
Check if the properties that are required are in this pdb this is used in PLMD::mapping::Mapping.
This is used in PLMD::analysis::AnalysisWithDataCollection to add the sizes of the domains for PLMD::MultiRMSD
void PLMD::PDB::addRemark | ( | std::vector< std::string > & | v1 | ) |
Add data to argnames map.
bool PLMD::PDB::checkForAtom | ( | AtomNumber | a | ) | const |
Check if specific atom exists.
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.
std::vector< std::string > PLMD::PDB::getArgumentNames | ( | ) | const |
bool PLMD::PDB::getArgumentValue | ( | const std::string & | name, |
double & | value | ||
) | const |
Get the value of one of the arguments in the PDB file.
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.
std::vector< AtomNumber > PLMD::PDB::getAtomsInChain | ( | const std::string & | chainid | ) | const |
Access to the atoms of a chain.
std::vector< AtomNumber > PLMD::PDB::getAtomsInResidue | ( | const unsigned & | resnum, |
const std::string & | chainid | ||
) | const |
Access to the atoms of a residue.
const std::vector< double > & PLMD::PDB::getBeta | ( | ) | const |
Access to the beta array.
const Vector & PLMD::PDB::getBoxAng | ( | ) | const |
Returns box axis angles.
const Vector & PLMD::PDB::getBoxAxs | ( | ) | const |
Returns box axis lengths.
const Tensor & PLMD::PDB::getBoxVec | ( | ) | const |
Returns box axis vectors.
std::string PLMD::PDB::getChainID | ( | AtomNumber | a | ) | const |
Get the chain ID from atom number.
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.
std::string PLMD::PDB::getMtype | ( | ) | const |
Get the metric type.
AtomNumber PLMD::PDB::getNamedAtomFromResidue | ( | const std::string & | aname, |
const unsigned & | resnum | ||
) | const |
Return the atom named aname from residue number resnum.
AtomNumber PLMD::PDB::getNamedAtomFromResidueAndChain | ( | const std::string & | aname, |
const unsigned & | resnum, | ||
const std::string & | chain | ||
) | const |
Return the atom named aname from residue number resnum and chain.
Chain=="*" matches any chain and makes it equivalent to getNamedAtomFromResidue.
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.
Vector PLMD::PDB::getPosition | ( | AtomNumber | a | ) | const |
Access to the position array.
const std::vector< Vector > & PLMD::PDB::getPositions | ( | ) | const |
Access to the position array.
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
std::string PLMD::PDB::getResidueName | ( | const unsigned & | resnum, |
const std::string & | chain | ||
) | const |
get the name of the resnum'th residue of chain Chain=="*" matches any chain and makes it equivalent to getResidueName
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::hasFlag | ( | const std::string & | fname | ) | const |
Does the PDB have this flag.
void PLMD::PDB::print | ( | const double & | lunits, |
GenericMolInfo * | mymoldat, | ||
OFile & | ofile, | ||
const std::string & | fmt | ||
) |
Print out a PDB object.
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::setArgumentNames | ( | const std::vector< std::string > & | argument_names | ) |
Set the argument names that you would like to use.
void PLMD::PDB::setArgumentValue | ( | const std::string & | argname, |
const double & | val | ||
) |
This is used in PLMD::analysis::AnalysisWithDataCollection to set the argument values.
void PLMD::PDB::setAtomNumbers | ( | const std::vector< AtomNumber > & | atoms | ) |
This is used in PLMD::analysis::AnalysisWithDataCollection to add the numbers of the atoms.
void PLMD::PDB::setAtomPositions | ( | const std::vector< Vector > & | pos | ) |
This is used in PLMD::analysis::AnalysisWithDataCollection to set the atom positions.
void PLMD::PDB::setPositions | ( | const std::vector< Vector > & | v | ) |
Set the position array.
unsigned PLMD::PDB::size | ( | ) | const |
Returns the number of atoms.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Hosted by GitHub | 1.8.17 |