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