BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
BALL::PDBFile Class Reference

#include <BALL/FORMAT/PDBFile.h>

Inheritance diagram for BALL::PDBFile:
BALL::GenericMolFile BALL::PropertyManager BALL::LineBasedFile BALL::File

Classes

struct  Default
 
struct  Option
 

Public Types

typedef HashMap< PDB::Integer,
PDBAtom * > 
PDBAtomMap
 
typedef Quadruple< String,
PDB::Character, PDB::Integer,
PDB::AChar
ResidueQuadruple
 
typedef HashMap
< ResidueQuadruple, Residue * > 
ResidueMap
 
typedef std::list
< ResidueQuadruple
QuadrupleList
 
typedef std::list
< SecondaryStructure * > 
SecStructList
 

Public Member Functions

virtual bool hasFormat ()
 Check whether the current file is in PDB format. More...
 
Constructurs and destructor.
 PDBFile ()
 
 PDBFile (const String &filename, File::OpenMode open_mode=std::ios::in)
 
 PDBFile (const Options &new_options)
 
virtual ~PDBFile ()
 
Assignment.
virtual void clear (int state)
 Clear the stream state. More...
 
virtual void clear ()
 Clear all members. More...
 
Accessors.
virtual float getVersion () const
 Returns the version number this PDB file reader is able to read. More...
 
void selectModel (Index index)
 
void selectAltLocationIndicator (char c)
 
Index getSelectedModel () const
 Return the model currently selected. More...
 
void selectAllModels ()
 Selects all models for reading. More...
 
Index getCurrentModel () const
 Returns the number of the model weare currently reading. (?????) More...
 
char * getRecordString ()
 Return a mutable pointer to the line buffer. More...
 
const char * getRecordString () const
 Return a constant pointer to the line buffer. More...
 
Index getRecordNumber () const
 Returns the number of the record we are currently reading. More...
 
PDB::RecordType getRecordType () const
 Returns the type of the record we are currently reading. More...
 
virtual const char * getAtomElementSymbol (const PDB::Atom atom_name, PDB::Atom element_symbol)
 
virtual const char * getAtomName (const PDB::Atom atom_name)
 Returns the atom name. More...
 
virtual char getAtomRemotenessIndicator (const PDB::Atom atom_name)
 Extract the PDB remoteness indicator of an atom record. More...
 
virtual short getAtomBranchDesignator (const PDB::Atom atom_name)
 Extract the PDB branch designator of an atom record. More...
 
Size countRecordFields () const
 Returns the number of record fields. More...
 
Size countRecord (PDB::RecordType record_type, bool from_begin_of_file=true)
 
Size countRecords (bool from_begin_of_file=true)
 
Methods for parsing individual records.

These methods are typically required if you want to implement your own PDB parser (derived from PDBFile or PDBFile).

bool parseLine (const char *line, Size size, const char *format_string,...)
 Parse a line from a PDBFile. This is a helper function for readLine(). More...
 
bool readLine (char *line, Size size, bool extract_values)
 Read and parse a line from a PDB file. More...
 
bool readFirstRecord (bool read_values=true)
 Read the firts record of a file. More...
 
bool readNextRecord (bool read_values=true)
 Read the next record of a PDB file. More...
 
bool readRecords ()
 
virtual bool readUnknownRecord (const char *line)
 
virtual bool readInvalidRecord (const char *line)
 
bool skipCurrentRecord ()
 
virtual bool interpretRecord (const PDB::RecordANISOU &record)
 Reads an anisotropic temperature factor record. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordANISOU &record)
 
virtual bool parseRecordANISOU (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordATOM &record)
 Reads an atom record. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordATOM &record)
 
virtual bool parseRecordATOM (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordAUTHOR &record)
 Reads an author record. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordAUTHOR &record)
 
virtual bool parseRecordAUTHOR (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordCAVEAT &record)
 Reads a caveat record. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordCAVEAT &record)
 
virtual bool parseRecordCAVEAT (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordCISPEP &record)
 Reads a record specifying peptides in cis conformation. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordCISPEP &record)
 
virtual bool parseRecordCISPEP (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordCOMPND &record)
 Reads the title record containing macroscopic compoubd information. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordCOMPND &record)
 
virtual bool parseRecordCOMPND (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordCONECT &record)
 Reads a connection record. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordCONECT &record)
 
virtual bool parseRecordCONECT (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordCRYST1 &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordCRYST1 &record)
 
virtual bool parseRecordCRYST1 (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordDBREF &record)
 Reads a record containing database cross-reference links. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordDBREF &record)
 
virtual bool parseRecordDBREF (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordEND &record)
 Reads the record defining the end of a PDB file. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordEND &record)
 
virtual bool parseRecordEND (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordENDMDL &record)
 Reads a model ending record. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordENDMDL &record)
 
virtual bool parseRecordENDMDL (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordEXPDTA &record)
 Reads a record containing data about the experiment. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordEXPDTA &record)
 
virtual bool parseRecordEXPDTA (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordFORMUL &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordFORMUL &record)
 
virtual bool parseRecordFORMUL (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordFTNOTE &record)
 Reads a record containing a footnote. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordFTNOTE &record)
 
virtual bool parseRecordFTNOTE (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordHEADER &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordHEADER &record)
 
virtual bool parseRecordHEADER (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordHELIX &record)
 Reads a helix defining record. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordHELIX &record)
 
virtual bool parseRecordHELIX (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordHET &record)
 Reads a record defining a non-standard residue. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordHET &record)
 
virtual bool parseRecordHET (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordHETATM &record)
 Reads atomic coordinates for atoms in non-standard groups. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordHETATM &record)
 
virtual bool parseRecordHETATM (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordHETNAM &record)
 Reads a record defining the name of a non-standard group. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordHETNAM &record)
 
virtual bool parseRecordHETNAM (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordHETSYN &record)
 Reads a record defining synonyms of a non-standard group. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordHETSYN &record)
 
virtual bool parseRecordHETSYN (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordHYDBND &record)
 Reads a record defining a hydrogen bond. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordHYDBND &record)
 
virtual bool parseRecordHYDBND (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordJRNL &record)
 Reads a record containing a journal reference. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordJRNL &record)
 
