00001
00002
00003
00004
00005
00006
00007 #ifndef BALL_FORMAT_PDBDEFS_H
00008 #define BALL_FORMAT_PDBDEFS_H
00009
00010 #ifndef BALL_COMMON_H
00011 # include <BALL/common.h>
00012 #endif
00013
00014 #ifndef BALL_KERNEL_ATOM_H
00015 # include <BALL/KERNEL/atom.h>
00016 #endif
00017
00018 #ifndef BALL_KERNEL_SECONDARYSTRUCTURE_H
00019 # include <BALL/KERNEL/secondaryStructure.h>
00020 #endif
00021
00022 #ifndef BALL_KERNEL_CHAIN_H
00023 # include <BALL/KERNEL/chain.h>
00024 #endif
00025
00026 #ifndef BALL_KERNEL_RESIDUE_H
00027 # include <BALL/KERNEL/residue.h>
00028 #endif
00029
00030 #ifndef BALL_DATATYPES_HASHSET_H
00031 # include <BALL/DATATYPE/hashSet.h>
00032 #endif
00033
00034 namespace BALL
00035 {
00036
00037
00043 namespace PDB
00044 {
00047 enum
00048 {
00049 SIZE_OF_PDB_RECORD_LINE = 80,
00050 SIZE_OF_PDB_LINE_BUFFER = 256,
00051 SIZE_OF_FORMAT_STRING_BUFFER = 256
00052 };
00053
00056 enum RecordType
00057 {
00058 RECORD_TYPE__UNKNOWN = 0,
00059 RECORD_TYPE__ANISOU,
00060 RECORD_TYPE__ATOM,
00061 RECORD_TYPE__AUTHOR,
00062 RECORD_TYPE__CAVEAT,
00063 RECORD_TYPE__CISPEP,
00064 RECORD_TYPE__COMPND,
00065 RECORD_TYPE__CONECT,
00066 RECORD_TYPE__CRYST1,
00067 RECORD_TYPE__DBREF,
00068 RECORD_TYPE__END,
00069 RECORD_TYPE__ENDMDL,
00070 RECORD_TYPE__EXPDTA,
00071 RECORD_TYPE__FORMUL,
00072 RECORD_TYPE__FTNOTE,
00073 RECORD_TYPE__HEADER,
00074 RECORD_TYPE__HELIX,
00075 RECORD_TYPE__HET,
00076 RECORD_TYPE__HETATM,
00077 RECORD_TYPE__HETNAM,
00078 RECORD_TYPE__HETSYN,
00079 RECORD_TYPE__HYDBND,
00080 RECORD_TYPE__JRNL,
00081 RECORD_TYPE__KEYWDS,
00082 RECORD_TYPE__LINK,
00083 RECORD_TYPE__MASTER,
00084 RECORD_TYPE__MODEL,
00085 RECORD_TYPE__MODRES,
00086 RECORD_TYPE__MTRIX1,
00087 RECORD_TYPE__MTRIX2,
00088 RECORD_TYPE__MTRIX3,
00089 RECORD_TYPE__OBSLTE,
00090 RECORD_TYPE__ORIGX1,
00091 RECORD_TYPE__ORIGX2,
00092 RECORD_TYPE__ORIGX3,
00093 RECORD_TYPE__REMARK,
00094 RECORD_TYPE__REVDAT,
00095 RECORD_TYPE__SCALE1,
00096 RECORD_TYPE__SCALE2,
00097 RECORD_TYPE__SCALE3,
00098 RECORD_TYPE__SEQADV,
00099 RECORD_TYPE__SEQRES,
00100 RECORD_TYPE__SHEET,
00101 RECORD_TYPE__SIGATM,
00102 RECORD_TYPE__SIGUIJ,
00103 RECORD_TYPE__SITE,
00104 RECORD_TYPE__SLTBRG,
00105 RECORD_TYPE__SOURCE,
00106 RECORD_TYPE__SPRSDE,
00107 RECORD_TYPE__SSBOND,
00108 RECORD_TYPE__TER,
00109 RECORD_TYPE__TITLE,
00110 RECORD_TYPE__TURN,
00111 RECORD_TYPE__TVECT,
00112
00113 NUMBER_OF_REGISTERED_RECORD_TYPES,
00114
00115 ALL_RECORD_TYPES
00116 };
00117
00120 BALL_EXPORT extern const char* FORMAT_UNKNOWN;
00121 BALL_EXPORT extern const char* FORMAT_ANISOU;
00122 BALL_EXPORT extern const char* FORMAT_ATOM;
00123 BALL_EXPORT extern const char* FORMAT_ATOM_PARTIAL_CRG;
00124 BALL_EXPORT extern const char* FORMAT_AUTHOR;
00125 BALL_EXPORT extern const char* FORMAT_CAVEAT;
00126 BALL_EXPORT extern const char* FORMAT_CISPEP;
00127 BALL_EXPORT extern const char* FORMAT_COMPND;
00128 BALL_EXPORT extern const char* FORMAT_CONECT;
00129 BALL_EXPORT extern const char* FORMAT_CRYST1;
00130 BALL_EXPORT extern const char* FORMAT_DBREF;
00131 BALL_EXPORT extern const char* FORMAT_END;
00132 BALL_EXPORT extern const char* FORMAT_ENDMDL;
00133 BALL_EXPORT extern const char* FORMAT_EXPDTA;
00134 BALL_EXPORT extern const char* FORMAT_FORMUL;
00135 BALL_EXPORT extern const char* FORMAT_FTNOTE;
00136 BALL_EXPORT extern const char* FORMAT_HEADER;
00137 BALL_EXPORT extern const char* FORMAT_HELIX;
00138 BALL_EXPORT extern const char* FORMAT_HET;
00139 BALL_EXPORT extern const char* FORMAT_HETATM;
00140 BALL_EXPORT extern const char* FORMAT_HETNAM;
00141 BALL_EXPORT extern const char* FORMAT_HETSYN;
00142 BALL_EXPORT extern const char* FORMAT_HYDBND;
00143 BALL_EXPORT extern const char* FORMAT_JRNL;
00144 BALL_EXPORT extern const char* FORMAT_KEYWDS;
00145 BALL_EXPORT extern const char* FORMAT_LINK;
00146 BALL_EXPORT extern const char* FORMAT_MASTER;
00147 BALL_EXPORT extern const char* FORMAT_MODEL;
00148 BALL_EXPORT extern const char* FORMAT_MODRES;
00149 BALL_EXPORT extern const char* FORMAT_MTRIX1;
00150 BALL_EXPORT extern const char* FORMAT_MTRIX2;
00151 BALL_EXPORT extern const char* FORMAT_MTRIX3;
00152 BALL_EXPORT extern const char* FORMAT_OBSLTE;
00153 BALL_EXPORT extern const char* FORMAT_ORIGX1;
00154 BALL_EXPORT extern const char* FORMAT_ORIGX2;
00155 BALL_EXPORT extern const char* FORMAT_ORIGX3;
00156 BALL_EXPORT extern const char* FORMAT_REMARK;
00157 BALL_EXPORT extern const char* FORMAT_REVDAT;
00158 BALL_EXPORT extern const char* FORMAT_SCALE1;
00159 BALL_EXPORT extern const char* FORMAT_SCALE2;
00160 BALL_EXPORT extern const char* FORMAT_SCALE3;
00161 BALL_EXPORT extern const char* FORMAT_SEQADV;
00162 BALL_EXPORT extern const char* FORMAT_SEQRES;
00163 BALL_EXPORT extern const char* FORMAT_SHEET;
00164 BALL_EXPORT extern const char* FORMAT_SIGATM;
00165 BALL_EXPORT extern const char* FORMAT_SIGUIJ;
00166 BALL_EXPORT extern const char* FORMAT_SITE;
00167 BALL_EXPORT extern const char* FORMAT_SLTBRG;
00168 BALL_EXPORT extern const char* FORMAT_SOURCE;
00169 BALL_EXPORT extern const char* FORMAT_SPRSDE;
00170 BALL_EXPORT extern const char* FORMAT_SSBOND;
00171 BALL_EXPORT extern const char* FORMAT_TER;
00172 BALL_EXPORT extern const char* FORMAT_TITLE;
00173 BALL_EXPORT extern const char* FORMAT_TURN;
00174 BALL_EXPORT extern const char* FORMAT_TVECT;
00176
00179 BALL_EXPORT extern const char* RECORD_TAG_ANISOU;
00180 BALL_EXPORT extern const char* RECORD_TAG_ATOM;
00181 BALL_EXPORT extern const char* RECORD_TAG_AUTHOR;
00182 BALL_EXPORT extern const char* RECORD_TAG_CAVEAT;
00183 BALL_EXPORT extern const char* RECORD_TAG_CISPEP;
00184 BALL_EXPORT extern const char* RECORD_TAG_COMPND;
00185 BALL_EXPORT extern const char* RECORD_TAG_CONECT;
00186 BALL_EXPORT extern const char* RECORD_TAG_CRYST1;
00187 BALL_EXPORT extern const char* RECORD_TAG_DBREF;
00188 BALL_EXPORT extern const char* RECORD_TAG_END;
00189 BALL_EXPORT extern const char* RECORD_TAG_ENDMDL;
00190 BALL_EXPORT extern const char* RECORD_TAG_EXPDTA;
00191 BALL_EXPORT extern const char* RECORD_TAG_FORMUL;
00192 BALL_EXPORT extern const char* RECORD_TAG_FTNOTE;
00193 BALL_EXPORT extern const char* RECORD_TAG_HEADER;
00194 BALL_EXPORT extern const char* RECORD_TAG_HELIX;
00195 BALL_EXPORT extern const char* RECORD_TAG_HET;
00196 BALL_EXPORT extern const char* RECORD_TAG_HETATM;
00197 BALL_EXPORT extern const char* RECORD_TAG_HETNAM;
00198 BALL_EXPORT extern const char* RECORD_TAG_HETSYN;
00199 BALL_EXPORT extern const char* RECORD_TAG_HYDBND;
00200 BALL_EXPORT extern const char* RECORD_TAG_JRNL;
00201 BALL_EXPORT extern const char* RECORD_TAG_KEYWDS;
00202 BALL_EXPORT extern const char* RECORD_TAG_LINK;
00203 BALL_EXPORT extern const char* RECORD_TAG_MASTER;
00204 BALL_EXPORT extern const char* RECORD_TAG_MODEL;
00205 BALL_EXPORT extern const char* RECORD_TAG_MODRES;
00206 BALL_EXPORT extern const char* RECORD_TAG_MTRIX1;
00207 BALL_EXPORT extern const char* RECORD_TAG_MTRIX2;
00208 BALL_EXPORT extern const char* RECORD_TAG_MTRIX3;
00209 BALL_EXPORT extern const char* RECORD_TAG_OBSLTE;
00210 BALL_EXPORT extern const char* RECORD_TAG_ORIGX1;
00211 BALL_EXPORT extern const char* RECORD_TAG_ORIGX2;
00212 BALL_EXPORT extern const char* RECORD_TAG_ORIGX3;
00213 BALL_EXPORT extern const char* RECORD_TAG_REMARK;
00214 BALL_EXPORT extern const char* RECORD_TAG_REVDAT;
00215 BALL_EXPORT extern const char* RECORD_TAG_SCALE1;
00216 BALL_EXPORT extern const char* RECORD_TAG_SCALE2;
00217 BALL_EXPORT extern const char* RECORD_TAG_SCALE3;
00218 BALL_EXPORT extern const char* RECORD_TAG_SEQADV;
00219 BALL_EXPORT extern const char* RECORD_TAG_SEQRES;
00220 BALL_EXPORT extern const char* RECORD_TAG_SHEET;
00221 BALL_EXPORT extern const char* RECORD_TAG_SIGATM;
00222 BALL_EXPORT extern const char* RECORD_TAG_SIGUIJ;
00223 BALL_EXPORT extern const char* RECORD_TAG_SITE;
00224 BALL_EXPORT extern const char* RECORD_TAG_SLTBRG;
00225 BALL_EXPORT extern const char* RECORD_TAG_SOURCE;
00226 BALL_EXPORT extern const char* RECORD_TAG_SPRSDE;
00227 BALL_EXPORT extern const char* RECORD_TAG_SSBOND;
00228 BALL_EXPORT extern const char* RECORD_TAG_TER;
00229 BALL_EXPORT extern const char* RECORD_TAG_TITLE;
00230 BALL_EXPORT extern const char* RECORD_TAG_TURN;
00231 BALL_EXPORT extern const char* RECORD_TAG_TVECT;
00233
00237
00238 typedef char AChar;
00240 typedef char Atom[5];
00242 typedef char Character;
00244 typedef long Continuation;
00246 typedef char Date[10];
00248 typedef char IDcode[5];
00250 typedef long Integer;
00252 typedef char PDBList[SIZE_OF_PDB_RECORD_LINE + 1];
00254 typedef char LString[SIZE_OF_PDB_RECORD_LINE + 1];
00256 typedef char LString2[3];
00258 typedef char LString3[4];
00260 typedef char LString4[5];
00262 typedef char LString5[6];
00264 typedef char LString6[7];
00266 typedef char LString7[8];
00268 typedef char LString8[9];
00270 typedef char LString9[10];
00272 typedef char LString10[11];
00274 typedef char LString11[12];
00276 typedef char LString12[13];
00278 typedef char LString13[14];
00280 typedef char LString21[22];
00282 typedef double Real;
00284 typedef char RecordName[7];
00286 typedef char ResidueName[4];
00288 typedef char SList[SIZE_OF_PDB_RECORD_LINE + 1];
00290 typedef char Specification[SIZE_OF_PDB_RECORD_LINE + 1];
00292 typedef char SpecificationList[SIZE_OF_PDB_RECORD_LINE + 1];
00294 typedef char PDBString[SIZE_OF_PDB_RECORD_LINE + 1];
00296 typedef char String2[3];
00298 typedef char String3[4];
00300 typedef char String4[5];
00302 typedef char String5[6];
00304 typedef char String40[41];
00306 typedef long SymmetryOperator;
00308
00312
00315 struct BALL_EXPORT RecordTypeFormat
00316 {
00317 public:
00318 RecordType record_type;
00319 char string[7];
00320 const char* format_string;
00321 };
00322
00323 struct BALL_EXPORT Residue
00324 {
00325 ResidueName name;
00326 Character chain_ID;
00327 Integer sequence_number;
00328 AChar insertion_code;
00329
00330 Residue() { clear(); }
00331 void clear()
00332 {
00333 name[0] = '\0';
00334 chain_ID = ' ';
00335 sequence_number = 0;
00336 insertion_code = ' ';
00337 }
00338 void set(const ::BALL::Residue& residue)
00339 {
00340 strncpy(name, residue.getName().c_str(), 3);
00341 sequence_number = residue.getID().toInt();
00342 const Chain* chain = residue.getChain();
00343 chain_ID = (chain == 0 ? ' ' : chain->getName().c_str()[0]);
00344 insertion_code = residue.getInsertionCode();
00345 }
00346 };
00347
00348
00351 struct BALL_EXPORT RecordUNKNOWN
00352 {
00353 Real max_record_size[SIZE_OF_PDB_RECORD_LINE];
00354 };
00355
00358 struct BALL_EXPORT RecordANISOU
00359 {
00360 RecordType record_type;
00361 RecordName record_name;
00362 Integer serial_number;
00363 Atom atom_name;
00364 Character alternate_location_indicator;
00365 Residue residue;
00366 Integer u11;
00367 Integer u22;
00368 Integer u33;
00369 Integer u12;
00370 Integer u13;
00371 Integer u23;
00372 LString4 segment_ID;
00373 LString2 element_symbol;
00374 LString2 charge;
00375 };
00376
00379 struct BALL_EXPORT RecordATOM
00380 {
00381 RecordType record_type;
00382 RecordName record_name;
00383 Integer serial_number;
00384 Atom atom_name;
00385 Character alternate_location_indicator;
00386 Residue residue;
00387 Real orthogonal_vector[3];
00388 Real occupancy;
00389 Real temperature_factor;
00390 LString4 segment_ID;
00391 LString2 element_symbol;
00392 LString2 charge;
00393 LString4 partial_charge;
00394 };
00395
00398 struct BALL_EXPORT RecordAUTHOR
00399 {
00400 RecordType record_type;
00401 RecordName record_name;
00402 Continuation continuation;
00403 PDBList authors;
00404 };
00405
00408 struct BALL_EXPORT RecordCAVEAT
00409 {
00410 RecordType record_type;
00411 RecordName record_name;
00412 Continuation continuation;
00413 IDcode entry_code;
00414 PDBString comment;
00415 };
00416
00419 struct BALL_EXPORT RecordCISPEP
00420 {
00422 RecordType record_type;
00423 RecordName record_name;
00424 Integer record_serial_number;
00425 Residue residue[2];
00426 Integer specific_model_ID;
00427 Real angle_measure;
00428 };
00429
00432 struct BALL_EXPORT RecordCOMPND
00433 {
00434 RecordType record_type;
00435 RecordName record_name;
00436 Continuation continuation;
00437 SpecificationList component_description;
00438 };
00439
00442 struct BALL_EXPORT RecordCONECT
00443 {
00444 RecordType record_type;
00445 RecordName record_name;
00446 Integer atom_serial_number;
00447 Integer bond_atom[4];
00448 Integer hbond_atom[4];
00449 Integer salt_bridge_atom[2];
00450
00451 void clear()
00452 {
00453 record_type = PDB::RECORD_TYPE__CONECT;
00454 record_name[0] = '\0';
00455 atom_serial_number = 0;
00456 bond_atom[0] = bond_atom[1] = bond_atom[2] = bond_atom[3] = 0;
00457 hbond_atom[0] = hbond_atom[1] = hbond_atom[2] = hbond_atom[3] = 0;
00458 salt_bridge_atom[0] = salt_bridge_atom[1] = 0;
00459 }
00460 };
00461
00464 struct BALL_EXPORT RecordCRYST1
00465 {
00466 RecordType record_type;
00467 RecordName record_name;
00469 struct UnitCell
00470 {
00471 Real a;
00472 Real b;
00473 Real c;
00474 Real alpha;
00475 Real beta;
00476 Real gamma;
00477 LString space_group;
00478 Integer z_value;
00479 } unit_cell;
00480 };
00481
00484 struct BALL_EXPORT RecordDBREF
00485 {
00486 RecordType record_type;
00487 RecordName record_name;
00488 IDcode entry_code;
00489 Character chain_ID;
00491 struct InitialSequence
00492 {
00493 Integer number;
00494 AChar insertion_code;
00495 } initial_sequence;
00497 struct EndingSequence
00498 {
00499 Integer number;
00500 AChar insertion_code;
00501 } ending_sequence;
00502 LString6 sequence_database_name;
00503 LString8 sequence_database_accession_code;
00504 LString12 sequence_database_ID_code;
00506 struct InitialDatabaseSegment
00507 {
00508 Integer number;
00509 AChar insertion_code;
00510 } initial_database_segment;
00512 struct EndingDatabaseSegment
00513 {
00514 Integer number;
00515 AChar insertion_code;
00516 } ending_database_segment;
00517 };
00518
00520 struct BALL_EXPORT RecordEND
00521 {
00522 RecordType record_type;
00523 RecordName record_name;
00524 };
00525
00527 struct BALL_EXPORT RecordENDMDL
00528 {
00529 RecordType record_type;
00530 RecordName record_name;
00531 };
00532
00534 struct BALL_EXPORT RecordEXPDTA
00535 {
00536 RecordType record_type;
00537 RecordName record_name;
00538 Continuation continuation;
00539 SList technique;
00540 };
00541
00543 struct BALL_EXPORT RecordFORMUL
00544 {
00545 RecordType record_type;
00546 RecordName record_name;
00547 Integer component_number;
00548 LString3 het_ID;
00549 Integer continuation_number;
00550 Character is_water;
00551 PDBString chemical_formula;
00552 };
00553
00555 struct BALL_EXPORT RecordFTNOTE
00556 {
00557 RecordType record_type;
00558 RecordName record_name;
00559 Integer number;
00560 PDBString text;
00561 };
00562
00564 struct BALL_EXPORT RecordHEADER
00565 {
00566 RecordType record_type;
00567 RecordName record_name;
00568 String40 classification;
00569 Date deposition_date;
00570 IDcode ID_code;
00571 };
00572
00574 struct BALL_EXPORT RecordHELIX
00575 {
00576 RecordType record_type;
00577 RecordName record_name;
00578 Integer serial_number;
00579 LString3 helix_ID;
00580 Residue initial_residue;
00581 Residue terminal_residue;
00582 Integer helix_class;
00583 PDBString comment;
00584 Integer length;
00585
00586 RecordHELIX() { clear(); }
00587 void clear()
00588 {
00589 record_type = RECORD_TYPE__HELIX;
00590 strncpy(record_name, RECORD_TAG_HELIX, 6);
00591 serial_number = 0;
00592 helix_ID[0] = '\0';
00593 initial_residue.clear();
00594 terminal_residue.clear();
00595 helix_class = 0;
00596 comment[0] = '\0';
00597 length = 0;
00598 }
00599 };
00600
00602 struct BALL_EXPORT RecordHET
00603 {
00604 RecordType record_type;
00605 RecordName record_name;
00606 Residue residue;
00607 Integer number_of_HETATM_records;
00608 PDBString text;
00609 };
00610
00612 struct BALL_EXPORT RecordHETATM
00613 {
00614 RecordType record_type;
00615 RecordName record_name;
00616 Integer serial_number;
00617 Atom atom_name;
00618 Character alternate_location_indicator;
00619 Residue residue;
00620 Real orthogonal_vector[3];
00621 Real occupancy;
00622 Real temperature_factor;
00623 LString4 segment_ID;
00624 LString2 element_symbol;
00625 LString2 charge;
00626 };
00627
00629 struct BALL_EXPORT RecordHETNAM
00630 {
00631 RecordType record_type;
00632 RecordName record_name;
00633 Continuation continuation;
00634 LString3 het_ID;
00635 PDBString chemical_name;
00636 };
00637
00639 struct BALL_EXPORT RecordHETSYN
00640 {
00641 RecordType record_type;
00642 RecordName record_name;
00643 Continuation continuation;
00644 LString3 het_ID;
00645 SList het_synonyms;
00646 };
00647
00649 struct BALL_EXPORT RecordHYDBND
00650 {
00651 RecordType record_type;
00652 RecordName record_name;
00654 struct BALL_EXPORT HydrogenPartnerAtom
00655 {
00656 Atom atom_name;
00657 Character alternate_location_indicator;
00658 Residue residue;
00659 };
00660
00661 HydrogenPartnerAtom hydrogen_partner_atom[2];
00663 struct BALL_EXPORT HydrogenAtom
00664 {
00665 Atom atom_name;
00666 Character alternate_location_indicator;
00667 Residue residue;
00668 };
00669 HydrogenAtom hydrogen_atom;
00670 SymmetryOperator first_non_hydrogen_atom;
00671 SymmetryOperator second_non_hydrogen_atom;
00672 };
00673
00675 struct BALL_EXPORT RecordJRNL
00676 {
00677 RecordType record_type;
00678 RecordName record_name;
00679 LString text;
00680 };
00682 struct BALL_EXPORT RecordKEYWDS
00683 {
00684 RecordType record_type;
00685 RecordName record_name;
00686 Continuation continuation;
00687 PDBList keywords;
00688 };
00690 struct BALL_EXPORT RecordLINK
00691 {
00692 RecordType record_type;
00693 RecordName record_name;
00695 struct BALL_EXPORT LinkPartner
00696 {
00697 Atom atom_name;
00698 Character alternate_location_indicator;
00699 Residue residue;
00700 };
00701 LinkPartner link_partner[2];
00702 SymmetryOperator first_atom;
00703 SymmetryOperator second_atom;
00704 };
00706 struct BALL_EXPORT RecordMASTER
00707 {
00708 RecordType record_type;
00709 RecordName record_name;
00710 Integer number_of_REMARK_records;
00711 Integer zero;
00712 Integer number_of_HET_records;
00713 Integer number_of_HELIX_records;
00714 Integer number_of_SHEET_records;
00715 Integer number_of_TURN_records;
00716 Integer number_of_SITE_records;
00717 Integer number_of_ORIGX_SCALE_MTRIX_records;
00718 Integer number_of_ATOM_HETATM_records;
00719 Integer number_of_TER_records;
00720 Integer number_of_CONECT_records;
00721 Integer number_of_SEQRES_records;
00722
00723 RecordMASTER() { clear(); }
00724 void clear()
00725 {
00726 record_type = RECORD_TYPE__MASTER;
00727 strcpy(record_name, RECORD_TAG_MASTER);
00728 zero = number_of_HET_records = number_of_HELIX_records
00729 = number_of_SHEET_records = number_of_TURN_records
00730 = number_of_SITE_records = number_of_ORIGX_SCALE_MTRIX_records
00731 = number_of_ATOM_HETATM_records = number_of_TER_records
00732 = number_of_CONECT_records = number_of_SEQRES_records = 0;
00733 }
00734 };
00736 struct BALL_EXPORT RecordMODEL
00737 {
00738 RecordType record_type;
00739 RecordName record_name;
00740 Integer model_serial_number;
00741 };
00743 struct BALL_EXPORT RecordMODRES
00744 {
00745 RecordType record_type;
00746 RecordName record_name;
00747 IDcode entry_code;
00748 Residue residue;
00749 ResidueName standard_residue_name;
00750 PDBString comment;
00751 };
00753 struct BALL_EXPORT RecordMTRIX1
00754 {
00755 RecordType record_type;
00756 RecordName record_name;
00757 Integer serial_number;
00758 Real transformation_matrix[4];
00759 Integer is_given;
00760 };
00762 struct BALL_EXPORT RecordMTRIX2
00763 {
00764 RecordType record_type;
00765 RecordName record_name;
00766 Integer serial_number;
00767 Real transformation_matrix[4];
00768 Integer is_given;
00769 };
00771 struct BALL_EXPORT RecordMTRIX3
00772 {
00773 RecordType record_type;
00774 RecordName record_name;
00775 Integer serial_number;
00776 Real transformation_matrix[4];
00777 Integer is_given;
00778 };
00780 struct BALL_EXPORT RecordOBSLTE
00781 {
00782 RecordType record_type;
00783 RecordName record_name;
00784 Continuation continuation;
00785 Date entry_replaced_date;
00786 IDcode entry_code;
00787 IDcode replacing_entry_code[8];
00788 };
00790 struct BALL_EXPORT RecordORIGX1
00791 {
00792 RecordType record_type;
00793 RecordName record_name;
00794 Real transformation_matrix[4];
00795 };
00797 struct BALL_EXPORT RecordORIGX2
00798 {
00799 RecordType record_type;
00800 RecordName record_name;
00801 Real transformation_matrix[4];
00802 };
00804 struct BALL_EXPORT RecordORIGX3
00805 {
00806 RecordType record_type;
00807 RecordName record_name;
00808 Real transformation_matrix[4];
00809 };
00811 struct BALL_EXPORT RecordREMARK
00812 {
00813 RecordType record_type;
00814 RecordName record_name;
00815 Integer remark_number;
00816 LString text;
00817 };
00819 struct BALL_EXPORT RecordREVDAT
00820 {
00821 RecordType record_type;
00822 RecordName record_name;
00823 Integer modification_number;
00824 Continuation continuation;
00825 Date modification_date;
00826 String5 modification_ID;
00827 Integer modification_type;
00828 LString6 name_of_modified_record[4];
00829 };
00830
00832 struct BALL_EXPORT RecordSCALE1
00833 {
00834 RecordType record_type;
00835 RecordName record_name;
00836 Real transformation_matrix[4];
00837 };
00838
00840 struct BALL_EXPORT RecordSCALE2
00841 {
00842 RecordType record_type;
00843 RecordName record_name;
00844 Real transformation_matrix[4];
00845 };
00846
00848 struct BALL_EXPORT RecordSCALE3
00849 {
00850 RecordType record_type;
00851 RecordName record_name;
00852 Real transformation_matrix[4];
00853 };
00854
00856 struct BALL_EXPORT RecordSEQADV
00857 {
00858 RecordType record_type;
00859 RecordName record_name;
00860 IDcode id_code;
00861 Residue residue;
00862 LString4 database;
00863 LString9 db_id_code;
00864 LString3 db_res;
00865 Integer db_seq;
00866 LString21 comment;
00867 };
00868
00870 struct BALL_EXPORT RecordSEQRES
00871 {
00872 RecordType record_type;
00873 RecordName record_name;
00874 Integer serial_number;
00875 Character chain_ID;
00876 Integer number_of_residues_in_chain;
00877 ResidueName residue_name[13];
00878
00879 RecordSEQRES()
00880 {
00881 clear();
00882 }
00883
00884 void clear()
00885 {
00886 record_type = RECORD_TYPE__SEQRES;
00887 strncpy(record_name, RECORD_TAG_SEQRES, 6);
00888 serial_number = 0;
00889 chain_ID = ' ';
00890 number_of_residues_in_chain = 0L;
00891 residue_name[0][0] = '\0';
00892 residue_name[1][0] = '\0';
00893 residue_name[2][0] = '\0';
00894 residue_name[3][0] = '\0';
00895 residue_name[4][0] = '\0';
00896 residue_name[5][0] = '\0';
00897 residue_name[6][0] = '\0';
00898 residue_name[7][0] = '\0';
00899 residue_name[8][0] = '\0';
00900 residue_name[9][0] = '\0';
00901 residue_name[10][0] = '\0';
00902 residue_name[11][0] = '\0';
00903 residue_name[12][0] = '\0';
00904 }
00905 };
00906
00908 struct BALL_EXPORT RecordSHEET
00909 {
00910 RecordType record_type;
00911 RecordName record_name;
00912 Integer strand_number;
00913 LString3 sheet_ID;
00914 Integer number_of_strands;
00915 Residue initial_residue;
00916 Residue terminal_residue;
00917 Integer sense_of_strand;
00918 Atom atom_name_in_current_strand;
00919 Residue residue_in_current_strand;
00920 Atom atom_name_in_previous_strand;
00921 Residue residue_in_previous_strand;
00922
00923 RecordSHEET() { clear(); }
00924 void clear()
00925 {
00926 record_type = RECORD_TYPE__SHEET;
00927 strncpy(record_name, RECORD_TAG_SHEET, 6);
00928 strand_number = 0;
00929 sheet_ID[0] = '\0';;
00930 number_of_strands = 0;
00931 initial_residue.clear();
00932 terminal_residue.clear();
00933 sense_of_strand = 0;
00934 atom_name_in_current_strand[0] = '\0';
00935 residue_in_current_strand.clear();
00936 atom_name_in_previous_strand[0] = '\0';
00937 residue_in_previous_strand.clear();
00938 }
00939 };
00940
00942 struct BALL_EXPORT RecordSIGATM
00943 {
00944 RecordType record_type;
00945 RecordName record_name;
00946 Integer serial_number;
00947 Atom atom_name;
00948 Character alternate_location_indicator;
00949 Residue residue;
00950 Real standard_vector_deviation[3];
00951 Real standard_occupancy_deviation;
00952 Real standard_temperature_deviation;
00953 LString4 segment_ID;
00954 LString2 element_symbol;
00955 LString2 charge;
00956 };
00957
00959 struct BALL_EXPORT RecordSIGUIJ
00960 {
00961 RecordType record_type;
00962 RecordName record_name;
00963 Integer serial_number;
00964 Atom atom_name;
00965 Character alternate_location_indicator;
00966 Residue residue;
00967 Integer sig11;
00968 Integer sig22;
00969 Integer sig33;
00970 Integer sig12;
00971 Integer sig13;
00972 Integer sig23;
00973 LString4 segment_ID;
00974 LString2 element_symbol;
00975 LString2 charge;
00976 };
00977
00979 struct BALL_EXPORT RecordSITE
00980 {
00981 RecordType record_type;
00982 RecordName record_name;
00983 Integer sequence_number;
00984 LString3 name;
00985 Integer number_of_residues;
00986 Residue residue[4];
00987 };
00988
00990 struct BALL_EXPORT RecordSLTBRG
00991 {
00992 RecordType record_type;
00993 RecordName record_name;
00995 struct BALL_EXPORT PartnerAtom
00996 {
00997 Atom atom_name;
00998 Character alternate_location_indicator;
00999 Residue residue;
01000 };
01001
01002 PartnerAtom partner_atom[2];
01003 SymmetryOperator first_atom;
01004 SymmetryOperator second_atom;
01005 };
01006
01008 struct BALL_EXPORT RecordSOURCE
01009 {
01010 RecordType record_type;
01011 RecordName record_name;
01012 Continuation continuation;
01013 SpecificationList sources;
01014 };
01015
01017 struct BALL_EXPORT RecordSPRSDE
01018 {
01019 RecordType record_type;
01020 RecordName record_name;
01021 Continuation continuation;
01022 Date date;
01023 IDcode id_code;
01024 IDcode old_codes[8];
01025 };
01026
01028 struct BALL_EXPORT RecordSSBOND
01029 {
01030 RecordType record_type;
01031 RecordName record_name;
01032 Integer serial_number;
01033 Residue partner_residue[2];
01034 SymmetryOperator symmetry_operator[2];
01035
01036 RecordSSBOND() { clear(); }
01037 void clear()
01038 {
01039 record_type = RECORD_TYPE__SSBOND;
01040 strncpy(record_name, RECORD_TAG_SSBOND, 6);
01041 serial_number = 0;
01042 partner_residue[0].clear();
01043 partner_residue[1].clear();
01044 symmetry_operator[0] = 0;
01045 symmetry_operator[1] = 0;
01046 }
01047 };
01048
01051 struct BALL_EXPORT RecordTER
01052 {
01053 RecordType record_type;
01054 RecordName record_name;
01055 Integer serial_number;
01056 Residue residue;
01057 };
01058
01061 struct BALL_EXPORT RecordTITLE
01062 {
01063 RecordType record_type;
01064 RecordName record_name;
01065 Continuation continuation;
01066 PDBString title;
01067 };
01068
01071 struct BALL_EXPORT RecordTURN
01072 {
01073 RecordType record_type;
01074 RecordName record_name;
01075 Integer sequence_number;
01076 LString3 turn_ID;
01077 Residue initial_residue;
01078 Residue terminal_residue;
01079 PDBString comment;
01080
01081 RecordTURN() { clear(); }
01082 void clear()
01083 {
01084 record_type = RECORD_TYPE__TURN;
01085 strncpy(record_name, RECORD_TAG_TURN, 6);
01086 sequence_number = 0;
01087 turn_ID[0] = '\0';;
01088 initial_residue.clear();
01089 terminal_residue.clear();
01090 comment[0] = '\0';
01091 }
01092 };
01093
01096 struct BALL_EXPORT RecordTVECT
01097 {
01098 RecordType record_type;
01099 RecordName record_name;
01100 Integer serial_number;
01101 Real translation_vector[3];
01102 PDBString comment;
01103 };
01105
01109 struct BALL_EXPORT BookKeeping
01110 {
01111 Size remark_records;
01112 Size het_records;
01113 Size helix_records;
01114 Size sheet_records;
01115 Size turn_records;
01116 Size site_records;
01117 Size coordinate_transformation_records;
01118 Size atomic_coordinate_records;
01119 Size ter_records;
01120 Size conect_records;
01121 Size seqres_records;
01122
01123 BookKeeping()
01124 {
01125 clear();
01126 }
01127
01128 void clear()
01129 {
01130 remark_records = 0;
01131 het_records = 0;
01132 helix_records = 0;
01133 sheet_records = 0;
01134 turn_records = 0;
01135 site_records = 0;
01136 coordinate_transformation_records = 0;
01137 atomic_coordinate_records = 0;
01138 ter_records = 0;
01139 conect_records = 0;
01140 seqres_records = 0;
01141 }
01142 };
01143
01144
01145 struct BALL_EXPORT Structure
01146 {
01147 struct BALL_EXPORT AtomEntry
01148 {
01149 const BALL::Atom* atom;
01150 const BALL::Residue* residue;
01151 const BALL::SecondaryStructure* sec_struct;
01152 const BALL::Chain* chain;
01153 AtomEntry(const BALL::Atom& a)
01154 {
01155 atom = &a;
01156 residue = a.getResidue();
01157 sec_struct = a.getSecondaryStructure();
01158 chain = a.getChain();
01159 }
01160 };
01161
01162
01163 struct BALL_EXPORT ConectAtomList
01164 {
01165 Position serial_number;
01166 std::list<Position> bonds;
01167 std::list<Position> hbonds;
01168 std::list<Position> saltbridges;
01169 };
01170
01171 std::vector<AtomEntry> atoms;
01172
01173 HashSet<const ::BALL::Atom*> conect_atoms;
01174 std::vector<const Bond*> hydrogen_bonds;
01175 std::vector<const Bond*> saltbridges;
01176 std::vector<const Bond*> ssbonds;
01177
01178 std::vector<std::pair<AChar, String> > chain_residue_names;
01179 std::vector<const SecondaryStructure*> sec_structs;
01180
01181 void clear()
01182 {
01183 atoms.clear();
01184 conect_atoms.clear();
01185 hydrogen_bonds.clear();
01186 saltbridges.clear();
01187 ssbonds.clear();
01188 }
01189
01190 };
01191
01195 struct BALL_EXPORT AdditionalAtomInfo
01196 {
01197 const Chain* current_chain;
01198 const ::BALL::Residue* current_residue;
01199 Integer residue_id;
01200 AChar residue_insertion_code;
01201 AChar chain_id;
01202 LString3 residue_name;
01203 LString4 pdb_id;
01204 Position number;
01205
01206 AdditionalAtomInfo()
01207 : current_chain(0x0),
01208 current_residue(0x0),
01209 residue_id(1),
01210 residue_insertion_code(' '),
01211 chain_id(' '),
01212 number(1)
01213 {
01214 strncpy(residue_name, "UNK", 4);
01215 strncpy(pdb_id, " ", 5);
01216 }
01217 };
01218
01221 BALL_EXPORT extern const RecordTypeFormat RECORD_TYPE_FORMAT [];
01222
01223 }
01224
01225 }
01226
01227 #endif // BALL_FORMAT_PDBDEFS_H