#include <pdb_file_parser.hpp>
Public Types | |
typedef TypeSystem | type_system |
typedef type_system::element_dictionary | element_dictionary |
typedef type_system::atom_dictionary | atom_dictionary |
typedef type_system::monomer_dictionary | monomer_dictionary |
typedef element_dictionary::id_type | element_id_type |
typedef atom_dictionary::id_type | atom_id_type |
typedef monomer_dictionary::id_type | monomer_id_type |
Public Member Functions | |
PDBFileParser (type_system const &ts=type_system(), bool use_dynamic_types=true) | |
Default Constructor. | |
PDBFileParser (std::string const &filename, int which_model=0, type_system const &ts=type_system(), bool use_dynamic_types=true) | |
Construct a PDBFileParser from a PDB file. | |
PDBFileParser (PDBFileParser const &src) | |
Copy constructor A new file stream is opened, and a seek performed to find the current model. | |
virtual | ~PDBFileParser () |
bool | open (std::string filename, int which_model=0) |
Open a PDB file. | |
void | close () |
Close the current PDB file. | |
std::string const & | get_header () const |
Get the PDB file header. | |
std::string const & | get_filename () const |
Get the file name. | |
template<typename PolymerSystemType> | |
bool | get_model (int which, PolymerSystemType &model_out, bool load_hetatoms=true) |
Get the specified model from the PDB file. | |
template<typename PolymerSystemType> | |
bool | get_current_model (PolymerSystemType &model_out, bool load_hetatoms=true) |
Get the current model from the PDB file. | |
template<typename PolymerSystemType> | |
bool | get_next_model (PolymerSystemType &model_out, bool load_hetatoms=true) |
Get the next model from the PDB file. | |
type_system | dictionary () |
Get the TypeSystem used to parse the current PDB file. | |
type_system const | dictionary () const |
Protected Member Functions | |
std::string | eat_whitespace (std::string const &s) const |
void | open_file () |
void | rewind_file () |
void | save_header () |
bool | find_model (int which) |
bool | find_next_atom (bool find_hetatoms) |
template<typename AtomType> | |
AtomType | parse_atom (std::string const &atom_record, bool is_hetatom=false) |
template<typename PolymerSystemType> | |
void | parse_current_model (PolymerSystemType &model_out, bool load_hetatoms) |
template<typename AtomIterator, typename PolymerSystemType> | |
void | save_hetatoms (AtomIterator het_begin, AtomIterator het_end, PolymerSystemType &model_out) |
typedef TypeSystem type_system |
typedef element_dictionary::id_type element_id_type |
typedef atom_dictionary::id_type atom_id_type |
typedef monomer_dictionary::id_type monomer_id_type |
PDBFileParser | ( | type_system const & | ts = type_system() , |
|
bool | use_dynamic_types = true | |||
) |
Default Constructor.
Does nothing.
PDBFileParser | ( | std::string const & | filename, | |
int | which_model = 0 , |
|||
type_system const & | ts = type_system() , |
|||
bool | use_dynamic_types = true | |||
) |
Construct a PDBFileParser from a PDB file.
filename | The name of the PDB file. | |
which_model | The number of the MODEL to parse (default = first). | |
ts | The TypeSystem to use for identifying molecular types (note: this object is always deep-copied). | |
use_dynamic_types | If true, try to add new types to the TypeSystem as they are identified in the PDB file (this is only possible for dynamic types). |
PDBFileParser | ( | PDBFileParser< TypeSystem > const & | src | ) |
Copy constructor A new file stream is opened, and a seek performed to find the current model.
All other state data is copied.
virtual ~PDBFileParser | ( | ) | [virtual] |
void close | ( | ) |
Close the current PDB file.
std::string const& get_header | ( | ) | const |
Get the PDB file header.
std::string const& get_filename | ( | ) | const |
Get the file name.
Get the specified model from the PDB file.
Get the current model from the PDB file.
Get the next model from the PDB file.
type_system dictionary | ( | ) |
Get the TypeSystem used to parse the current PDB file.
type_system const dictionary | ( | ) | const |
std::string eat_whitespace | ( | std::string const & | s | ) | const [protected] |
void open_file | ( | ) | [protected] |
void rewind_file | ( | ) | [protected] |
void save_header | ( | ) | [protected] |
AtomType parse_atom | ( | std::string const & | atom_record, | |
bool | is_hetatom = false | |||
) | [protected] |
void parse_current_model | ( | PolymerSystemType & | model_out, | |
bool | load_hetatoms | |||
) | [protected] |
void save_hetatoms | ( | AtomIterator | het_begin, | |
AtomIterator | het_end, | |||
PolymerSystemType & | model_out | |||
) | [protected] |