virtual bool parseRecordJRNL (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordKEYWDS &record)
 Reads a record containing keywords for this entry. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordKEYWDS &record)
 
virtual bool parseRecordKEYWDS (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordLINK &record)
 Reads a record containing supplemental connectivity information. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordLINK &record)
 
virtual bool parseRecordLINK (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordMASTER &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordMASTER &record)
 
virtual bool parseRecordMASTER (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordMODEL &record)
 Reads a record indicating the beginning of a new model. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordMODEL &record)
 
virtual bool parseRecordMODEL (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordMODRES &record)
 Reads a record identifying residue modifications. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordMODRES &record)
 
virtual bool parseRecordMODRES (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordMTRIX1 &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordMTRIX1 &record)
 
virtual bool parseRecordMTRIX1 (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordMTRIX2 &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordMTRIX2 &record)
 
virtual bool parseRecordMTRIX2 (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordMTRIX3 &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordMTRIX3 &record)
 
virtual bool parseRecordMTRIX3 (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordOBSLTE &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordOBSLTE &record)
 
virtual bool parseRecordOBSLTE (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordORIGX1 &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordORIGX1 &record)
 
virtual bool parseRecordORIGX1 (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordORIGX2 &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordORIGX2 &record)
 
virtual bool parseRecordORIGX2 (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordORIGX3 &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordORIGX3 &record)
 
virtual bool parseRecordORIGX3 (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordREMARK &record)
 Reads a record containing remarks. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordREMARK &record)
 
virtual bool parseRecordREMARK (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordREVDAT &record)
 Reads a record containing a revision history. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordREVDAT &record)
 
virtual bool parseRecordREVDAT (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordSCALE1 &record)
 Reads a scale transformation record. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordSCALE1 &record)
 
virtual bool parseRecordSCALE1 (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordSCALE2 &record)
 Reads a scale transformation record. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordSCALE2 &record)
 
virtual bool parseRecordSCALE2 (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordSCALE3 &record)
 Reads a scale transformation record. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordSCALE3 &record)
 
virtual bool parseRecordSCALE3 (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordSEQADV &record)
 Sequence information conflicts between atom records and dbref content. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordSEQADV &record)
 
virtual bool parseRecordSEQADV (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordSEQRES &record)
 Reads a record containing the sequence of residues. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordSEQRES &record)
 
virtual bool parseRecordSEQRES (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordSHEET &record)
 Reads a record defining a beta-sheet. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordSHEET &record)
 
virtual bool parseRecordSHEET (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordSIGATM &record)
 Reads a record giving the standard deviation of atomic coordinates. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordSIGATM &record)
 
virtual bool parseRecordSIGATM (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordSIGUIJ &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordSIGUIJ &record)
 
virtual bool parseRecordSIGUIJ (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordSITE &record)
 Reads a record containing groups comprising a site. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordSITE &record)
 
virtual bool parseRecordSITE (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordSLTBRG &record)
 Reads a record defining a salt bridge. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordSLTBRG &record)
 
virtual bool parseRecordSLTBRG (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordSOURCE &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordSOURCE &record)
 
virtual bool parseRecordSOURCE (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordSPRSDE &record)
 List of entries this file supersedes. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordSPRSDE &record)
 
virtual bool parseRecordSPRSDE (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordSSBOND &record)
 Reads a record specifying a disulfide bond. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordSSBOND &record)
 
virtual bool parseRecordSSBOND (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordTER &record)
 Reads a record terminating molecule. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordTER &record)
 
virtual bool parseRecordTER (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordTITLE &record)
 Reads a record specifying the title of the experiment or anaysis. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordTITLE &record)
 
virtual bool parseRecordTITLE (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordTURN &record)
 Reads a record specifying a turn. More...
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordTURN &record)
 
virtual bool parseRecordTURN (const char *line, Size size)
 
virtual bool interpretRecord (const PDB::RecordTVECT &record)
 
virtual bool fillRecord (const char *line, Size size, PDB::RecordTVECT &record)
 
virtual bool parseRecordTVECT (const char *line, Size size)
 
Reading and writing
PDBFileoperator>> (Protein &protein)
 
PDBFileoperator>> (Molecule &molecule)
 
PDBFileoperator>> (System &system)
 
PDBFileoperator<< (const Protein &protein)
 
PDBFileoperator<< (const System &system)
 
PDBFileoperator<< (const Molecule &molecule)
 
bool read (Protein &protein)
 
bool read (Molecule &protein)
 
bool read (System &system)
 
Moleculeread ()
 
bool write (const Protein &protein)
 
bool write (const Molecule &molecule)
 
bool write (const System &system)
 
bool write (const System &system, const PDBInfo &info)
 
- Public Member Functions inherited from BALL::GenericMolFile
 GenericMolFile ()
 
 GenericMolFile (const String &filename, File::OpenMode open_mode=std::ios::in)
 
virtual ~GenericMolFile ()
 
const GenericMolFileoperator= (const GenericMolFile &rhs)
 
- Public Member Functions inherited from BALL::LineBasedFile
 LineBasedFile ()
 Default constructor. More...
 
 LineBasedFile (const String &filename, File::OpenMode open_mode=std::ios::in, bool trim_whitespaces=false)
 
bool operator== (const LineBasedFile &f)
 
bool operator!= (const LineBasedFile &f)
 
const LineBasedFileoperator= (const LineBasedFile &file)
 
Position getLineNumber () const
 Get the last line number in the file. More...
 
const StringgetLine () const
 Return the current line. More...
 
StringgetLine ()
 Return the current line. More...
 
bool readLine ()
 
bool skipLines (Size number=1)
 
bool search (const String &text, bool return_to_start=false)
 
bool search (const String &text, const String &stop, bool return_to_start=false)
 
bool gotoLine (Position line_number)
 
void rewind ()
 
void test (const char *file, int line, bool condition, const String &msg) const
 
String getField (Index pos=0, const String &quotes="", const String &delimiters=String::CHARACTER_CLASS__WHITESPACE) const
 
bool startsWith (const String &text) const
 Test if the current line starts with text. More...
 
bool has (const String &text) const
 Return true if the current line contains text. More...
 
