BALL 1.5.0
Loading...
Searching...
No Matches
PDBFile.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4
5#ifndef BALL_FORMAT_PDBFILE_H
6#define BALL_FORMAT_PDBFILE_H
7
8#ifndef BALL_CONCEPT_PROPERTY_H
10#endif
11
12#ifndef BALL_FORMAT_GENERICMOLFILE_H
14#endif
15
16#ifndef BALL_DATATYPE_OPTIONS_H
18#endif
19
20#ifndef BALL_DATATYPE_QUADRUPLE_H
22#endif
23
24#ifndef BALL_FORMAT_PDBDEFS_H
25# include <BALL/FORMAT/PDBdefs.h>
26#endif
27
28#ifndef BALL_FORMAT_PDBINFO_H
29# include <BALL/FORMAT/PDBInfo.h>
30#endif
31
32#ifndef BALL_KERNEL_PDBAtom_H
33# include <BALL/KERNEL/PDBAtom.h>
34#endif
35
36#ifndef BALL_KERNEL_SYSTEM_H
37# include <BALL/KERNEL/system.h>
38#endif
39
40#ifndef BALL_KERNEL_RESIDUE_H
41# include <BALL/KERNEL/residue.h>
42#endif
43
44#ifndef BALL_KERNEL_SECONDARYSTRUCTURE_H
46#endif
47
48namespace BALL
49{
50
56 : public GenericMolFile,
57 public PropertyManager
58 {
59 public:
60
67 {
74 static const char* VERBOSITY;
75
82 static const char* STRICT_LINE_CHECKING;
83
91 static const char* CHOOSE_MODEL;
92
98 static const char* STORE_SKIPPED_RECORDS;
99
105 static const char* IGNORE_XPLOR_PSEUDO_ATOMS;
106
112 static const char* PARSE_PARTIAL_CHARGES;
113
118 static const char* WRITE_PDBFORMAT_1996;
119 };
120
124 {
129 static const Index VERBOSITY;
130
135 static const bool STRICT_LINE_CHECKING;
136
141 static const Index CHOOSE_MODEL;
142
146 static const bool STORE_SKIPPED_RECORDS;
147
151 static const bool IGNORE_XPLOR_PSEUDO_ATOMS;
152
156 static const bool PARSE_PARTIAL_CHARGES;
157
162 static const bool WRITE_PDBFORMAT_1996;
163
164 };
165
174
178
182
186 PDBFile(const String& filename, File::OpenMode open_mode = std::ios::in);
187
190 PDBFile(const Options& new_options);
191
194 virtual ~PDBFile();
196
200
202 virtual void clear(int state);
203
205 virtual void clear();
206
208
212
214 virtual float getVersion() const;
215
216 void open(const String& name, File::OpenMode open_mode=std::ios::in);
217
222 void selectModel(Index index);
223
236
239
242
245
248
250 const char* getRecordString() const;
251
254
257
261 virtual const char* getAtomElementSymbol
262 (const PDB::Atom atom_name,
263 PDB::Atom element_symbol);
264
266 virtual const char* getAtomName
267 (const PDB::Atom atom_name);
268
271 (const PDB::Atom atom_name);
272
275 (const PDB::Atom atom_name);
276
279
284 (PDB::RecordType record_type,
285 bool from_begin_of_file = true);
286
290 (bool from_begin_of_file = true);
292
300 bool parseLine(const char* line, Size size, const char* format_string, ...);
301
303 bool readLine(char* line, Size size, bool extract_values);
304
306 bool readFirstRecord(bool read_values = true);
307
309 bool readNextRecord(bool read_values = true);
310
316
321 virtual bool readUnknownRecord(const char* line);
322
325 virtual bool readInvalidRecord(const char* line);
326
336
338 virtual bool interpretRecord(const PDB::RecordANISOU& record);
339 virtual bool fillRecord(const char* line, Size size, PDB::RecordANISOU& record);
340 virtual bool parseRecordANISOU(const char* line, Size size);
341
343 virtual bool interpretRecord(const PDB::RecordATOM& record);
344 virtual bool fillRecord(const char* line, Size size, PDB::RecordATOM& record);
345 virtual bool parseRecordATOM(const char* line, Size size);
346
348 virtual bool interpretRecord(const PDB::RecordAUTHOR& record);
349 virtual bool fillRecord(const char* line, Size size, PDB::RecordAUTHOR& record);
350 virtual bool parseRecordAUTHOR(const char* line, Size size);
351
353 virtual bool interpretRecord(const PDB::RecordCAVEAT& record);
354 virtual bool fillRecord(const char* line, Size size, PDB::RecordCAVEAT& record);
355 virtual bool parseRecordCAVEAT(const char* line, Size size);
356
358 virtual bool interpretRecord(const PDB::RecordCISPEP& record);
359 virtual bool fillRecord(const char* line, Size size, PDB::RecordCISPEP& record);
360 virtual bool parseRecordCISPEP(const char* line, Size size);
361
363 virtual bool interpretRecord(const PDB::RecordCOMPND& record);
364 virtual bool fillRecord(const char* line, Size size, PDB::RecordCOMPND& record);
365 virtual bool parseRecordCOMPND(const char* line, Size size);
366
368 virtual bool interpretRecord(const PDB::RecordCONECT& record);
369 virtual bool fillRecord(const char* line, Size size, PDB::RecordCONECT& record);
370 virtual bool parseRecordCONECT(const char* line, Size size);
371
375 virtual bool interpretRecord(const PDB::RecordCRYST1& record);
376 virtual bool fillRecord(const char* line, Size size, PDB::RecordCRYST1& record);
377 virtual bool parseRecordCRYST1(const char* line, Size size);
378
380 virtual bool interpretRecord(const PDB::RecordDBREF& record);
381 virtual bool fillRecord(const char* line, Size size, PDB::RecordDBREF& record);
382 virtual bool parseRecordDBREF(const char* line, Size size);
383
385 virtual bool interpretRecord(const PDB::RecordEND& record);
386 virtual bool fillRecord(const char* line, Size size, PDB::RecordEND& record);
387 virtual bool parseRecordEND(const char* line, Size size);
388
390 virtual bool interpretRecord(const PDB::RecordENDMDL& record);
391 virtual bool fillRecord(const char* line, Size size, PDB::RecordENDMDL& record);
392 virtual bool parseRecordENDMDL(const char* line, Size size);
393
395 virtual bool interpretRecord(const PDB::RecordEXPDTA& record);
396 virtual bool fillRecord(const char* line, Size size, PDB::RecordEXPDTA& record);
397 virtual bool parseRecordEXPDTA(const char* line, Size size);
398
402 virtual bool interpretRecord(const PDB::RecordFORMUL& record);
403 virtual bool fillRecord(const char* line, Size size, PDB::RecordFORMUL& record);
404 virtual bool parseRecordFORMUL(const char* line, Size size);
405
407 virtual bool interpretRecord(const PDB::RecordFTNOTE& record);
408 virtual bool fillRecord(const char* line, Size size, PDB::RecordFTNOTE& record);
409 virtual bool parseRecordFTNOTE(const char* line, Size size);
410
414 virtual bool interpretRecord(const PDB::RecordHEADER& record);
415 virtual bool fillRecord(const char* line, Size size, PDB::RecordHEADER& record);
416 virtual bool parseRecordHEADER(const char* line, Size size);
417
419 virtual bool interpretRecord(const PDB::RecordHELIX& record);
420 virtual bool fillRecord(const char* line, Size size, PDB::RecordHELIX& record);
421 virtual bool parseRecordHELIX(const char* line, Size size);
422
424 virtual bool interpretRecord(const PDB::RecordHET& record);
425 virtual bool fillRecord(const char* line, Size size, PDB::RecordHET& record);
426 virtual bool parseRecordHET(const char* line, Size size);
427
429 virtual bool interpretRecord(const PDB::RecordHETATM& record);
430 virtual bool fillRecord(const char* line, Size size, PDB::RecordHETATM& record);
431 virtual bool parseRecordHETATM(const char* line, Size size);
432
434 virtual bool interpretRecord(const PDB::RecordHETNAM& record);
435 virtual bool fillRecord(const char* line, Size size, PDB::RecordHETNAM& record);
436 virtual bool parseRecordHETNAM(const char* line, Size size);
437
439 virtual bool interpretRecord(const PDB::RecordHETSYN& record);
440 virtual bool fillRecord(const char* line, Size size, PDB::RecordHETSYN& record);
441 virtual bool parseRecordHETSYN(const char* line, Size size);
442
444 virtual bool interpretRecord(const PDB::RecordHYDBND& record);
445 virtual bool fillRecord(const char* line, Size size, PDB::RecordHYDBND& record);
446 virtual bool parseRecordHYDBND(const char* line, Size size);
447
449 virtual bool interpretRecord(const PDB::RecordJRNL& record);
450 virtual bool fillRecord(const char* line, Size size, PDB::RecordJRNL& record);
451 virtual bool parseRecordJRNL(const char* line, Size size);
452
454 virtual bool interpretRecord(const PDB::RecordKEYWDS& record);
455 virtual bool fillRecord(const char* line, Size size, PDB::RecordKEYWDS& record);
456 virtual bool parseRecordKEYWDS(const char* line, Size size);
457
459 virtual bool interpretRecord(const PDB::RecordLINK& record);
460 virtual bool fillRecord(const char* line, Size size, PDB::RecordLINK& record);
461 virtual bool parseRecordLINK(const char* line, Size size);
462
466 virtual bool interpretRecord(const PDB::RecordMASTER& record);
467 virtual bool fillRecord(const char* line, Size size, PDB::RecordMASTER& record);
468 virtual bool parseRecordMASTER(const char* line, Size size);
469
471 virtual bool interpretRecord(const PDB::RecordMODEL& record);
472 virtual bool fillRecord(const char* line, Size size, PDB::RecordMODEL& record);
473 virtual bool parseRecordMODEL(const char* line, Size size);
474
476 virtual bool interpretRecord(const PDB::RecordMODRES& record);
477 virtual bool fillRecord(const char* line, Size size, PDB::RecordMODRES& record);
478 virtual bool parseRecordMODRES(const char* line, Size size);
479
483 virtual bool interpretRecord(const PDB::RecordMTRIX1& record);
484 virtual bool fillRecord(const char* line, Size size, PDB::RecordMTRIX1& record);
485 virtual bool parseRecordMTRIX1(const char* line, Size size);
486
490 virtual bool interpretRecord(const PDB::RecordMTRIX2& record);
491 virtual bool fillRecord(const char* line, Size size, PDB::RecordMTRIX2& record);
492 virtual bool parseRecordMTRIX2(const char* line, Size size);
493
497 virtual bool interpretRecord(const PDB::RecordMTRIX3& record);
498 virtual bool fillRecord(const char* line, Size size, PDB::RecordMTRIX3& record);
499 virtual bool parseRecordMTRIX3(const char* line, Size size);
500
504 virtual bool interpretRecord(const PDB::RecordOBSLTE& record);
505 virtual bool fillRecord(const char* line, Size size, PDB::RecordOBSLTE& record);
506 virtual bool parseRecordOBSLTE(const char* line, Size size);
507
511 virtual bool interpretRecord(const PDB::RecordORIGX1& record);
512 virtual bool fillRecord(const char* line, Size size, PDB::RecordORIGX1& record);
513 virtual bool parseRecordORIGX1(const char* line, Size size);
514
518 virtual bool interpretRecord(const PDB::RecordORIGX2& record);
519 virtual bool fillRecord(const char* line, Size size, PDB::RecordORIGX2& record);
520 virtual bool parseRecordORIGX2(const char* line, Size size);
521
525 virtual bool interpretRecord(const PDB::RecordORIGX3& record);
526 virtual bool fillRecord(const char* line, Size size, PDB::RecordORIGX3& record);
527 virtual bool parseRecordORIGX3(const char* line, Size size);
528
530 virtual bool interpretRecord(const PDB::RecordREMARK& record);
531 virtual bool fillRecord(const char* line, Size size, PDB::RecordREMARK& record);
532 virtual bool parseRecordREMARK(const char* line, Size size);
533
535 virtual bool interpretRecord(const PDB::RecordREVDAT& record);
536 virtual bool fillRecord(const char* line, Size size, PDB::RecordREVDAT& record);
537 virtual bool parseRecordREVDAT(const char* line, Size size);
538
540 virtual bool interpretRecord(const PDB::RecordSCALE1& record);
541 virtual bool fillRecord(const char* line, Size size, PDB::RecordSCALE1& record);
542 virtual bool parseRecordSCALE1(const char* line, Size size);
543
545 virtual bool interpretRecord(const PDB::RecordSCALE2& record);
546 virtual bool fillRecord(const char* line, Size size, PDB::RecordSCALE2& record);
547 virtual bool parseRecordSCALE2(const char* line, Size size);
548
550 virtual bool interpretRecord(const PDB::RecordSCALE3& record);
551 virtual bool fillRecord(const char* line, Size size, PDB::RecordSCALE3& record);
552 virtual bool parseRecordSCALE3(const char* line, Size size);
553
555 virtual bool interpretRecord(const PDB::RecordSEQADV& record);
556 virtual bool fillRecord(const char* line, Size size, PDB::RecordSEQADV& record);
557 virtual bool parseRecordSEQADV(const char* line, Size size);
558
560 virtual bool interpretRecord(const PDB::RecordSEQRES& record);
561 virtual bool fillRecord(const char* line, Size size, PDB::RecordSEQRES& record);
562 virtual bool parseRecordSEQRES(const char* line, Size size);
563
565 virtual bool interpretRecord(const PDB::RecordSHEET& record);
566 virtual bool fillRecord(const char* line, Size size, PDB::RecordSHEET& record);
567 virtual bool parseRecordSHEET(const char* line, Size size);
568
570 virtual bool interpretRecord(const PDB::RecordSIGATM& record);
571 virtual bool fillRecord(const char* line, Size size, PDB::RecordSIGATM& record);
572 virtual bool parseRecordSIGATM(const char* line, Size size);
573
577 virtual bool interpretRecord(const PDB::RecordSIGUIJ& record);
578 virtual bool fillRecord(const char* line, Size size, PDB::RecordSIGUIJ& record);
579 virtual bool parseRecordSIGUIJ(const char* line, Size size);
580
582 virtual bool interpretRecord(const PDB::RecordSITE& record);
583 virtual bool fillRecord(const char* line, Size size, PDB::RecordSITE& record);
584 virtual bool parseRecordSITE(const char* line, Size size);
585
587 virtual bool interpretRecord(const PDB::RecordSLTBRG& record);
588 virtual bool fillRecord(const char* line, Size size, PDB::RecordSLTBRG& record);
589 virtual bool parseRecordSLTBRG(const char* line, Size size);
590
594 virtual bool interpretRecord(const PDB::RecordSOURCE& record);
595 virtual bool fillRecord(const char* line, Size size, PDB::RecordSOURCE& record);
596 virtual bool parseRecordSOURCE(const char* line, Size size);
597
599 virtual bool interpretRecord(const PDB::RecordSPRSDE& record);
600 virtual bool fillRecord(const char* line, Size size, PDB::RecordSPRSDE& record);
601 virtual bool parseRecordSPRSDE(const char* line, Size size);
602
604 virtual bool interpretRecord(const PDB::RecordSSBOND& record);
605 virtual bool fillRecord(const char* line, Size size, PDB::RecordSSBOND& record);
606 virtual bool parseRecordSSBOND(const char* line, Size size);
607
609 virtual bool interpretRecord(const PDB::RecordTER& record);
610 virtual bool fillRecord(const char* line, Size size, PDB::RecordTER& record);
611 virtual bool parseRecordTER(const char* line, Size size);
612
614 virtual bool interpretRecord(const PDB::RecordTITLE& record);
615 virtual bool fillRecord(const char* line, Size size, PDB::RecordTITLE& record);
616 virtual bool parseRecordTITLE(const char* line, Size size);
617
619 virtual bool interpretRecord(const PDB::RecordTURN& record);
620 virtual bool fillRecord(const char* line, Size size, PDB::RecordTURN& record);
621 virtual bool parseRecordTURN(const char* line, Size size);
622
626 virtual bool interpretRecord(const PDB::RecordTVECT& record);
627 virtual bool fillRecord(const char* line, Size size, PDB::RecordTVECT& record);
628 virtual bool parseRecordTVECT(const char* line, Size size);
630
632 virtual bool hasFormat();
633
637 typedef std::list<ResidueQuadruple> QuadrupleList;
638 typedef std::list<SecondaryStructure*> SecStructList;
639
640
643
647 PDBFile& operator >> (Protein& protein);
648
652 PDBFile& operator >> (Molecule& molecule);
653
657 PDBFile& operator >> (System& system);
658
662 PDBFile& operator << (const Protein& protein);
663
667 PDBFile& operator << (const System& system);
668
672 PDBFile& operator << (const Molecule& molecule);
673
679 bool read(Protein& protein);
680
686 bool read(Molecule& protein);
687
693 bool read(System& system);
694
701
707 bool write(const Protein& protein);
708
714 bool write(const Molecule& molecule);
715
721 bool write(const System& system);
722
728 bool write(const System& system, const PDBInfo& info);
730
731 protected:
732
733 //_
734 PDBFile(const File& pdbf);
735
736 //_
737 PDBFile& operator = (const PDBFile& pdbf);
738
739 /*_ A helper function for initializing certain data structures. Used by
740 constructors.
741 */
742 void init_() ;
743
746 void postprocessSheetsTurns_(QuadrupleList& sectruct_list, SecStructList& new_secstruct_list);
748
749
750
751 // Method related to the writing of PDB files
752
753 //
754 void write_(const AtomContainer& ac, const PDBInfo& info = PDBInfo());
755
761 void writeRecord_(PDB::RecordType record, ...);
763
770 void writeRawRecord_(const char* format, const char* tag, ...);
771
773 void addAllRecords_(const PDBInfo& info, PDB::RecordType type);
774
776 void writeRecord_(const PDB::RecordSEQRES& seqres);
778 void writeRecord_(const PDB::RecordHELIX& helix);
780 void writeRecord_(const PDB::RecordSHEET& helix);
782 void writeRecord_(const PDB::RecordTURN& helix);
784 void writeRecord_(const PDB::RecordSSBOND& helix);
786 void writeRecord_(const PDB::RecordCONECT& helix);
788 void writeRecord_(const PDB::RecordCRYST1& cryst1);
790 void writeRecord_(const PDB::RecordMTRIX1& mtrix1);
792 void writeRecord_(const PDB::RecordMTRIX2& mtrix2);
794 void writeRecord_(const PDB::RecordMTRIX3& mtrix3);
795
796 void writeAtom_(const PDB::Structure::AtomEntry& atom, PDB::AdditionalAtomInfo& cr, bool hetatm = false);
797
798 void writeTitleSection_(const PDB::Structure& structure, const PDBInfo& info);
799 void writePrimaryStructureSection_(const PDB::Structure& structure, const PDBInfo& info);
800 void writeHeterogenSection_(const PDB::Structure& structure, const PDBInfo& info);
801 void writeSecondaryStructureSection_(const PDB::Structure& structure, const PDBInfo& info);
802 void writeConnectivityAnnotationSection_(const PDB::Structure& structure, const PDBInfo& info);
803 void writeMiscellaneousFeaturesSection_(const PDB::Structure& structure, const PDBInfo& info);
804 void writeCrystallographicSection_(const PDB::Structure& structure, const PDBInfo& info);
805 void writeCoordinateSection_(const PDB::Structure& structure, const PDBInfo& info);
806 void writeConnectivitySection_(const PDB::Structure& structure, const PDBInfo& info);
807 void writeBookKeepingSection_(const PDB::Structure& structure, const PDBInfo& info);
808
809 void writeSEQRESSection_(const std::vector<std::pair<char, String> >& chain_residues);
810 void writeHELIXSection_(const PDB::Structure& structure);
811 void writeSHEETSection_(const PDB::Structure& structure);
812 void writeTURNSection_(const PDB::Structure& structure);
813 void writeSSBONDSection_(const PDB::Structure& structure);
814 void writeHYDBNDSection_(const PDB::Structure& structure);
815 void writeSLTBRGSection_(const PDB::Structure& structure);
816 void writeCRYST1Section_(const PDB::Structure& structure);
817 void writeMTRIXnSection_(const PDB::Structure& structure);
818
822 static void extractStructure_(const AtomContainer& ac, PDB::Structure& structure);
823
827 static bool isHeteroAtom_(const Atom& atom);
828
835
836
837 char line_buffer_[PDB::SIZE_OF_PDB_LINE_BUFFER];
838
846
853
857
873
876
879
881
884
887
890
893
896
900 };
901
902
903
904
905
909 inline
911
912 {
913 return (Index)quadruple.third;
914 }
915
919 inline
921 {
922 return s;
923 }
924
925
926
927# ifndef BALL_NO_INLINE_FUNCTIONS
928# include <BALL/FORMAT/PDBFile.iC>
929# endif
930
931} // namespace BALL
932
933#endif // BALL_FORMAT_PDBFILE_H
BALL_EXPORT std::ostream & operator<<(std::ostream &os, const Exception::GeneralException &e)
HashIndex Hash(const T &key)
Definition hash.h:47
char Atom[5]
Definition PDBdefs.h:257
char Character
Definition PDBdefs.h:259
char AChar
Definition PDBdefs.h:255
long Integer
Definition PDBdefs.h:267
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_
Definition PDBFile.h:880
virtual bool interpretRecord(const PDB::RecordSLTBRG &record)
Reads a record defining a salt bridge.
void postprocessSheetsTurns_(QuadrupleList &sectruct_list, SecStructList &new_secstruct_list)
virtual bool fillRecord(const char *line, Size size, PDB::RecordOBSLTE &record)
virtual bool parseRecordSCALE3(const char *line, Size size)
bool readRecords()
void writeTitleSection_(const PDB::Structure &structure, const PDBInfo &info)
bool read_done_
Definition PDBFile.h:899
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_
Definition PDBFile.h:859
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)
String residue_name_
Definition PDBFile.h:839
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)
PDB::AChar code_
Definition PDBFile.h:862
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_
Definition PDBFile.h:851
void writeTURNSection_(const PDB::Structure &structure)
virtual bool fillRecord(const char *line, Size size, PDB::RecordHETNAM &record)
PDB::RecordType current_record_type_
Definition PDBFile.h:844
QuadrupleList ssbond_list_
Definition PDBFile.h:849
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_
Definition PDBFile.h:845
virtual ~PDBFile()
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?
Definition PDBFile.h:892
virtual bool fillRecord(const char *line, Size size, PDB::RecordSHEET &record)
const Atom * current_const_atom_
Definition PDBFile.h:870
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)
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_
Definition PDBFile.h:861
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_.
Definition PDBFile.h:883
Index residue_sequence_number_
Definition PDBFile.h:840
virtual bool interpretRecord(const PDB::RecordCAVEAT &record)
Reads a caveat record.
Size countRecords(bool from_begin_of_file=true)
const Protein * current_const_protein_
Definition PDBFile.h:864
virtual bool fillRecord(const char *line, Size size, PDB::RecordSCALE3 &record)
virtual bool interpretRecord(const PDB::RecordREMARK &record)
Reads a record containing remarks.
virtual bool parseRecordHEADER(const char *line, Size size)
QuadrupleList turn_list_
Definition PDBFile.h:852
virtual bool fillRecord(const char *line, Size size, PDB::RecordTER &record)
String name_
Definition PDBFile.h:871
PDBInfo info
Summary information on the last file read.
Definition PDBFile.h:172
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_
Definition PDBFile.h:866
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
Definition PDBFile.h:878
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?
Definition PDBFile.h:886
std::list< ResidueQuadruple > QuadrupleList
Definition PDBFile.h:637
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_
Definition PDBFile.h:863
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_
Definition PDBFile.h:868
virtual bool interpretRecord(const PDB::RecordSCALE3 &record)
Reads a scale transformation record.
bool ignore_xplor_pseudo_atoms_
Ignore XPLOR pseudo atoms?
Definition PDBFile.h:889
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)
PDB::Character chain_ID_
Definition PDBFile.h:860
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)
ResidueMap residue_map_
Definition PDBFile.h:848
virtual bool fillRecord(const char *line, Size size, PDB::RecordDBREF &record)
HashMap< const Atom *, Position > atom_map_
Definition PDBFile.h:872
Index current_record_
Definition PDBFile.h:842
virtual bool interpretRecord(const PDB::RecordSEQADV &record)
Sequence information conflicts between atom records and dbref content.
HashMap< ResidueQuadruple, Residue * > ResidueMap
Definition PDBFile.h:636
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.
Chain * current_chain_
Definition PDBFile.h:865
virtual bool parseRecordHET(const char *line, Size size)
virtual bool parseRecordANISOU(const char *line, Size size)
virtual bool parseRecordFORMUL(const char *line, Size size)
HashMap< PDB::Integer, PDBAtom * > PDBAtomMap
Definition PDBFile.h:634
virtual bool interpretRecord(const PDB::RecordMTRIX1 &record)
virtual bool fillRecord(const char *line, Size size, PDB::RecordHETATM &record)
Quadruple< String, PDB::Character, PDB::Integer, PDB::AChar > ResidueQuadruple
Definition PDBFile.h:635
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.
Definition PDBFile.h:875
PDBAtomMap PDB_atom_map_
Definition PDBFile.h:847
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?
Definition PDBFile.h:895
SecStructList new_turn_secstruc_list_
Definition PDBFile.h:856
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_
Definition PDBFile.h:854
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_
Definition PDBFile.h:867
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)
Molecule * read()
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_
Definition PDBFile.h:858
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_
Definition PDBFile.h:869
bool read(Protein &protein)
std::list< SecondaryStructure * > SecStructList
Definition PDBFile.h:638
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_()
Size record_fields_
Definition PDBFile.h:843
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_
Definition PDBFile.h:855
void writeRecord_(const PDB::RecordCONECT &helix)
void writeMiscellaneousFeaturesSection_(const PDB::Structure &structure, const PDBInfo &info)
virtual bool parseRecordORIGX2(const char *line, Size size)
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_
Definition PDBFile.h:850
virtual bool interpretRecord(const PDB::RecordCOMPND &record)
Reads the title record containing macroscopic compoubd information.
bool skipCurrentRecord()
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)
Index current_model_
Definition PDBFile.h:841
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.
Definition PDBFile.h:170
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
Definition PDBFile.h:98
static const char * CHOOSE_MODEL
Definition PDBFile.h:91
static const char * VERBOSITY
Definition PDBFile.h:74
static const char * IGNORE_XPLOR_PSEUDO_ATOMS
Definition PDBFile.h:105
static const char * PARSE_PARTIAL_CHARGES
Definition PDBFile.h:112
static const char * STRICT_LINE_CHECKING
Definition PDBFile.h:82
static const char * WRITE_PDBFORMAT_1996
Definition PDBFile.h:118
static const bool WRITE_PDBFORMAT_1996
Definition PDBFile.h:162
static const Index VERBOSITY
Definition PDBFile.h:129
static const bool STORE_SKIPPED_RECORDS
Definition PDBFile.h:146
static const bool STRICT_LINE_CHECKING
Definition PDBFile.h:135
static const Index CHOOSE_MODEL
Definition PDBFile.h:141
static const bool PARSE_PARTIAL_CHARGES
Definition PDBFile.h:156
static const bool IGNORE_XPLOR_PSEUDO_ATOMS
Definition PDBFile.h:151
std::ios::openmode OpenMode
Definition file.h:165
#define BALL_EXPORT