5#ifndef BALL_FORMAT_PDBFILE_H
6#define BALL_FORMAT_PDBFILE_H
8#ifndef BALL_CONCEPT_PROPERTY_H
12#ifndef BALL_FORMAT_GENERICMOLFILE_H
16#ifndef BALL_DATATYPE_OPTIONS_H
20#ifndef BALL_DATATYPE_QUADRUPLE_H
24#ifndef BALL_FORMAT_PDBDEFS_H
28#ifndef BALL_FORMAT_PDBINFO_H
32#ifndef BALL_KERNEL_PDBAtom_H
36#ifndef BALL_KERNEL_SYSTEM_H
40#ifndef BALL_KERNEL_RESIDUE_H
44#ifndef BALL_KERNEL_SECONDARYSTRUCTURE_H
262 (
const PDB::Atom atom_name,
263 PDB::Atom element_symbol);
267 (
const PDB::Atom atom_name);
271 (
const PDB::Atom atom_name);
275 (
const PDB::Atom atom_name);
285 bool from_begin_of_file =
true);
290 (
bool from_begin_of_file =
true);
300 bool parseLine(
const char* line,
Size size,
const char* format_string, ...);
837 char line_buffer_[PDB::SIZE_OF_PDB_LINE_BUFFER];
927# ifndef BALL_NO_INLINE_FUNCTIONS
928# include <BALL/FORMAT/PDBFile.iC>
BALL_EXPORT std::ostream & operator<<(std::ostream &os, const Exception::GeneralException &e)
HashIndex Hash(const T &key)
HashMap class based on the STL map (containing serveral convenience functions)
virtual bool parseRecordMTRIX2(const char *line, Size size)
virtual bool fillRecord(const char *line, Size size, PDB::RecordFTNOTE &record)
bool strict_line_checking_
virtual bool interpretRecord(const PDB::RecordSLTBRG &record)
Reads a record defining a salt bridge.
void postprocessSheetsTurns_(QuadrupleList §ruct_list, SecStructList &new_secstruct_list)
virtual bool fillRecord(const char *line, Size size, PDB::RecordOBSLTE &record)
virtual bool parseRecordSCALE3(const char *line, Size size)
void writeTitleSection_(const PDB::Structure &structure, const PDBInfo &info)
virtual bool interpretRecord(const PDB::RecordANISOU &record)
Reads an anisotropic temperature factor record.
virtual bool fillRecord(const char *line, Size size, PDB::RecordSPRSDE &record)
virtual bool parseRecordDBREF(const char *line, Size size)
virtual bool interpretRecord(const PDB::RecordKEYWDS &record)
Reads a record containing keywords for this entry.
PDB::AChar insertion_code_
virtual const char * getAtomName(const PDB::Atom atom_name)
Returns the atom name.
virtual bool interpretRecord(const PDB::RecordORIGX1 &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordKEYWDS &record)
virtual bool interpretRecord(const PDB::RecordTITLE &record)
Reads a record specifying the title of the experiment or anaysis.
virtual bool fillRecord(const char *line, Size size, PDB::RecordSITE &record)
void writeRecord_(const PDB::RecordHELIX &helix)
virtual bool interpretRecord(const PDB::RecordMODEL &record)
Reads a record indicating the beginning of a new model.
virtual bool interpretRecord(const PDB::RecordSOURCE &record)
virtual bool parseRecordSOURCE(const char *line, Size size)
virtual bool parseRecordFTNOTE(const char *line, Size size)
static void updateAdditionalAtomInfo_(const PDB::Structure::AtomEntry &atom, PDB::AdditionalAtomInfo &cr)
virtual bool interpretRecord(const PDB::RecordMTRIX3 &record)
Size countRecord(PDB::RecordType record_type, bool from_begin_of_file=true)
virtual bool interpretRecord(const PDB::RecordEXPDTA &record)
Reads a record containing data about the experiment.
virtual bool parseRecordMASTER(const char *line, Size size)
QuadrupleList sheet_list_
void writeTURNSection_(const PDB::Structure &structure)
virtual bool fillRecord(const char *line, Size size, PDB::RecordHETNAM &record)
PDB::RecordType current_record_type_
QuadrupleList ssbond_list_
std::list< SecondaryStructure * > SecStructList
void writeHYDBNDSection_(const PDB::Structure &structure)
virtual bool parseRecordKEYWDS(const char *line, Size size)
virtual bool fillRecord(const char *line, Size size, PDB::RecordHET &record)
PDB::RecordTypeFormat compare_record_type_format_
void writeBookKeepingSection_(const PDB::Structure &structure, const PDBInfo &info)
void writeHELIXSection_(const PDB::Structure &structure)
bool parse_partial_charges_
Read partial charges from cols 76-80?
virtual bool fillRecord(const char *line, Size size, PDB::RecordSHEET &record)
const Atom * current_const_atom_
bool write(const System &system, const PDBInfo &info)
virtual bool fillRecord(const char *line, Size size, PDB::RecordHYDBND &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordANISOU &record)
void writeSSBONDSection_(const PDB::Structure &structure)
HashMap< PDB::Integer, PDBAtom * > PDBAtomMap
virtual bool fillRecord(const char *line, Size size, PDB::RecordSIGATM &record)
virtual bool interpretRecord(const PDB::RecordMASTER &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordJRNL &record)
PDBFile(const String &filename, File::OpenMode open_mode=std::ios::in)
virtual bool interpretRecord(const PDB::RecordLINK &record)
Reads a record containing supplemental connectivity information.
virtual bool fillRecord(const char *line, Size size, PDB::RecordSSBOND &record)
virtual bool interpretRecord(const PDB::RecordCISPEP &record)
Reads a record specifying peptides in cis conformation.
void writeMTRIXnSection_(const PDB::Structure &structure)
PDB::Integer sequence_number_
void writePrimaryStructureSection_(const PDB::Structure &structure, const PDBInfo &info)
void writeCONECTRecords_(PDB::Structure::ConectAtomList &cl)
static bool isHeteroAtom_(const Atom &atom)
virtual bool fillRecord(const char *line, Size size, PDB::RecordSEQADV &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordCAVEAT &record)
virtual float getVersion() const
Returns the version number this PDB file reader is able to read.
void postprocessSSBonds_()
virtual bool parseRecordTURN(const char *line, Size size)
virtual bool parseRecordCOMPND(const char *line, Size size)
virtual bool fillRecord(const char *line, Size size, PDB::RecordMASTER &record)
virtual bool parseRecordMTRIX1(const char *line, Size size)
virtual bool fillRecord(const char *line, Size size, PDB::RecordMODRES &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordORIGX3 &record)
Index getSelectedModel() const
Return the model currently selected.
virtual bool parseRecordCONECT(const char *line, Size size)
virtual bool interpretRecord(const PDB::RecordHEADER &record)
Index selected_model_
The selected model_.
Index residue_sequence_number_
virtual bool interpretRecord(const PDB::RecordCAVEAT &record)
Reads a caveat record.
Size countRecords(bool from_begin_of_file=true)
const Protein * current_const_protein_
virtual bool fillRecord(const char *line, Size size, PDB::RecordSCALE3 &record)
HashMap< ResidueQuadruple, Residue * > ResidueMap
virtual bool interpretRecord(const PDB::RecordREMARK &record)
Reads a record containing remarks.
virtual bool parseRecordHEADER(const char *line, Size size)
virtual bool fillRecord(const char *line, Size size, PDB::RecordTER &record)
PDBInfo info
Summary information on the last file read.
void writeRecord_(const PDB::RecordSEQRES &seqres)
virtual bool interpretRecord(const PDB::RecordJRNL &record)
Reads a record containing a journal reference.
virtual bool interpretRecord(const PDB::RecordTER &record)
Reads a record terminating molecule.
const Chain * current_const_chain_
virtual bool parseRecordMODRES(const char *line, Size size)
Index getRecordNumber() const
Returns the number of the record we are currently reading.
virtual bool parseRecordSPRSDE(const char *line, Size size)
virtual bool interpretRecord(const PDB::RecordDBREF &record)
Reads a record containing database cross-reference links.
int verbosity_
_Verbosity level
virtual bool fillRecord(const char *line, Size size, PDB::RecordMTRIX3 &record)
PDBFile(const File &pdbf)
virtual bool interpretRecord(const PDB::RecordHYDBND &record)
Reads a record defining a hydrogen bond.
void writeHeterogenSection_(const PDB::Structure &structure, const PDBInfo &info)
void writeRecord_(const PDB::RecordCRYST1 &cryst1)
bool parseLine(const char *line, Size size, const char *format_string,...)
Parse a line from a PDBFile. This is a helper function for readLine().
bool readFirstRecord(bool read_values=true)
Read the firts record of a file.
virtual bool fillRecord(const char *line, Size size, PDB::RecordCISPEP &record)
virtual bool parseRecordSEQRES(const char *line, Size size)
virtual bool hasFormat()
Check whether the current file is in PDB format.
virtual bool parseRecordORIGX3(const char *line, Size size)
bool store_skipped_records_
Store the skipped records in info?
virtual bool fillRecord(const char *line, Size size, PDB::RecordMTRIX2 &record)
virtual bool parseRecordTVECT(const char *line, Size size)
bool write(const Molecule &molecule)
virtual bool interpretRecord(const PDB::RecordMODRES &record)
Reads a record identifying residue modifications.
virtual bool readUnknownRecord(const char *line)
bool write(const System &system)
Protein * current_protein_
virtual bool parseRecordSITE(const char *line, Size size)
virtual bool interpretRecord(const PDB::RecordTVECT &record)
virtual bool parseRecordENDMDL(const char *line, Size size)
const Residue * current_const_residue_
virtual bool interpretRecord(const PDB::RecordSCALE3 &record)
Reads a scale transformation record.
bool ignore_xplor_pseudo_atoms_
Ignore XPLOR pseudo atoms?
virtual bool fillRecord(const char *line, Size size, PDB::RecordREMARK &record)
virtual bool interpretRecord(const PDB::RecordFORMUL &record)
virtual bool parseRecordSCALE1(const char *line, Size size)
virtual bool interpretRecord(const PDB::RecordSHEET &record)
Reads a record defining a beta-sheet.
virtual bool parseRecordHETSYN(const char *line, Size size)
virtual bool interpretRecord(const PDB::RecordHELIX &record)
Reads a helix defining record.
void writeSHEETSection_(const PDB::Structure &structure)
bool readLine(char *line, Size size, bool extract_values)
Read and parse a line from a PDB file.
virtual bool parseRecordORIGX1(const char *line, Size size)
virtual char getAtomRemotenessIndicator(const PDB::Atom atom_name)
Extract the PDB remoteness indicator of an atom record.
virtual bool parseRecordEND(const char *line, Size size)
virtual bool fillRecord(const char *line, Size size, PDB::RecordEXPDTA &record)
static void extractStructure_(const AtomContainer &ac, PDB::Structure &structure)
void open(const String &name, File::OpenMode open_mode=std::ios::in)
virtual bool parseRecordREVDAT(const char *line, Size size)
PDB::RecordType getRecordType() const
Returns the type of the record we are currently reading.
virtual bool parseRecordHETATM(const char *line, Size size)
virtual bool interpretRecord(const PDB::RecordHET &record)
Reads a record defining a non-standard residue.
void writeSEQRESSection_(const std::vector< std::pair< char, String > > &chain_residues)
virtual bool parseRecordOBSLTE(const char *line, Size size)
virtual bool interpretRecord(const PDB::RecordSCALE1 &record)
Reads a scale transformation record.
virtual bool parseRecordATOM(const char *line, Size size)
virtual bool fillRecord(const char *line, Size size, PDB::RecordDBREF &record)
HashMap< const Atom *, Position > atom_map_
virtual bool interpretRecord(const PDB::RecordSEQADV &record)
Sequence information conflicts between atom records and dbref content.
Size countRecordFields() const
Returns the number of record fields.
virtual bool fillRecord(const char *line, Size size, PDB::RecordORIGX1 &record)
virtual bool parseRecordTITLE(const char *line, Size size)
virtual bool interpretRecord(const PDB::RecordTURN &record)
Reads a record specifying a turn.
virtual bool parseRecordHET(const char *line, Size size)
virtual bool parseRecordANISOU(const char *line, Size size)
virtual bool parseRecordFORMUL(const char *line, Size size)
virtual bool interpretRecord(const PDB::RecordMTRIX1 &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordHETATM &record)
bool write(const Protein &protein)
void writeRecord_(const PDB::RecordSHEET &helix)
virtual bool interpretRecord(const PDB::RecordCONECT &record)
Reads a connection record.
virtual bool fillRecord(const char *line, Size size, PDB::RecordCOMPND &record)
PDB::BookKeeping book_keeping_
Book keeping struct for the number of records written.
void writeRecord_(const PDB::RecordSSBOND &helix)
virtual bool fillRecord(const char *line, Size size, PDB::RecordHETSYN &record)
virtual bool parseRecordCISPEP(const char *line, Size size)
void addAllRecords_(const PDBInfo &info, PDB::RecordType type)
Add all records of a specific type in the info object to the current stream.
virtual bool interpretRecord(const PDB::RecordMTRIX2 &record)
virtual bool interpretRecord(const PDB::RecordORIGX3 &record)
virtual bool parseRecordSHEET(const char *line, Size size)
bool write_pdbformat_1996_
write in the 1996-format?
SecStructList new_turn_secstruc_list_
void writeCrystallographicSection_(const PDB::Structure &structure, const PDBInfo &info)
virtual bool interpretRecord(const PDB::RecordATOM &record)
Reads an atom record.
bool read(System &system)
void writeSecondaryStructureSection_(const PDB::Structure &structure, const PDBInfo &info)
virtual bool parseRecordCAVEAT(const char *line, Size size)
virtual bool fillRecord(const char *line, Size size, PDB::RecordLINK &record)
SecStructList new_helix_secstruc_list_
virtual bool interpretRecord(const PDB::RecordHETSYN &record)
Reads a record defining synonyms of a non-standard group.
virtual bool fillRecord(const char *line, Size size, PDB::RecordAUTHOR &record)
Residue * current_residue_
virtual bool parseRecordEXPDTA(const char *line, Size size)
bool readNextRecord(bool read_values=true)
Read the next record of a PDB file.
virtual bool fillRecord(const char *line, Size size, PDB::RecordSIGUIJ &record)
virtual bool parseRecordJRNL(const char *line, Size size)
virtual bool parseRecordSCALE2(const char *line, Size size)
Quadruple< String, PDB::Character, PDB::Integer, PDB::AChar > ResidueQuadruple
void writeCRYST1Section_(const PDB::Structure &structure)
void writeRecord_(const PDB::RecordTURN &helix)
virtual bool parseRecordAUTHOR(const char *line, Size size)
virtual bool fillRecord(const char *line, Size size, PDB::RecordSOURCE &record)
void writeConnectivityAnnotationSection_(const PDB::Structure &structure, const PDBInfo &info)
const char * getRecordString() const
Return a constant pointer to the line buffer.
virtual bool parseRecordHELIX(const char *line, Size size)
void writeConnectivitySection_(const PDB::Structure &structure, const PDBInfo &info)
virtual bool parseRecordSSBOND(const char *line, Size size)
virtual bool interpretRecord(const PDB::RecordEND &record)
Reads the record defining the end of a PDB file.
virtual bool interpretRecord(const PDB::RecordCRYST1 &record)
void postprocessRandomCoils_()
void selectModel(Index index)
virtual bool interpretRecord(const PDB::RecordFTNOTE &record)
Reads a record containing a footnote.
void writeRecord_(const PDB::RecordMTRIX3 &mtrix3)
virtual bool fillRecord(const char *line, Size size, PDB::RecordTVECT &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordFORMUL &record)
virtual bool interpretRecord(const PDB::RecordSCALE2 &record)
Reads a scale transformation record.
virtual bool parseRecordHYDBND(const char *line, Size size)
virtual bool fillRecord(const char *line, Size size, PDB::RecordMTRIX1 &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordSLTBRG &record)
char alternate_location_indicator_
virtual bool parseRecordMTRIX3(const char *line, Size size)
virtual bool interpretRecord(const PDB::RecordSIGUIJ &record)
virtual bool parseRecordSEQADV(const char *line, Size size)
virtual short getAtomBranchDesignator(const PDB::Atom atom_name)
Extract the PDB branch designator of an atom record.
virtual bool parseRecordCRYST1(const char *line, Size size)
virtual bool fillRecord(const char *line, Size size, PDB::RecordENDMDL &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordHEADER &record)
virtual bool parseRecordSLTBRG(const char *line, Size size)
virtual bool parseRecordLINK(const char *line, Size size)
PDBAtom * current_PDB_atom_
bool read(Protein &protein)
virtual bool interpretRecord(const PDB::RecordHETATM &record)
Reads atomic coordinates for atoms in non-standard groups.
virtual bool interpretRecord(const PDB::RecordENDMDL &record)
Reads a model ending record.
virtual bool fillRecord(const char *line, Size size, PDB::RecordATOM &record)
virtual bool parseRecordMODEL(const char *line, Size size)
virtual bool interpretRecord(const PDB::RecordOBSLTE &record)
virtual bool interpretRecord(const PDB::RecordSIGATM &record)
Reads a record giving the standard deviation of atomic coordinates.
virtual bool fillRecord(const char *line, Size size, PDB::RecordHELIX &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordCONECT &record)
virtual bool interpretRecord(const PDB::RecordSSBOND &record)
Reads a record specifying a disulfide bond.
void selectAllModels()
Selects all models for reading.
virtual bool readInvalidRecord(const char *line)
virtual bool interpretRecord(const PDB::RecordREVDAT &record)
Reads a record containing a revision history.
virtual void clear(int state)
Clear the stream state.
virtual bool interpretRecord(const PDB::RecordHETNAM &record)
Reads a record defining the name of a non-standard group.
void postprocessHelices_()
Index getCurrentModel() const
Returns the number of the model weare currently reading. (?????)
virtual bool interpretRecord(const PDB::RecordAUTHOR &record)
Reads an author record.
PDBFile(const Options &new_options)
virtual bool parseRecordSIGATM(const char *line, Size size)
SecStructList new_sheet_secstruc_list_
void writeRecord_(const PDB::RecordCONECT &helix)
void writeMiscellaneousFeaturesSection_(const PDB::Structure &structure, const PDBInfo &info)
virtual bool parseRecordORIGX2(const char *line, Size size)
std::list< ResidueQuadruple > QuadrupleList
virtual bool interpretRecord(const PDB::RecordORIGX2 &record)
virtual void clear()
Clear all members.
void writeRecord_(const PDB::RecordMTRIX2 &mtrix2)
virtual bool fillRecord(const char *line, Size size, PDB::RecordEND &record)
QuadrupleList helix_list_
virtual bool interpretRecord(const PDB::RecordCOMPND &record)
Reads the title record containing macroscopic compoubd information.
virtual bool fillRecord(const char *line, Size size, PDB::RecordSCALE1 &record)
void write_(const AtomContainer &ac, const PDBInfo &info=PDBInfo())
virtual const char * getAtomElementSymbol(const PDB::Atom atom_name, PDB::Atom element_symbol)
virtual bool parseRecordSIGUIJ(const char *line, Size size)
void selectAltLocationIndicator(char c)
virtual bool fillRecord(const char *line, Size size, PDB::RecordREVDAT &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordCRYST1 &record)
virtual bool parseRecordREMARK(const char *line, Size size)
bool read(Molecule &protein)
virtual bool fillRecord(const char *line, Size size, PDB::RecordSEQRES &record)
void writeRecord_(PDB::RecordType record,...)
virtual bool parseRecordTER(const char *line, Size size)
Options options
The options for parsing the file.
void writeAtom_(const PDB::Structure::AtomEntry &atom, PDB::AdditionalAtomInfo &cr, bool hetatm=false)
char * getRecordString()
Return a mutable pointer to the line buffer.
virtual bool interpretRecord(const PDB::RecordSEQRES &record)
Reads a record containing the sequence of residues.
virtual bool fillRecord(const char *line, Size size, PDB::RecordSCALE2 &record)
virtual bool parseRecordHETNAM(const char *line, Size size)
void writeRecord_(const PDB::RecordMTRIX1 &mtrix1)
void writeRawRecord_(const char *format, const char *tag,...)
void writeCoordinateSection_(const PDB::Structure &structure, const PDBInfo &info)
virtual bool fillRecord(const char *line, Size size, PDB::RecordTITLE &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordMODEL &record)
virtual bool interpretRecord(const PDB::RecordSPRSDE &record)
List of entries this file supersedes.
void writeSLTBRGSection_(const PDB::Structure &structure)
virtual bool fillRecord(const char *line, Size size, PDB::RecordORIGX2 &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordTURN &record)
virtual bool interpretRecord(const PDB::RecordSITE &record)
Reads a record containing groups comprising a site.
static const char * STORE_SKIPPED_RECORDS
static const char * CHOOSE_MODEL
static const char * VERBOSITY
static const char * IGNORE_XPLOR_PSEUDO_ATOMS
static const char * PARSE_PARTIAL_CHARGES
static const char * STRICT_LINE_CHECKING
static const char * WRITE_PDBFORMAT_1996
static const bool WRITE_PDBFORMAT_1996
static const Index VERBOSITY
static const bool STORE_SKIPPED_RECORDS
static const bool STRICT_LINE_CHECKING
static const Index CHOOSE_MODEL
static const bool PARSE_PARTIAL_CHARGES
static const bool IGNORE_XPLOR_PSEUDO_ATOMS
std::ios::openmode OpenMode