Index switchString (const std::vector< String > &data) const
 
bool parseColumnFormat (const char *format, Position index, Size length, void *arg)
 
void enableTrimWhitespaces (bool state)
 Set wheter leading and trailing whitespaces in lines shall be removed. More...
 
bool trimWhiteSpacesEnabled () const
 
- Public Member Functions inherited from BALL::File
 File ()
 
 File (const String &name, OpenMode open_mode=std::ios::in)
 
virtual ~File ()
 
bool isValid () const
 
bool open (const String &name, File::OpenMode open_mode=std::ios::in)
 
bool reopen ()
 
bool reopen (File::OpenMode open_mode)
 
void close ()
 
const StringgetName () const
 
void setName (const String &name)
 
const StringgetOriginalName () const
 
Size getSize ()
 
File::OpenMode getOpenMode () const
 
Type getType (bool trace_link) const
 
bool copyTo (const String &destination_name, Size buffer_size=4096)
 
bool moveTo (const String &destination_name)
 
bool remove ()
 
bool renameTo (const String &new_path)
 
bool truncate (Size size=0)
 
std::fstream & getFileStream ()
 
TransformationManagergetTransformationManager ()
 
const TransformationManagergetTransformationManager () const
 
bool operator== (const File &file) const
 
bool operator!= (const File &file) const
 
bool isOpen () const
 
bool isClosed () const
 
bool isAccessible () const
 
bool isCanonized () const
 
bool isReadable () const
 
bool isWritable () const
 
bool isExecutable () const
 
- Public Member Functions inherited from BALL::PropertyManager
BALL_INLINE PropertyManager ()
 Default constructor. More...
 
BALL_INLINE PropertyManager (const PropertyManager &property_manager)
 Copy constructor. More...
 
virtual ~PropertyManager ()
 Destructor. More...
 
virtual void destroy ()
 Clears all properties. More...
 
void set (const PropertyManager &property_manager)
 
const PropertyManageroperator= (const PropertyManager &property_manager)
 
void get (PropertyManager &property_manager) const
 
void swap (PropertyManager &property_manager)
 
BitVectorgetBitVector ()
 
const BitVectorgetBitVector () const
 
 operator BitVector & ()
 
void setProperty (Property property)
 
void clearProperty (Property property)
 
void toggleProperty (Property property)
 
Size countProperties () const
 
const NamedPropertygetNamedProperty (Position index) const
 
NamedPropertygetNamedProperty (Position index)
 
void setProperty (const NamedProperty &property)
 
void setProperty (const string &name)
 
void setProperty (const string &name, bool value)
 
void setProperty (const string &name, int value)
 
void setProperty (const string &name, unsigned int value)
 
void setProperty (const string &name, float value)
 
void setProperty (const string &name, double value)
 
void setProperty (const string &name, const string &value)
 
void setProperty (const string &name, const PersistentObject &value)
 
const NamedPropertygetProperty (const string &name) const
 
NamedPropertyIterator beginNamedProperty ()
 
NamedPropertyIterator endNamedProperty ()
 
void clearProperty (const string &name)
 
Size countNamedProperties () const
 
bool hasProperty (Property property) const
 Query for an unnamed property. More...
 
bool hasProperty (const string &name) const
 Query for a named property. More...
 
bool operator== (const PropertyManager &pm) const
 
bool operator!= (const PropertyManager &pm) const
 Inequality operator. More...
 
void write (PersistenceManager &pm) const
 Persistent stream writing. More...
 
bool read (PersistenceManager &pm)
 Persistent stream reading. More...
 
bool isValid () const
 
void dump (std::ostream &s=std::cout, Size depth=0) const
 

Public Attributes

Options
Options options
 The options for parsing the file. More...
 
PDBInfo info
 Summary information on the last file read. More...
 

Protected Member Functions

 PDBFile (const File &pdbf)
 
PDBFileoperator= (const PDBFile &pdbf)
 
void init_ ()
 
void postprocessSSBonds_ ()
 
void postprocessHelices_ ()
 
void postprocessSheetsTurns_ (QuadrupleList &sectruct_list, SecStructList &new_secstruct_list)
 
void postprocessRandomCoils_ ()
 
void write_ (const AtomContainer &ac, const PDBInfo &info=PDBInfo())
 
void writeRecord_ (PDB::RecordType record,...)
 
void writeCONECTRecords_ (PDB::Structure::ConectAtomList &cl)
 
void writeRawRecord_ (const char *format, const char *tag,...)
 
void addAllRecords_ (const PDBInfo &info, PDB::RecordType type)
 Add all records of a specific type in the info object to the current stream. More...
 
void writeRecord_ (const PDB::RecordSEQRES &seqres)
 
void writeRecord_ (const PDB::RecordHELIX &helix)
 
void writeRecord_ (const PDB::RecordSHEET &helix)
 
void writeRecord_ (const PDB::RecordTURN &helix)
 
void writeRecord_ (const PDB::RecordSSBOND &helix)
 
void writeRecord_ (const PDB::RecordCONECT &helix)
 
void writeRecord_ (const PDB::RecordCRYST1 &cryst1)
 
void writeRecord_ (const PDB::RecordMTRIX1 &mtrix1)
 
void writeRecord_ (const PDB::RecordMTRIX2 &mtrix2)
 
void writeRecord_ (const PDB::RecordMTRIX3 &mtrix3)
 
void writeAtom_ (const PDB::Structure::AtomEntry &atom, PDB::AdditionalAtomInfo &cr, bool hetatm=false)
 
void writeTitleSection_ (const PDB::Structure &structure, const PDBInfo &info)
 
void writePrimaryStructureSection_ (const PDB::Structure &structure, const PDBInfo &info)
 
void writeHeterogenSection_ (const PDB::Structure &structure, const PDBInfo &info)
 
void writeSecondaryStructureSection_ (const PDB::Structure &structure, const PDBInfo &info)
 
void writeConnectivityAnnotationSection_ (const PDB::Structure &structure, const PDBInfo &info)
 
void writeMiscellaneousFeaturesSection_ (const PDB::Structure &structure, const PDBInfo &info)
 
void writeCrystallographicSection_ (const PDB::Structure &structure, const PDBInfo &info)
 
