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... | |
| void | addRemark (const std::vector< std::string > &v1) | 
| Add information to the remark.  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... | |
| 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... | |
| 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... | |
| 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... | |
| std::vector< AtomNumber > | getAtomsInResidue (const unsigned &resnum, const std::string &chainid) const | 
| Access to the atoms of a residue.  More... | |
| std::vector< AtomNumber > | getAtomsInChain (const std::string &chainid) const | 
| Access to the atoms of a chain.  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... | |
| void | setPositions (const std::vector< Vector > &v) | 
| Set the position array.  More... | |
| Vector | getPosition (AtomNumber a) const | 
| Access to the position array.  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).
| void PLMD::PDB::addRemark | ( | const std::vector< std::string > & | v1 | ) | 
Add information to the remark.
| 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.
| 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.
| 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.
| 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.
| 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
| 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::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.
| 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 | 
 
Hosted by GitHub  
 
 
 | 
 
 1.8.14
 |