void writeCoordinateSection_ (const PDB::Structure &structure, const PDBInfo &info)
 
void writeConnectivitySection_ (const PDB::Structure &structure, const PDBInfo &info)
 
void writeBookKeepingSection_ (const PDB::Structure &structure, const PDBInfo &info)
 
void writeSEQRESSection_ (const std::vector< std::pair< char, String > > &chain_residues)
 
void writeHELIXSection_ (const PDB::Structure &structure)
 
void writeSHEETSection_ (const PDB::Structure &structure)
 
void writeTURNSection_ (const PDB::Structure &structure)
 
void writeSSBONDSection_ (const PDB::Structure &structure)
 
void writeHYDBNDSection_ (const PDB::Structure &structure)
 
void writeSLTBRGSection_ (const PDB::Structure &structure)
 
void writeCRYST1Section_ (const PDB::Structure &structure)
 
void writeMTRIXnSection_ (const PDB::Structure &structure)
 
- Protected Member Functions inherited from BALL::GenericMolFile
virtual void initRead_ ()
 
virtual void initWrite_ ()
 

Static Protected Member Functions

static void extractStructure_ (const AtomContainer &ac, PDB::Structure &structure)
 
static bool isHeteroAtom_ (const Atom &atom)
 
static void updateAdditionalAtomInfo_ (const PDB::Structure::AtomEntry &atom, PDB::AdditionalAtomInfo &cr)
 

Protected Attributes

char line_buffer_ [PDB::SIZE_OF_PDB_LINE_BUFFER]
 
String residue_name_
 
Index residue_sequence_number_
 
Index current_model_
 
Index current_record_
 
Size record_fields_
 
PDB::RecordType current_record_type_
 
PDB::RecordTypeFormat compare_record_type_format_
 
PDBAtomMap PDB_atom_map_
 
ResidueMap residue_map_
 
QuadrupleList ssbond_list_
 
QuadrupleList helix_list_
 
QuadrupleList sheet_list_
 
QuadrupleList turn_list_
 
SecStructList new_helix_secstruc_list_
 
SecStructList new_sheet_secstruc_list_
 
SecStructList new_turn_secstruc_list_
 
char alternate_location_indicator_
 
PDB::AChar insertion_code_
 
PDB::Character chain_ID_
 
PDB::Integer sequence_number_
 
PDB::AChar code_
 
Proteincurrent_protein_
 
const Proteincurrent_const_protein_
 
Chaincurrent_chain_
 
const Chaincurrent_const_chain_
 
Residuecurrent_residue_
 
const Residuecurrent_const_residue_
 
PDBAtomcurrent_PDB_atom_
 
const Atomcurrent_const_atom_
 
String name_
 
HashMap< const Atom *, Positionatom_map_
 
PDB::BookKeeping book_keeping_
 Book keeping struct for the number of records written. More...
 
int verbosity_
 _Verbosity level More...
 
bool strict_line_checking_
 
Index selected_model_
 The selected model_. More...
 
bool store_skipped_records_
 Store the skipped records in info? More...
 
bool ignore_xplor_pseudo_atoms_
 Ignore XPLOR pseudo atoms? More...
 
bool parse_partial_charges_
 Read partial charges from cols 76-80? More...
 
bool write_pdbformat_1996_
 write in the 1996-format? More...
 

Additional Inherited Members

- Static Public Member Functions inherited from BALL::File
static Size getSize (String name)
 
static Type getType (String name, bool trace_link)
 
static bool copy (String source_name, String destination_name, Size buffer_size=4096)
 
static bool move (const String &source_name, const String &destination_name)
 
static bool remove (String name)
 
static bool rename (String old_path, String new_path)
 
static bool truncate (String path, Size size=0)
 
static bool createTemporaryFilename (String &temporary, const String &suffix=".TMP")
 
static void enableTransformation (Transformation transformation)
 
static void disableTransformation (Transformation transformation)
 
static bool isTransformationEnabled (Transformation transformation)
 
static void registerTransformation (const String &pattern, const String &exec)
 
static void unregisterTransformation (const String &pattern)
 
static bool isAccessible (String name)
 
static bool isReadable (String name)
 
static bool isWritable (String name)
 
static bool isExecutable (String name)
 
- Static Public Attributes inherited from BALL::File
static const OpenMode MODE_IN
 Open for input (default) More...
 
static const OpenMode MODE_OUT
 Open for output. More...
 
static const OpenMode MODE_APP
 Append. Seek to end before each write operation. More...
 
static const OpenMode MODE_BINARY
 Binary mode. More...
 
static const OpenMode MODE_ATE
 Seek to end directly after opening. More...
 
static const OpenMode MODE_TRUNC
 Truncate an existing file. More...
 
static const String TRANSFORMATION_EXEC_PREFIX
 Prefix for filenames that are created through the execution of commands "exec:". More...
 
static const String TRANSFORMATION_FILE_PREFIX
 Prefix for files (to mimick URL-like behavior) "file:". More...
 
static const String TRANSFORMATION_FTP_PREFIX
 Prefix for FTP-transfers "ftp://". More...
 
static const String TRANSFORMATION_HTTP_PREFIX
 Prefix for HTTP-transfer "http://". More...
 
- Static Protected Attributes inherited from BALL::File
static HashSet< Stringcreated_temp_filenames_
 
static TransformationManager transformation_manager_
 
static Size transformation_methods_
 

Detailed Description

PDB file class.

Definition at line 74 of file PDBFile.h.

Member Typedef Documentation

Definition at line 651 of file PDBFile.h.

Definition at line 654 of file PDBFile.h.

Definition at line 653 of file PDBFile.h.

Definition at line 652 of file PDBFile.h.

Definition at line 655 of file PDBFile.h.

Constructor & Destructor Documentation

BALL::PDBFile::PDBFile ( )

Default constructor

BALL::PDBFile::PDBFile ( const String filename,
File::OpenMode  open_mode = std::ios::in 
)

File-like constructor

Exceptions
Exception::FileNotFoundif the file could not be opened
BALL::PDBFile::PDBFile ( const Options new_options)

Construct with options.

virtual BALL::PDBFile::~PDBFile ( )
virtual

Destructor

BALL::PDBFile::PDBFile ( const File pdbf)
protected

Member Function Documentation

void BALL::PDBFile::addAllRecords_ ( const PDBInfo info,
PDB::RecordType  type 
)
protected

Add all records of a specific type in the info object to the current stream.

virtual void BALL::PDBFile::clear ( int  state)
virtual

Clear the stream state.

virtual void BALL::PDBFile::clear ( )
virtual

Clear all members.

Reimplemented from BALL::PropertyManager.

Size BALL::PDBFile::countRecord ( PDB::RecordType  record_type,
bool  from_begin_of_file = true 
)

Returns the number of records of type record_type in the file being read.

Size BALL::PDBFile::countRecordFields ( ) const

Returns the number of record fields.

Size BALL::PDBFile::countRecords ( bool  from_begin_of_file = true)

Returns the number of all records in the file.

static void BALL::PDBFile::extractStructure_ ( const AtomContainer ac,
PDB::Structure structure 
)
staticprotected

Extract the atom and bond information from an atom container prior to writing a PDB file. This method is called by write_.

virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordANISOU record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordATOM record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordAUTHOR record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordCAVEAT record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordCISPEP record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordCOMPND record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordCONECT record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordCRYST1 record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordDBREF record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordEND record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordENDMDL record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordEXPDTA record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordFORMUL record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordFTNOTE record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordHEADER record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordHELIX record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordHET record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordHETATM record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordHETNAM record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordHETSYN record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordHYDBND record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordJRNL record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordKEYWDS record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordLINK record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordMASTER record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordMODEL record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordMODRES record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordMTRIX1 record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordMTRIX2 record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordMTRIX3 record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordOBSLTE record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordORIGX1 record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordORIGX2 record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordORIGX3 record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordREMARK record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordREVDAT record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordSCALE1 record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordSCALE2 record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordSCALE3 record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordSEQADV record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordSEQRES record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordSHEET record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordSIGATM record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordSIGUIJ record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordSITE record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordSLTBRG record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordSOURCE record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordSPRSDE record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordSSBOND record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordTER record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordTITLE record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordTURN record 
)
virtual
virtual bool BALL::PDBFile::fillRecord ( const char *  line,
Size  size,
PDB::RecordTVECT record 
)
virtual
virtual short BALL::PDBFile::getAtomBranchDesignator ( const PDB::Atom  atom_name)
virtual

Extract the PDB branch designator of an atom record.

virtual const char* BALL::PDBFile::getAtomElementSymbol ( const PDB::Atom  atom_name,
PDB::Atom  element_symbol 
)
virtual

Returns the element symbol of an atom. If element_symbol is invalid we try to reconstruct the element symbol from the atom name.

virtual const char* BALL::PDBFile::getAtomName ( const PDB::Atom  atom_name)
virtual

Returns the atom name.

virtual char BALL::PDBFile::getAtomRemotenessIndicator ( const PDB::Atom  atom_name)
virtual

Extract the PDB remoteness indicator of an atom record.

Index BALL::PDBFile::getCurrentModel ( ) const

Returns the number of the model weare currently reading. (?????)

Index BALL::PDBFile::getRecordNumber ( ) const

Returns the number of the record we are currently reading.

char* BALL::PDBFile::getRecordString ( )

Return a mutable pointer to the line buffer.

const char* BALL::PDBFile::getRecordString ( ) const

Return a constant pointer to the line buffer.

PDB::RecordType BALL::PDBFile::getRecordType ( ) const

Returns the type of the record we are currently reading.

Index BALL::PDBFile::getSelectedModel ( ) const

Return the model currently selected.

virtual float BALL::PDBFile::getVersion ( ) const
virtual

Returns the version number this PDB file reader is able to read.

virtual bool BALL::PDBFile::hasFormat ( )
virtual

Check whether the current file is in PDB format.

void BALL::PDBFile::init_ ( )
protected
virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordANISOU record)
virtual

Reads an anisotropic temperature factor record.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordATOM record)
virtual

Reads an atom record.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordAUTHOR record)
virtual

Reads an author record.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordCAVEAT record)
virtual

Reads a caveat record.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordCISPEP record)
virtual

Reads a record specifying peptides in cis conformation.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordCOMPND record)
virtual

Reads the title record containing macroscopic compoubd information.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordCONECT record)
virtual

Reads a connection record.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordCRYST1 record)
virtual

Reads the record specifying the unit cell parameters, space group, and Z value for crystographically determined structures.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordDBREF record)
virtual

Reads a record containing database cross-reference links.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordEND record)
virtual

Reads the record defining the end of a PDB file.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordENDMDL record)
virtual

Reads a model ending record.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordEXPDTA record)
virtual

Reads a record containing data about the experiment.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordFORMUL record)
virtual

Reads a record containing the chemical formula of a non-standard group.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordFTNOTE record)
virtual

Reads a record containing a footnote.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordHEADER record)
virtual

Reads the header recors which contains the idCode field, entry classification and deposition date.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordHELIX record)
virtual

Reads a helix defining record.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordHET record)
virtual

Reads a record defining a non-standard residue.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordHETATM record)
virtual

Reads atomic coordinates for atoms in non-standard groups.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordHETNAM record)
virtual

Reads a record defining the name of a non-standard group.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordHETSYN record)
virtual

Reads a record defining synonyms of a non-standard group.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordHYDBND record)
virtual

Reads a record defining a hydrogen bond.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordJRNL record)
virtual

Reads a record containing a journal reference.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordKEYWDS record)
virtual

Reads a record containing keywords for this entry.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordLINK record)
virtual

Reads a record containing supplemental connectivity information.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordMASTER record)
virtual

Reads the master record containing numerous counts for bookkeeping purposes.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordMODEL record)
virtual

Reads a record indicating the beginning of a new model.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordMODRES record)
virtual

Reads a record identifying residue modifications.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordMTRIX1 record)
virtual

Reads a record defining transformations expressing non-crystallographic symmetry.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordMTRIX2 record)
virtual

Reads a record defining transformations expressing non-crystallographic symmetry.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordMTRIX3 record)
virtual

Reads a record defining transformations expressing non-crystallographic symmetry.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordOBSLTE record)
virtual

Reads a record indicating that this structura has been withdrawnform the database.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordORIGX1 record)
virtual

Reads a record defining the transformation from the orthogonal coordinates contained in the entry to the submitted coordinates.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordORIGX2 record)
virtual

Reads a record defining the transformation from the orthogonal coordinates contained in the entry to the submitted coordinates.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordORIGX3 record)
virtual

Reads a record defining the transformation from the orthogonal coordinates contained in the entry to the submitted coordinates.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordREMARK record)
virtual

Reads a record containing remarks.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordREVDAT record)
virtual

Reads a record containing a revision history.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordSCALE1 record)
virtual

Reads a scale transformation record.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordSCALE2 record)
virtual

Reads a scale transformation record.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordSCALE3 record)
virtual

Reads a scale transformation record.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordSEQADV record)
virtual

Sequence information conflicts between atom records and dbref content.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordSEQRES record)
virtual

Reads a record containing the sequence of residues.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordSHEET record)
virtual

Reads a record defining a beta-sheet.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordSIGATM record)
virtual

Reads a record giving the standard deviation of atomic coordinates.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordSIGUIJ record)
virtual

Reads a record giving the standard deviation of anisotropic temperature factors.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordSITE record)
virtual

Reads a record containing groups comprising a site.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordSLTBRG record)
virtual

Reads a record defining a salt bridge.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordSOURCE record)
virtual

Reads a record specifies the chemical/biological source of each molecule in the entry.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordSPRSDE record)
virtual

List of entries this file supersedes.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordSSBOND record)
virtual

Reads a record specifying a disulfide bond.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordTER record)
virtual

Reads a record terminating molecule.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordTITLE record)
virtual

Reads a record specifying the title of the experiment or anaysis.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordTURN record)
virtual

Reads a record specifying a turn.

virtual bool BALL::PDBFile::interpretRecord ( const PDB::RecordTVECT record)
virtual

Reads a record specifying the translation vector for infinite covalently connected structures.

static bool BALL::PDBFile::isHeteroAtom_ ( const Atom atom)
staticprotected

Determine whether an atom is a hetero atom or part of a standard amino acid or nucleotide. This test is performed by checking for the corresponding properties defined in Residue.

PDBFile& BALL::PDBFile::operator<< ( const Protein protein)

Write a protein to the file

Exceptions
File::CannotWriteif writing to the file failed
PDBFile& BALL::PDBFile::operator<< ( const System system)
virtual

Write a system to the file

Exceptions
File::CannotWriteif writing to the file failed

Reimplemented from BALL::GenericMolFile.

PDBFile& BALL::PDBFile::operator<< ( const Molecule molecule)
virtual

Write molecule to the file

Exceptions
File::CannotWriteif writing to the file failed

Reimplemented from BALL::GenericMolFile.

PDBFile& BALL::PDBFile::operator= ( const PDBFile pdbf)
protected
PDBFile& BALL::PDBFile::operator>> ( Protein protein)

Read a protein from the file

Exceptions
Exception::ParseErrorif a syntax error was encountered
PDBFile& BALL::PDBFile::operator>> ( Molecule molecule)
virtual

Read a molecule from the file

Exceptions
Exception::ParseErrorif a syntax error was encountered

Reimplemented from BALL::GenericMolFile.

PDBFile& BALL::PDBFile::operator>> ( System system)
virtual

Read system from the file

Exceptions
Exception::ParseErrorif a syntax error was encountered

Reimplemented from BALL::GenericMolFile.

bool BALL::PDBFile::parseLine ( const char *  line,
Size  size,
const char *  format_string,
  ... 
)

Parse a line from a PDBFile. This is a helper function for readLine().

virtual bool BALL::PDBFile::parseRecordANISOU ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordATOM ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordAUTHOR ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordCAVEAT ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordCISPEP ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordCOMPND ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordCONECT ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordCRYST1 ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordDBREF ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordEND ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordENDMDL ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordEXPDTA ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordFORMUL ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordFTNOTE ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordHEADER ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordHELIX ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordHET ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordHETATM ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordHETNAM ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordHETSYN ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordHYDBND ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordJRNL ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordKEYWDS ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordLINK ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordMASTER ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordMODEL ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordMODRES ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordMTRIX1 ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordMTRIX2 ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordMTRIX3 ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordOBSLTE ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordORIGX1 ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordORIGX2 ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordORIGX3 ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordREMARK ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordREVDAT ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordSCALE1 ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordSCALE2 ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordSCALE3 ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordSEQADV ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordSEQRES ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordSHEET ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordSIGATM ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordSIGUIJ ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordSITE ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordSLTBRG ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordSOURCE ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordSPRSDE ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordSSBOND ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordTER ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordTITLE ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordTURN ( const char *  line,
Size  size 
)
virtual
virtual bool BALL::PDBFile::parseRecordTVECT ( const char *  line,
Size  size 
)
virtual
void BALL::PDBFile::postprocessHelices_ ( )
protected
void BALL::PDBFile::postprocessRandomCoils_ ( )
protected
void BALL::PDBFile::postprocessSheetsTurns_ ( QuadrupleList sectruct_list,
SecStructList new_secstruct_list 
)
protected
void BALL::PDBFile::postprocessSSBonds_ ( )
protected
bool BALL::PDBFile::read ( Protein protein)

Read a Protein from the file return true if the Protein was read successfully return false otherwise

Exceptions
Exception::ParseErrorif a syntax error was encountered
bool BALL::PDBFile::read ( Molecule protein)

Read a Molecule from the file return true if the Molecule was read successfully return false otherwise

Exceptions
Exception::ParseErrorif a syntax error was encountered
bool BALL::PDBFile::read ( System system)
virtual

Read a System from the file return true if the System was read successfully return false otherwise

Exceptions
Exception::ParseErrorif a syntax error was encountered

Reimplemented from BALL::GenericMolFile.

Molecule* BALL::PDBFile::read ( )
virtual

Read a Molecule from the file return Molecule* pointer to the newly created Molecule

Exceptions
Exception::ParseErrorif a syntax error was encountered

Reimplemented from BALL::GenericMolFile.

bool BALL::PDBFile::readFirstRecord ( bool  read_values = true)

Read the firts record of a file.

virtual bool BALL::PDBFile::readInvalidRecord ( const char *  line)
virtual

Called an invalid record by simply returning true.

bool BALL::PDBFile::readLine ( char *  line,
Size  size,
bool  extract_values 
)

Read and parse a line from a PDB file.

bool BALL::PDBFile::readNextRecord ( bool  read_values = true)

Read the next record of a PDB file.

bool BALL::PDBFile::readRecords ( )

Reads all records of a file.

Returns
true if all records were parsed without error
false otherwise
virtual bool BALL::PDBFile::readUnknownRecord ( const char *  line)
virtual

Called for unknown PDB records. The default implementation does nothing, it always returns true.

Returns
true
void BALL::PDBFile::selectAllModels ( )

Selects all models for reading.

void BALL::PDBFile::selectAltLocationIndicator ( char  c)

This function allows to select the alternate location indicator That should be parsed if one is specified. Default is 'A'.

If other location indicators exist, but the specified one is missing for an atom nothing will be parsed. Thus this option should be used with caution.

Exceptions
IllegalArgumentThis exception is thrown if an invalid Location indicator (not a letter) was passed.
void BALL::PDBFile::selectModel ( Index  index)

Selects one of multiple models for reading. Default behaviour is reading model 1. If a file does not contain a MODEL specifier, all coordinates will be assigned to model 1.

bool BALL::PDBFile::skipCurrentRecord ( )

Skip the current record. If storeSkippedRecords is set to true, the records are added to the skipped records of info. Otherwise, they are just ignored. This method should be called by those readRecord methods that want to skip a particular record (this is the default behavior implemented in PDBFile).

Returns
true
static void BALL::PDBFile::updateAdditionalAtomInfo_ ( const PDB::Structure::AtomEntry atom,
PDB::AdditionalAtomInfo cr 
)
staticprotected

Compute the current name and id of chain and residue. This method guesses more or less correct values for names and IDs or uses decent default values. It does so only of the pointers to the residue and chain in cr differ from the values in atom.

bool BALL::PDBFile::write ( const Protein protein)

Write a Protein to the file return true if the writing finished successfully return false otherwise

Exceptions
File::CannotWriteif writing to the file failed
bool BALL::PDBFile::write ( const Molecule molecule)
virtual

Write a Molecule to the file return true if the writing finished successfully return false otherwise

Exceptions
File::CannotWriteif writing to the file failed

Reimplemented from BALL::GenericMolFile.

bool BALL::PDBFile::write ( const System system)
virtual

Write a System to the file return true if the writing finished successfully return false otherwise

Exceptions
File::CannotWriteif writing to the file failed

Reimplemented from BALL::GenericMolFile.

bool BALL::PDBFile::write ( const System system,
const PDBInfo info 
)

Write a System to the file return true if the writing finished successfully return false otherwise

Exceptions
File::CannotWriteif writing to the file failed
void BALL::PDBFile::write_ ( const AtomContainer ac,
const PDBInfo info = PDBInfo() 
)
protected
void BALL::PDBFile::writeAtom_ ( const PDB::Structure::AtomEntry atom,
PDB::AdditionalAtomInfo cr,
bool  hetatm = false 
)
protected
void BALL::PDBFile::writeBookKeepingSection_ ( const PDB::Structure structure,
const PDBInfo info 
)
protected
void BALL::PDBFile::writeCONECTRecords_ ( PDB::Structure::ConectAtomList cl)
protected
void BALL::PDBFile::writeConnectivityAnnotationSection_ ( const PDB::Structure structure,
const PDBInfo info 
)
protected
void BALL::PDBFile::writeConnectivitySection_ ( const PDB::Structure structure,
const PDBInfo info 
)
protected
void BALL::PDBFile::writeCoordinateSection_ ( const PDB::Structure structure,
const PDBInfo info 
)
protected
void BALL::PDBFile::writeCRYST1Section_ ( const PDB::Structure structure)
protected
void BALL::PDBFile::writeCrystallographicSection_ ( const PDB::Structure structure,
const PDBInfo info 
)
protected
void BALL::PDBFile::writeHELIXSection_ ( const PDB::Structure structure)
protected
void BALL::PDBFile::writeHeterogenSection_ ( const PDB::Structure structure,
const PDBInfo info 
)
protected
void BALL::PDBFile::writeHYDBNDSection_ ( const PDB::Structure structure)
protected
void BALL::PDBFile::writeMiscellaneousFeaturesSection_ ( const PDB::Structure structure,
const PDBInfo info 
)
protected
void BALL::PDBFile::writeMTRIXnSection_ ( const PDB::Structure structure)
protected
void BALL::PDBFile::writePrimaryStructureSection_ ( const PDB::Structure structure,
const PDBInfo info 
)
protected
void BALL::PDBFile::writeRawRecord_ ( const char *  format,
const char *  tag,
  ... 
)
protected

Write a record to the stream using a predefined format string. You should not use this method unless you know what you are doing. Use writeRecord_ instead, as this method also updates the record book keeping required for the MASTER record. If you use it, you'll have to update the book keeping structure yourself!

void BALL::PDBFile::writeRecord_ ( PDB::RecordType  record,
  ... 
)
protected

Write a record to the stream using a predefined record type. This method updates the internal book keeping data structure required for writing the MASTER record.

See Also
PDB::RecordType
void BALL::PDBFile::writeRecord_ ( const PDB::RecordSEQRES seqres)
protected

Write a SEQRES record to the current stream

void BALL::PDBFile::writeRecord_ ( const PDB::RecordHELIX helix)
protected

Write a HELIX record to the current stream

void BALL::PDBFile::writeRecord_ ( const PDB::RecordSHEET helix)
protected

Write a SHEET record to the current stream

void BALL::PDBFile::writeRecord_ ( const PDB::RecordTURN helix)
protected

Write a TURN record to the current stream

void BALL::PDBFile::writeRecord_ ( const PDB::RecordSSBOND helix)
protected

Write a SSBOND record to the current stream

void BALL::PDBFile::writeRecord_ ( const PDB::RecordCONECT helix)
protected

Write a CONECT record to the current stream

void BALL::PDBFile::writeRecord_ ( const PDB::RecordCRYST1 cryst1)
protected

Write a CRYST1 record to the current stream

void BALL::PDBFile::writeRecord_ ( const PDB::RecordMTRIX1 mtrix1)
protected

Write a MTRIX1 record to the current stream

void BALL::PDBFile::writeRecord_ ( const PDB::RecordMTRIX2 mtrix2)
protected

Write a MTRIX2 record to the current stream

void BALL::PDBFile::writeRecord_ ( const PDB::RecordMTRIX3 mtrix3)
protected

Write a MTRIX3 record to the current stream

void BALL::PDBFile::writeSecondaryStructureSection_ ( const PDB::Structure structure,
const PDBInfo info 
)
protected
void BALL::PDBFile::writeSEQRESSection_ ( const std::vector< std::pair< char, String > > &  chain_residues)
protected
void BALL::PDBFile::writeSHEETSection_ ( const PDB::Structure structure)
protected
void BALL::PDBFile::writeSLTBRGSection_ ( const PDB::Structure structure)
protected
void BALL::PDBFile::writeSSBONDSection_ ( const PDB::Structure structure)
protected
void BALL::PDBFile::writeTitleSection_ ( const PDB::Structure structure,
const PDBInfo info 
)
protected
void BALL::PDBFile::writeTURNSection_ ( const PDB::Structure structure)
protected

Member Data Documentation

char BALL::PDBFile::alternate_location_indicator_
protected

Definition at line 874 of file PDBFile.h.

HashMap<const Atom*, Position> BALL::PDBFile::atom_map_
protected

Definition at line 888 of file PDBFile.h.

PDB::BookKeeping BALL::PDBFile::book_keeping_
protected

Book keeping struct for the number of records written.

Definition at line 891 of file PDBFile.h.

PDB::Character BALL::PDBFile::chain_ID_
protected

Definition at line 876 of file PDBFile.h.

PDB::AChar BALL::PDBFile::code_
protected

Definition at line 878 of file PDBFile.h.

PDB::RecordTypeFormat BALL::PDBFile::compare_record_type_format_
protected

Definition at line 861 of file PDBFile.h.

Chain* BALL::PDBFile::current_chain_
protected

Definition at line 881 of file PDBFile.h.

const Atom* BALL::PDBFile::current_const_atom_
protected

Definition at line 886 of file PDBFile.h.

const Chain* BALL::PDBFile::current_const_chain_
protected

Definition at line 882 of file PDBFile.h.

const Protein* BALL::PDBFile::current_const_protein_
protected

Definition at line 880 of file PDBFile.h.

const Residue* BALL::PDBFile::current_const_residue_
protected

Definition at line 884 of file PDBFile.h.

Index BALL::PDBFile::current_model_
protected

Definition at line 857 of file PDBFile.h.

PDBAtom* BALL::PDBFile::current_PDB_atom_
protected

Definition at line 885 of file PDBFile.h.

Protein* BALL::PDBFile::current_protein_
protected

Definition at line 879 of file PDBFile.h.

Index BALL::PDBFile::current_record_
protected

Definition at line 858 of file PDBFile.h.

PDB::RecordType BALL::PDBFile::current_record_type_
protected

Definition at line 860 of file PDBFile.h.

Residue* BALL::PDBFile::current_residue_
protected

Definition at line 883 of file PDBFile.h.

QuadrupleList BALL::PDBFile::helix_list_
protected

Definition at line 866 of file PDBFile.h.

bool BALL::PDBFile::ignore_xplor_pseudo_atoms_
protected

Ignore XPLOR pseudo atoms?

Definition at line 905 of file PDBFile.h.

PDBInfo BALL::PDBFile::info

Summary information on the last file read.

Definition at line 191 of file PDBFile.h.

PDB::AChar BALL::PDBFile::insertion_code_
protected

Definition at line 875 of file PDBFile.h.

char BALL::PDBFile::line_buffer_[PDB::SIZE_OF_PDB_LINE_BUFFER]
protected

Definition at line 853 of file PDBFile.h.

String BALL::PDBFile::name_
protected

Definition at line 887 of file PDBFile.h.

SecStructList BALL::PDBFile::new_helix_secstruc_list_
protected

Definition at line 870 of file PDBFile.h.

SecStructList BALL::PDBFile::new_sheet_secstruc_list_
protected

Definition at line 871 of file PDBFile.h.

SecStructList BALL::PDBFile::new_turn_secstruc_list_
protected

Definition at line 872 of file PDBFile.h.

Options BALL::PDBFile::options

The options for parsing the file.

Definition at line 189 of file PDBFile.h.

bool BALL::PDBFile::parse_partial_charges_
protected

Read partial charges from cols 76-80?

Definition at line 908 of file PDBFile.h.

PDBAtomMap BALL::PDBFile::PDB_atom_map_
protected

Definition at line 863 of file PDBFile.h.

Size BALL::PDBFile::record_fields_
protected

Definition at line 859 of file PDBFile.h.

ResidueMap BALL::PDBFile::residue_map_
protected

Definition at line 864 of file PDBFile.h.

String BALL::PDBFile::residue_name_
protected

Definition at line 855 of file PDBFile.h.

Index BALL::PDBFile::residue_sequence_number_
protected

Definition at line 856 of file PDBFile.h.

Index BALL::PDBFile::selected_model_
protected

The selected model_.

Definition at line 899 of file PDBFile.h.

PDB::Integer BALL::PDBFile::sequence_number_
protected

Definition at line 877 of file PDBFile.h.

QuadrupleList BALL::PDBFile::sheet_list_
protected

Definition at line 867 of file PDBFile.h.

QuadrupleList BALL::PDBFile::ssbond_list_
protected

Definition at line 865 of file PDBFile.h.

bool BALL::PDBFile::store_skipped_records_
protected

Store the skipped records in info?

Definition at line 902 of file PDBFile.h.

bool BALL::PDBFile::strict_line_checking_
protected

Definition at line 896 of file PDBFile.h.

QuadrupleList BALL::PDBFile::turn_list_
protected

Definition at line 868 of file PDBFile.h.

int BALL::PDBFile::verbosity_
protected

_Verbosity level

Definition at line 894 of file PDBFile.h.

bool BALL::PDBFile::write_pdbformat_1996_
protected

write in the 1996-format?

Definition at line 911 of file PDBFile.h.