00001
00002
00003
00004
00005 #ifndef BALL_FORMAT_PDBDEFS_H
00006 #define BALL_FORMAT_PDBDEFS_H
00007
00008 #ifndef BALL_COMMON_H
00009 # include <BALL/common.h>
00010 #endif
00011
00012 #ifndef BALL_KERNEL_ATOM_H
00013 # include <BALL/KERNEL/atom.h>
00014 #endif
00015
00016 #ifndef BALL_KERNEL_SECONDARYSTRUCTURE_H
00017 # include <BALL/KERNEL/secondaryStructure.h>
00018 #endif
00019
00020 #ifndef BALL_KERNEL_CHAIN_H
00021 # include <BALL/KERNEL/chain.h>
00022 #endif
00023
00024 #ifndef BALL_KERNEL_RESIDUE_H
00025 # include <BALL/KERNEL/residue.h>
00026 #endif
00027
00028 #ifndef BALL_DATATYPES_HASHSET_H
00029 # include <BALL/DATATYPE/hashSet.h>
00030 #endif
00031
00032 #ifndef BALL_MATHS_MATRIX44_H
00033 # include <BALL/MATHS/matrix44.h>
00034 #endif
00035
00036 namespace BALL
00037 {
00038
00039
00045 namespace PDB
00046 {
00049 enum
00050 {
00051 SIZE_OF_PDB_RECORD_LINE = 80,
00052 SIZE_OF_PDB_LINE_BUFFER = 256,
00053 SIZE_OF_FORMAT_STRING_BUFFER = 256
00054 };
00055
00058 enum RecordType
00059 {
00060 RECORD_TYPE__UNKNOWN = 0,
00061 RECORD_TYPE__ANISOU,
00062 RECORD_TYPE__ATOM,
00063 RECORD_TYPE__AUTHOR,
00064 RECORD_TYPE__CAVEAT,
00065 RECORD_TYPE__CISPEP,
00066 RECORD_TYPE__COMPND,
00067 RECORD_TYPE__CONECT,
00068 RECORD_TYPE__CON06,
00069 RECORD_TYPE__CON061,
00070 RECORD_TYPE__CON062,
00071 RECORD_TYPE__CON063,
00072 RECORD_TYPE__CON064,
00073 RECORD_TYPE__CRYST1,
00074 RECORD_TYPE__DBREF,
00075 RECORD_TYPE__END,
00076 RECORD_TYPE__ENDMDL,
00077 RECORD_TYPE__EXPDTA,
00078 RECORD_TYPE__FORMUL,
00079 RECORD_TYPE__FTNOTE,
00080 RECORD_TYPE__HEADER,
00081 RECORD_TYPE__HELIX,
00082 RECORD_TYPE__HET,
00083 RECORD_TYPE__HETATM,
00084 RECORD_TYPE__HETNAM,
00085 RECORD_TYPE__HETSYN,
00086 RECORD_TYPE__HYDBND,
00087 RECORD_TYPE__JRNL,
00088 RECORD_TYPE__KEYWDS,
00089 RECORD_TYPE__LINK,
00090 RECORD_TYPE__MASTER,
00091 RECORD_TYPE__MODEL,
00092 RECORD_TYPE__MODRES,
00093 RECORD_TYPE__MTRIX1,
00094 RECORD_TYPE__MTRIX2,
00095 RECORD_TYPE__MTRIX3,
00096 RECORD_TYPE__OBSLTE,
00097 RECORD_TYPE__ORIGX1,
00098 RECORD_TYPE__ORIGX2,
00099 RECORD_TYPE__ORIGX3,
00100 RECORD_TYPE__REMARK,
00101 RECORD_TYPE__REVDAT,
00102 RECORD_TYPE__SCALE1,
00103 RECORD_TYPE__SCALE2,
00104 RECORD_TYPE__SCALE3,
00105 RECORD_TYPE__SEQADV,
00106 RECORD_TYPE__SEQRES,
00107 RECORD_TYPE__SHEET,
00108 RECORD_TYPE__SIGATM,
00109 RECORD_TYPE__SIGUIJ,
00110 RECORD_TYPE__SITE,
00111 RECORD_TYPE__SLTBRG,
00112 RECORD_TYPE__SOURCE,
00113 RECORD_TYPE__SPRSDE,
00114 RECORD_TYPE__SSBOND,
00115 RECORD_TYPE__TER,
00116 RECORD_TYPE__TITLE,
00117 RECORD_TYPE__TURN,
00118 RECORD_TYPE__TVECT,
00119
00120 NUMBER_OF_REGISTERED_RECORD_TYPES,
00121
00122 ALL_RECORD_TYPES
00123 };
00124
00127 BALL_EXPORT extern const char* FORMAT_UNKNOWN;
00128 BALL_EXPORT extern const char* FORMAT_ANISOU;
00129 BALL_EXPORT extern const char* FORMAT_ATOM;
00130 BALL_EXPORT extern const char* FORMAT_ATOM_PARTIAL_CRG;
00131 BALL_EXPORT extern const char* FORMAT_AUTHOR;
00132 BALL_EXPORT extern const char* FORMAT_CAVEAT;
00133 BALL_EXPORT extern const char* FORMAT_CISPEP;
00134 BALL_EXPORT extern const char* FORMAT_COMPND;
00135 BALL_EXPORT extern const char* FORMAT_CONECT;
00136 BALL_EXPORT extern const char* FORMAT_CON06;
00137 BALL_EXPORT extern const char* FORMAT_CON06_1;
00138 BALL_EXPORT extern const char* FORMAT_CON06_2;
00139 BALL_EXPORT extern const char* FORMAT_CON06_3;
00140 BALL_EXPORT extern const char* FORMAT_CON06_4;
00141 BALL_EXPORT extern const char* FORMAT_CRYST1;
00142 BALL_EXPORT extern const char* FORMAT_DBREF;
00143 BALL_EXPORT extern const char* FORMAT_END;
00144 BALL_EXPORT extern const char* FORMAT_ENDMDL;
00145 BALL_EXPORT extern const char* FORMAT_EXPDTA;
00146 BALL_EXPORT extern const char* FORMAT_FORMUL;
00147 BALL_EXPORT extern const char* FORMAT_FTNOTE;
00148 BALL_EXPORT extern const char* FORMAT_HEADER;
00149 BALL_EXPORT extern const char* FORMAT_HELIX;
00150 BALL_EXPORT extern const char* FORMAT_HET;
00151 BALL_EXPORT extern const char* FORMAT_HETATM;
00152 BALL_EXPORT extern const char* FORMAT_HETNAM;
00153 BALL_EXPORT extern const char* FORMAT_HETSYN;
00154 BALL_EXPORT extern const char* FORMAT_HYDBND;
00155 BALL_EXPORT extern const char* FORMAT_JRNL;
00156 BALL_EXPORT extern const char* FORMAT_KEYWDS;
00157 BALL_EXPORT extern const char* FORMAT_LINK;
00158 BALL_EXPORT extern const char* FORMAT_MASTER;
00159 BALL_EXPORT extern const char* FORMAT_MODEL;
00160 BALL_EXPORT extern const char* FORMAT_MODRES;
00161 BALL_EXPORT extern const char* FORMAT_MTRIX1;
00162 BALL_EXPORT extern const char* FORMAT_MTRIX2;
00163 BALL_EXPORT extern const char* FORMAT_MTRIX3;
00164 BALL_EXPORT extern const char* FORMAT_OBSLTE;
00165 BALL_EXPORT extern const char* FORMAT_ORIGX1;
00166 BALL_EXPORT extern const char* FORMAT_ORIGX2;
00167 BALL_EXPORT extern const char* FORMAT_ORIGX3;
00168 BALL_EXPORT extern const char* FORMAT_REMARK;
00169 BALL_EXPORT extern const char* FORMAT_REVDAT;
00170 BALL_EXPORT extern const char* FORMAT_SCALE1;
00171 BALL_EXPORT extern const char* FORMAT_SCALE2;
00172 BALL_EXPORT extern const char* FORMAT_SCALE3;
00173 BALL_EXPORT extern const char* FORMAT_SEQADV;
00174 BALL_EXPORT extern const char* FORMAT_SEQRES;
00175 BALL_EXPORT extern const char* FORMAT_SHEET;
00176 BALL_EXPORT extern const char* FORMAT_SIGATM;
00177 BALL_EXPORT extern const char* FORMAT_SIGUIJ;
00178 BALL_EXPORT extern const char* FORMAT_SITE;
00179 BALL_EXPORT extern const char* FORMAT_SLTBRG;
00180 BALL_EXPORT extern const char* FORMAT_SOURCE;
00181 BALL_EXPORT extern const char* FORMAT_SPRSDE;
00182 BALL_EXPORT extern const char* FORMAT_SSBOND;
00183 BALL_EXPORT extern const char* FORMAT_TER;
00184 BALL_EXPORT extern const char* FORMAT_TITLE;
00185 BALL_EXPORT extern const char* FORMAT_TURN;
00186 BALL_EXPORT extern const char* FORMAT_TVECT;
00188
00191 BALL_EXPORT extern const char* RECORD_TAG_ANISOU;
00192 BALL_EXPORT extern const char* RECORD_TAG_ATOM;
00193 BALL_EXPORT extern const char* RECORD_TAG_AUTHOR;
00194 BALL_EXPORT extern const char* RECORD_TAG_CAVEAT;
00195 BALL_EXPORT extern const char* RECORD_TAG_CISPEP;
00196 BALL_EXPORT extern const char* RECORD_TAG_COMPND;
00197 BALL_EXPORT extern const char* RECORD_TAG_CONECT;
00198 BALL_EXPORT extern const char* RECORD_TAG_CON06;
00199 BALL_EXPORT extern const char* RECORD_TAG_CON061;
00200 BALL_EXPORT extern const char* RECORD_TAG_CON062;
00201 BALL_EXPORT extern const char* RECORD_TAG_CON063;
00202 BALL_EXPORT extern const char* RECORD_TAG_CON064;
00203 BALL_EXPORT extern const char* RECORD_TAG_CRYST1;
00204 BALL_EXPORT extern const char* RECORD_TAG_DBREF;
00205 BALL_EXPORT extern const char* RECORD_TAG_END;
00206 BALL_EXPORT extern const char* RECORD_TAG_ENDMDL;
00207 BALL_EXPORT extern const char* RECORD_TAG_EXPDTA;
00208 BALL_EXPORT extern const char* RECORD_TAG_FORMUL;
00209 BALL_EXPORT extern const char* RECORD_TAG_FTNOTE;
00210 BALL_EXPORT extern const char* RECORD_TAG_HEADER;
00211 BALL_EXPORT extern const char* RECORD_TAG_HELIX;
00212 BALL_EXPORT extern const char* RECORD_TAG_HET;
00213 BALL_EXPORT extern const char* RECORD_TAG_HETATM;
00214 BALL_EXPORT extern const char* RECORD_TAG_HETNAM;
00215 BALL_EXPORT extern const char* RECORD_TAG_HETSYN;
00216 BALL_EXPORT extern const char* RECORD_TAG_HYDBND;
00217 BALL_EXPORT extern const char* RECORD_TAG_JRNL;
00218 BALL_EXPORT extern const char* RECORD_TAG_KEYWDS;
00219 BALL_EXPORT extern const char* RECORD_TAG_LINK;
00220 BALL_EXPORT extern const char* RECORD_TAG_MASTER;
00221 BALL_EXPORT extern const char* RECORD_TAG_MODEL;
00222 BALL_EXPORT extern const char* RECORD_TAG_MODRES;
00223 BALL_EXPORT extern const char* RECORD_TAG_MTRIX1;
00224 BALL_EXPORT extern const char* RECORD_TAG_MTRIX2;
00225 BALL_EXPORT extern const char* RECORD_TAG_MTRIX3;
00226 BALL_EXPORT extern const char* RECORD_TAG_OBSLTE;
00227 BALL_EXPORT extern const char* RECORD_TAG_ORIGX1;
00228 BALL_EXPORT extern const char* RECORD_TAG_ORIGX2;
00229 BALL_EXPORT extern const char* RECORD_TAG_ORIGX3;
00230 BALL_EXPORT extern const char* RECORD_TAG_REMARK;
00231 BALL_EXPORT extern const char* RECORD_TAG_REVDAT;
00232 BALL_EXPORT extern const char* RECORD_TAG_SCALE1;
00233 BALL_EXPORT extern const char* RECORD_TAG_SCALE2;
00234 BALL_EXPORT extern const char* RECORD_TAG_SCALE3;
00235 BALL_EXPORT extern const char* RECORD_TAG_SEQADV;
00236 BALL_EXPORT extern const char* RECORD_TAG_SEQRES;
00237 BALL_EXPORT extern const char* RECORD_TAG_SHEET;
00238 BALL_EXPORT extern const char* RECORD_TAG_SIGATM;
00239 BALL_EXPORT extern const char* RECORD_TAG_SIGUIJ;
00240 BALL_EXPORT extern const char* RECORD_TAG_SITE;
00241 BALL_EXPORT extern const char* RECORD_TAG_SLTBRG;
00242 BALL_EXPORT extern const char* RECORD_TAG_SOURCE;
00243 BALL_EXPORT extern const char* RECORD_TAG_SPRSDE;
00244 BALL_EXPORT extern const char* RECORD_TAG_SSBOND;
00245 BALL_EXPORT extern const char* RECORD_TAG_TER;
00246 BALL_EXPORT extern const char* RECORD_TAG_TITLE;
00247 BALL_EXPORT extern const char* RECORD_TAG_TURN;
00248 BALL_EXPORT extern const char* RECORD_TAG_TVECT;
00250
00254
00255 typedef char AChar;
00257 typedef char Atom[5];
00259 typedef char Character;
00261 typedef long Continuation;
00263 typedef char Date[10];
00265 typedef char IDcode[5];
00267 typedef long Integer;
00269 typedef char PDBList[SIZE_OF_PDB_RECORD_LINE + 1];
00271 typedef char LString[SIZE_OF_PDB_RECORD_LINE + 1];
00273 typedef char LString2[3];
00275 typedef char LString3[4];
00277 typedef char LString4[5];
00279 typedef char LString5[6];
00281 typedef char LString6[7];
00283 typedef char LString7[8];
00285 typedef char LString8[9];
00287 typedef char LString9[10];
00289 typedef char LString10[11];
00291 typedef char LString11[12];
00293 typedef char LString12[13];
00295 typedef char LString13[14];
00297 typedef char LString21[22];
00299 typedef double Real;
00301 typedef char RecordName[7];
00303 typedef char ResidueName[4];
00305 typedef char SList[SIZE_OF_PDB_RECORD_LINE + 1];
00307 typedef char Specification[SIZE_OF_PDB_RECORD_LINE + 1];
00309 typedef char SpecificationList[SIZE_OF_PDB_RECORD_LINE + 1];
00311 typedef char PDBString[SIZE_OF_PDB_RECORD_LINE + 1];
00313 typedef char String2[3];
00315 typedef char String3[4];
00317 typedef char String4[5];
00319 typedef char String5[6];
00321 typedef char String40[41];
00323 typedef long SymmetryOperator;
00325
00329
00332 struct BALL_EXPORT RecordTypeFormat
00333 {
00334 public:
00335 RecordType record_type;
00336 char string[7];
00337 const char* format_string;
00338 };
00339
00340 struct BALL_EXPORT Residue
00341 {
00342 ResidueName name;
00343 Character chain_ID;
00344 Integer sequence_number;
00345 AChar insertion_code;
00346
00347 Residue() { clear(); }
00348 void clear()
00349 {
00350 name[0] = '\0';
00351 chain_ID = ' ';
00352 sequence_number = 0;
00353 insertion_code = ' ';
00354 }
00355 void set(const ::BALL::Residue& residue)
00356 {
00357 strncpy(name, residue.getName().c_str(), 3);
00358 sequence_number = residue.getID().toInt();
00359 const Chain* chain = residue.getChain();
00360 chain_ID = (chain == 0 ? ' ' : chain->getName().c_str()[0]);
00361 insertion_code = residue.getInsertionCode();
00362 }
00363 };
00364
00365
00368 struct BALL_EXPORT RecordUNKNOWN
00369 {
00370 Real max_record_size[SIZE_OF_PDB_RECORD_LINE];
00371 };
00372
00375 struct BALL_EXPORT RecordANISOU
00376 {
00377 RecordType record_type;
00378 RecordName record_name;
00379 Integer serial_number;
00380 Atom atom_name;
00381 Character alternate_location_indicator;
00382 Residue residue;
00383 Integer u11;
00384 Integer u22;
00385 Integer u33;
00386 Integer u12;
00387 Integer u13;
00388 Integer u23;
00389 LString4 segment_ID;
00390 LString2 element_symbol;
00391 LString2 charge;
00392 };
00393
00396 struct BALL_EXPORT RecordATOM
00397 {
00398 RecordType record_type;
00399 RecordName record_name;
00400 Integer serial_number;
00401 Atom atom_name;
00402 Character alternate_location_indicator;
00403 Residue residue;
00404 Real orthogonal_vector[3];
00405 Real occupancy;
00406 Real temperature_factor;
00407 LString4 segment_ID;
00408 LString2 element_symbol;
00409 LString2 charge;
00410 LString4 partial_charge;
00411 };
00412
00415 struct BALL_EXPORT RecordAUTHOR
00416 {
00417 RecordType record_type;
00418 RecordName record_name;
00419 Continuation continuation;
00420 PDBList authors;
00421 };
00422
00425 struct BALL_EXPORT RecordCAVEAT
00426 {
00427 RecordType record_type;
00428 RecordName record_name;
00429 Continuation continuation;
00430 IDcode entry_code;
00431 PDBString comment;
00432 };
00433
00436 struct BALL_EXPORT RecordCISPEP
00437 {
00439 RecordType record_type;
00440 RecordName record_name;
00441 Integer record_serial_number;
00442 Residue residue[2];
00443 Integer specific_model_ID;
00444 Real angle_measure;
00445 };
00446
00449 struct BALL_EXPORT RecordCOMPND
00450 {
00451 RecordType record_type;
00452 RecordName record_name;
00453 Continuation continuation;
00454 SpecificationList component_description;
00455 };
00456
00459 struct BALL_EXPORT RecordCONECT
00460 {
00461 RecordType record_type;
00462 RecordName record_name;
00463 Integer atom_serial_number;
00464 Integer bond_atom[4];
00465 Integer hbond_atom[4];
00466 Integer salt_bridge_atom[2];
00467
00468 void clear()
00469 {
00470 record_type = PDB::RECORD_TYPE__CONECT;
00471 record_name[0] = '\0';
00472 atom_serial_number = 0;
00473 bond_atom[0] = bond_atom[1] = bond_atom[2] = bond_atom[3] = 0;
00474 hbond_atom[0] = hbond_atom[1] = hbond_atom[2] = hbond_atom[3] = 0;
00475 salt_bridge_atom[0] = salt_bridge_atom[1] = 0;
00476 }
00477 };
00478
00481 struct BALL_EXPORT RecordCON06
00482 {
00483 RecordType record_type;
00484 RecordName record_name;
00485 Integer atom_serial_number;
00486 Integer bond_atom[4];
00487
00488 void clear()
00489 {
00490 record_type = PDB::RECORD_TYPE__CON06;
00491 record_name[0] = '\0';
00492 atom_serial_number = 0;
00493 bond_atom[0] = bond_atom[1] = bond_atom[2] = bond_atom[3] = 0;
00494 }
00495 };
00496
00497 struct BALL_EXPORT RecordCON061
00498 {
00499 RecordType record_type;
00500 RecordName record_name;
00501 Integer atom_serial_number;
00502 Integer bond_atom[4];
00503
00504 void clear()
00505 {
00506 record_type = PDB::RECORD_TYPE__CON061;
00507 record_name[0] = '\0';
00508 atom_serial_number = 0;
00509 bond_atom[0] = bond_atom[1] = bond_atom[2] = bond_atom[3] = 0;
00510 }
00511 };
00512
00513 struct BALL_EXPORT RecordCON062
00514 {
00515 RecordType record_type;
00516 RecordName record_name;
00517 Integer atom_serial_number;
00518 Integer bond_atom[1];
00519
00520 void clear()
00521 {
00522 record_type = PDB::RECORD_TYPE__CON062;
00523 record_name[0] = '\0';
00524 atom_serial_number = 0;
00525 bond_atom[0] = 0;
00526 }
00527 };
00528
00529 struct BALL_EXPORT RecordCON063
00530 {
00531 RecordType record_type;
00532 RecordName record_name;
00533 Integer atom_serial_number;
00534 Integer bond_atom[2];
00535
00536 void clear()
00537 {
00538 record_type = PDB::RECORD_TYPE__CON063;
00539 record_name[0] = '\0';
00540 atom_serial_number = 0;
00541 bond_atom[0] = bond_atom[1] = 0;
00542 }
00543 };
00544
00545 struct BALL_EXPORT RecordCON064
00546 {
00547 RecordType record_type;
00548 RecordName record_name;
00549 Integer atom_serial_number;
00550 Integer bond_atom[3];
00551
00552 void clear()
00553 {
00554 record_type = PDB::RECORD_TYPE__CON064;
00555 record_name[0] = '\0';
00556 atom_serial_number = 0;
00557 bond_atom[0] = bond_atom[1] = bond_atom[2] = 0;
00558 }
00559 };
00560
00561
00564 struct BALL_EXPORT RecordCRYST1
00565 {
00566 RecordType record_type;
00567 RecordName record_name;
00569 struct UnitCell
00570 {
00571 Real a;
00572 Real b;
00573 Real c;
00574 Real alpha;
00575 Real beta;
00576 Real gamma;
00577 LString space_group;
00578 Integer z_value;
00579 } unit_cell;
00580 };
00581
00584 struct BALL_EXPORT RecordDBREF
00585 {
00586 RecordType record_type;
00587 RecordName record_name;
00588 IDcode entry_code;
00589 Character chain_ID;
00591 struct InitialSequence
00592 {
00593 Integer number;
00594 AChar insertion_code;
00595 } initial_sequence;
00597 struct EndingSequence
00598 {
00599 Integer number;
00600 AChar insertion_code;
00601 } ending_sequence;
00602 LString6 sequence_database_name;
00603 LString8 sequence_database_accession_code;
00604 LString12 sequence_database_ID_code;
00606 struct InitialDatabaseSegment
00607 {
00608 Integer number;
00609 AChar insertion_code;
00610 } initial_database_segment;
00612 struct EndingDatabaseSegment
00613 {
00614 Integer number;
00615 AChar insertion_code;
00616 } ending_database_segment;
00617 };
00618
00620 struct BALL_EXPORT RecordEND
00621 {
00622 RecordType record_type;
00623 RecordName record_name;
00624 };
00625
00627 struct BALL_EXPORT RecordENDMDL
00628 {
00629 RecordType record_type;
00630 RecordName record_name;
00631 };
00632
00634 struct BALL_EXPORT RecordEXPDTA
00635 {
00636 RecordType record_type;
00637 RecordName record_name;
00638 Continuation continuation;
00639 SList technique;
00640 };
00641
00643 struct BALL_EXPORT RecordFORMUL
00644 {
00645 RecordType record_type;
00646 RecordName record_name;
00647 Integer component_number;
00648 LString3 het_ID;
00649 Integer continuation_number;
00650 Character is_water;
00651 PDBString chemical_formula;
00652 };
00653
00655 struct BALL_EXPORT RecordFTNOTE
00656 {
00657 RecordType record_type;
00658 RecordName record_name;
00659 Integer number;
00660 PDBString text;
00661 };
00662
00664 struct BALL_EXPORT RecordHEADER
00665 {
00666 RecordType record_type;
00667 RecordName record_name;
00668 String40 classification;
00669 Date deposition_date;
00670 IDcode ID_code;
00671 };
00672
00674 struct BALL_EXPORT RecordHELIX
00675 {
00676 RecordType record_type;
00677 RecordName record_name;
00678 Integer serial_number;
00679 LString3 helix_ID;
00680 Residue initial_residue;
00681 Residue terminal_residue;
00682 Integer helix_class;
00683 PDBString comment;
00684 Integer length;
00685
00686 RecordHELIX() { clear(); }
00687 void clear()
00688 {
00689 record_type = RECORD_TYPE__HELIX;
00690 strncpy(record_name, RECORD_TAG_HELIX, 6);
00691 serial_number = 0;
00692 helix_ID[0] = '\0';
00693 initial_residue.clear();
00694 terminal_residue.clear();
00695 helix_class = 0;
00696 comment[0] = '\0';
00697 length = 0;
00698 }
00699 };
00700
00702 struct BALL_EXPORT RecordHET
00703 {
00704 RecordType record_type;
00705 RecordName record_name;
00706 Residue residue;
00707 Integer number_of_HETATM_records;
00708 PDBString text;
00709 };
00710
00712 struct BALL_EXPORT RecordHETATM
00713 {
00714 RecordType record_type;
00715 RecordName record_name;
00716 Integer serial_number;
00717 Atom atom_name;
00718 Character alternate_location_indicator;
00719 Residue residue;
00720 Real orthogonal_vector[3];
00721 Real occupancy;
00722 Real temperature_factor;
00723 LString4 segment_ID;
00724 LString2 element_symbol;
00725 LString2 charge;
00726 };
00727
00729 struct BALL_EXPORT RecordHETNAM
00730 {
00731 RecordType record_type;
00732 RecordName record_name;
00733 Continuation continuation;
00734 LString3 het_ID;
00735 PDBString chemical_name;
00736 };
00737
00739 struct BALL_EXPORT RecordHETSYN
00740 {
00741 RecordType record_type;
00742 RecordName record_name;
00743 Continuation continuation;
00744 LString3 het_ID;
00745 SList het_synonyms;
00746 };
00747
00749 struct BALL_EXPORT RecordHYDBND
00750 {
00751 RecordType record_type;
00752 RecordName record_name;
00754 struct BALL_EXPORT HydrogenPartnerAtom
00755 {
00756 Atom atom_name;
00757 Character alternate_location_indicator;
00758 Residue residue;
00759 };
00760
00761 HydrogenPartnerAtom hydrogen_partner_atom[2];
00763 struct BALL_EXPORT HydrogenAtom
00764 {
00765 Atom atom_name;
00766 Character alternate_location_indicator;
00767 Residue residue;
00768 };
00769 HydrogenAtom hydrogen_atom;
00770 SymmetryOperator first_non_hydrogen_atom;
00771 SymmetryOperator second_non_hydrogen_atom;
00772 };
00773
00775 struct BALL_EXPORT RecordJRNL
00776 {
00777 RecordType record_type;
00778 RecordName record_name;
00779 LString text;
00780 };
00782 struct BALL_EXPORT RecordKEYWDS
00783 {
00784 RecordType record_type;
00785 RecordName record_name;
00786 Continuation continuation;
00787 PDBList keywords;
00788 };
00790 struct BALL_EXPORT RecordLINK
00791 {
00792 RecordType record_type;
00793 RecordName record_name;
00795 struct BALL_EXPORT LinkPartner
00796 {
00797 Atom atom_name;
00798 Character alternate_location_indicator;
00799 Residue residue;
00800 };
00801 LinkPartner link_partner[2];
00802 SymmetryOperator first_atom;
00803 SymmetryOperator second_atom;
00804 };
00806 struct BALL_EXPORT RecordMASTER
00807 {
00808 RecordType record_type;
00809 RecordName record_name;
00810 Integer number_of_REMARK_records;
00811 Integer zero;
00812 Integer number_of_HET_records;
00813 Integer number_of_HELIX_records;
00814 Integer number_of_SHEET_records;
00815 Integer number_of_TURN_records;
00816 Integer number_of_SITE_records;
00817 Integer number_of_ORIGX_SCALE_MTRIX_records;
00818 Integer number_of_ATOM_HETATM_records;
00819 Integer number_of_TER_records;
00820 Integer number_of_CONECT_records;
00821 Integer number_of_SEQRES_records;
00822
00823 RecordMASTER() { clear(); }
00824 void clear()
00825 {
00826 record_type = RECORD_TYPE__MASTER;
00827 strcpy(record_name, RECORD_TAG_MASTER);
00828 zero = number_of_HET_records = number_of_HELIX_records
00829 = number_of_SHEET_records = number_of_TURN_records
00830 = number_of_SITE_records = number_of_ORIGX_SCALE_MTRIX_records
00831 = number_of_ATOM_HETATM_records = number_of_TER_records
00832 = number_of_CONECT_records = number_of_SEQRES_records = 0;
00833 }
00834 };
00836 struct BALL_EXPORT RecordMODEL
00837 {
00838 RecordType record_type;
00839 RecordName record_name;
00840 Integer model_serial_number;
00841 };
00843 struct BALL_EXPORT RecordMODRES
00844 {
00845 RecordType record_type;
00846 RecordName record_name;
00847 IDcode entry_code;
00848 Residue residue;
00849 ResidueName standard_residue_name;
00850 PDBString comment;
00851 };
00853 struct BALL_EXPORT RecordMTRIX1
00854 {
00855 RecordType record_type;
00856 RecordName record_name;
00857 Integer serial_number;
00858 Real transformation_matrix[4];
00859 Integer is_given;
00860 };
00862 struct BALL_EXPORT RecordMTRIX2
00863 {
00864 RecordType record_type;
00865 RecordName record_name;
00866 Integer serial_number;
00867 Real transformation_matrix[4];
00868 Integer is_given;
00869 };
00871 struct BALL_EXPORT RecordMTRIX3
00872 {
00873 RecordType record_type;
00874 RecordName record_name;
00875 Integer serial_number;
00876 Real transformation_matrix[4];
00877 Integer is_given;
00878 };
00880 struct BALL_EXPORT RecordOBSLTE
00881 {
00882 RecordType record_type;
00883 RecordName record_name;
00884 Continuation continuation;
00885 Date entry_replaced_date;
00886 IDcode entry_code;
00887 IDcode replacing_entry_code[8];
00888 };
00890 struct BALL_EXPORT RecordORIGX1
00891 {
00892 RecordType record_type;
00893 RecordName record_name;
00894 Real transformation_matrix[4];
00895 };
00897 struct BALL_EXPORT RecordORIGX2
00898 {
00899 RecordType record_type;
00900 RecordName record_name;
00901 Real transformation_matrix[4];
00902 };
00904 struct BALL_EXPORT RecordORIGX3
00905 {
00906 RecordType record_type;
00907 RecordName record_name;
00908 Real transformation_matrix[4];
00909 };
00911 struct BALL_EXPORT RecordREMARK
00912 {
00913 RecordType record_type;
00914 RecordName record_name;
00915 Integer remark_number;
00916 LString text;
00917 };
00919 struct BALL_EXPORT RecordREVDAT
00920 {
00921 RecordType record_type;
00922 RecordName record_name;
00923 Integer modification_number;
00924 Continuation continuation;
00925 Date modification_date;
00926 String5 modification_ID;
00927 Integer modification_type;
00928 LString6 name_of_modified_record[4];
00929 };
00930
00932 struct BALL_EXPORT RecordSCALE1
00933 {
00934 RecordType record_type;
00935 RecordName record_name;
00936 Real transformation_matrix[4];
00937 };
00938
00940 struct BALL_EXPORT RecordSCALE2
00941 {
00942 RecordType record_type;
00943 RecordName record_name;
00944 Real transformation_matrix[4];
00945 };
00946
00948 struct BALL_EXPORT RecordSCALE3
00949 {
00950 RecordType record_type;
00951 RecordName record_name;
00952 Real transformation_matrix[4];
00953 };
00954
00956 struct BALL_EXPORT RecordSEQADV
00957 {
00958 RecordType record_type;
00959 RecordName record_name;
00960 IDcode id_code;
00961 Residue residue;
00962 LString4 database;
00963 LString9 db_id_code;
00964 LString3 db_res;
00965 Integer db_seq;
00966 LString21 comment;
00967 };
00968
00970 struct BALL_EXPORT RecordSEQRES
00971 {
00972 RecordType record_type;
00973 RecordName record_name;
00974 Integer serial_number;
00975 Character chain_ID;
00976 Integer number_of_residues_in_chain;
00977 ResidueName residue_name[13];
00978
00979 RecordSEQRES()
00980 {
00981 clear();
00982 }
00983
00984 void clear()
00985 {
00986 record_type = RECORD_TYPE__SEQRES;
00987 strncpy(record_name, RECORD_TAG_SEQRES, 6);
00988 serial_number = 0;
00989 chain_ID = ' ';
00990 number_of_residues_in_chain = 0L;
00991 residue_name[0][0] = '\0';
00992 residue_name[1][0] = '\0';
00993 residue_name[2][0] = '\0';
00994 residue_name[3][0] = '\0';
00995 residue_name[4][0] = '\0';
00996 residue_name[5][0] = '\0';
00997 residue_name[6][0] = '\0';
00998 residue_name[7][0] = '\0';
00999 residue_name[8][0] = '\0';
01000 residue_name[9][0] = '\0';
01001 residue_name[10][0] = '\0';
01002 residue_name[11][0] = '\0';
01003 residue_name[12][0] = '\0';
01004 }
01005 };
01006
01008 struct BALL_EXPORT RecordSHEET
01009 {
01010 RecordType record_type;
01011 RecordName record_name;
01012 Integer strand_number;
01013 LString3 sheet_ID;
01014 Integer number_of_strands;
01015 Residue initial_residue;
01016 Residue terminal_residue;
01017 Integer sense_of_strand;
01018 Atom atom_name_in_current_strand;
01019 Residue residue_in_current_strand;
01020 Atom atom_name_in_previous_strand;
01021 Residue residue_in_previous_strand;
01022
01023 RecordSHEET() { clear(); }
01024 void clear()
01025 {
01026 record_type = RECORD_TYPE__SHEET;
01027 strncpy(record_name, RECORD_TAG_SHEET, 6);
01028 strand_number = 0;
01029 sheet_ID[0] = '\0';;
01030 number_of_strands = 0;
01031 initial_residue.clear();
01032 terminal_residue.clear();
01033 sense_of_strand = 0;
01034 atom_name_in_current_strand[0] = '\0';
01035 residue_in_current_strand.clear();
01036 atom_name_in_previous_strand[0] = '\0';
01037 residue_in_previous_strand.clear();
01038 }
01039 };
01040
01042 struct BALL_EXPORT RecordSIGATM
01043 {
01044 RecordType record_type;
01045 RecordName record_name;
01046 Integer serial_number;
01047 Atom atom_name;
01048 Character alternate_location_indicator;
01049 Residue residue;
01050 Real standard_vector_deviation[3];
01051 Real standard_occupancy_deviation;
01052 Real standard_temperature_deviation;
01053 LString4 segment_ID;
01054 LString2 element_symbol;
01055 LString2 charge;
01056 };
01057
01059 struct BALL_EXPORT RecordSIGUIJ
01060 {
01061 RecordType record_type;
01062 RecordName record_name;
01063 Integer serial_number;
01064 Atom atom_name;
01065 Character alternate_location_indicator;
01066 Residue residue;
01067 Integer sig11;
01068 Integer sig22;
01069 Integer sig33;
01070 Integer sig12;
01071 Integer sig13;
01072 Integer sig23;
01073 LString4 segment_ID;
01074 LString2 element_symbol;
01075 LString2 charge;
01076 };
01077
01079 struct BALL_EXPORT RecordSITE
01080 {
01081 RecordType record_type;
01082 RecordName record_name;
01083 Integer sequence_number;
01084 LString3 name;
01085 Integer number_of_residues;
01086 Residue residue[4];
01087 };
01088
01090 struct BALL_EXPORT RecordSLTBRG
01091 {
01092 RecordType record_type;
01093 RecordName record_name;
01095 struct BALL_EXPORT PartnerAtom
01096 {
01097 Atom atom_name;
01098 Character alternate_location_indicator;
01099 Residue residue;
01100 };
01101
01102 PartnerAtom partner_atom[2];
01103 SymmetryOperator first_atom;
01104 SymmetryOperator second_atom;
01105 };
01106
01108 struct BALL_EXPORT RecordSOURCE
01109 {
01110 RecordType record_type;
01111 RecordName record_name;
01112 Continuation continuation;
01113 SpecificationList sources;
01114 };
01115
01117 struct BALL_EXPORT RecordSPRSDE
01118 {
01119 RecordType record_type;
01120 RecordName record_name;
01121 Continuation continuation;
01122 Date date;
01123 IDcode id_code;
01124 IDcode old_codes[8];
01125 };
01126
01128 struct BALL_EXPORT RecordSSBOND
01129 {
01130 RecordType record_type;
01131 RecordName record_name;
01132 Integer serial_number;
01133 Residue partner_residue[2];
01134 SymmetryOperator symmetry_operator[2];
01135
01136 RecordSSBOND() { clear(); }
01137 void clear()
01138 {
01139 record_type = RECORD_TYPE__SSBOND;
01140 strncpy(record_name, RECORD_TAG_SSBOND, 6);
01141 serial_number = 0;
01142 partner_residue[0].clear();
01143 partner_residue[1].clear();
01144 symmetry_operator[0] = 0;
01145 symmetry_operator[1] = 0;
01146 }
01147 };
01148
01151 struct BALL_EXPORT RecordTER
01152 {
01153 RecordType record_type;
01154 RecordName record_name;
01155 Integer serial_number;
01156 Residue residue;
01157 };
01158
01161 struct BALL_EXPORT RecordTITLE
01162 {
01163 RecordType record_type;
01164 RecordName record_name;
01165 Continuation continuation;
01166 PDBString title;
01167 };
01168
01171 struct BALL_EXPORT RecordTURN
01172 {
01173 RecordType record_type;
01174 RecordName record_name;
01175 Integer sequence_number;
01176 LString3 turn_ID;
01177 Residue initial_residue;
01178 Residue terminal_residue;
01179 PDBString comment;
01180
01181 RecordTURN() { clear(); }
01182 void clear()
01183 {
01184 record_type = RECORD_TYPE__TURN;
01185 strncpy(record_name, RECORD_TAG_TURN, 6);
01186 sequence_number = 0;
01187 turn_ID[0] = '\0';;
01188 initial_residue.clear();
01189 terminal_residue.clear();
01190 comment[0] = '\0';
01191 }
01192 };
01193
01196 struct BALL_EXPORT RecordTVECT
01197 {
01198 RecordType record_type;
01199 RecordName record_name;
01200 Integer serial_number;
01201 Real translation_vector[3];
01202 PDBString comment;
01203 };
01205
01209 struct BALL_EXPORT BookKeeping
01210 {
01211 Size remark_records;
01212 Size het_records;
01213 Size helix_records;
01214 Size sheet_records;
01215 Size turn_records;
01216 Size site_records;
01217 Size coordinate_transformation_records;
01218 Size atomic_coordinate_records;
01219 Size ter_records;
01220 Size conect_records;
01221 Size seqres_records;
01222
01223 BookKeeping()
01224 {
01225 clear();
01226 }
01227
01228 void clear()
01229 {
01230 remark_records = 0;
01231 het_records = 0;
01232 helix_records = 0;
01233 sheet_records = 0;
01234 turn_records = 0;
01235 site_records = 0;
01236 coordinate_transformation_records = 0;
01237 atomic_coordinate_records = 0;
01238 ter_records = 0;
01239 conect_records = 0;
01240 seqres_records = 0;
01241 }
01242 };
01243
01244
01245 struct BALL_EXPORT Structure
01246 {
01247 struct BALL_EXPORT AtomEntry
01248 {
01249 const BALL::Atom* atom;
01250 const BALL::Residue* residue;
01251 const BALL::SecondaryStructure* sec_struct;
01252 const BALL::Chain* chain;
01253 AtomEntry(const BALL::Atom& a)
01254 {
01255 atom = &a;
01256 residue = a.getResidue();
01257 sec_struct = a.getSecondaryStructure();
01258 chain = a.getChain();
01259 }
01260 };
01261
01262
01263 struct BALL_EXPORT ConectAtomList
01264 {
01265 Position serial_number;
01266 std::list<Position> bonds;
01267 std::list<Position> hbonds;
01268 std::list<Position> saltbridges;
01269 };
01270
01271 struct BALL_EXPORT UnitCellInfo
01272 {
01273 Real a;
01274 Real b;
01275 Real c;
01276 Real alpha;
01277 Real beta;
01278 Real gamma;
01279 LString space_group;
01280 Integer z_value;
01281
01282 UnitCellInfo()
01283 : a(0),
01284 b(0),
01285 c(0),
01286 alpha(0),
01287 beta(0),
01288 gamma(0),
01289 z_value(-1)
01290 {
01291 strcpy(space_group, "");
01292 }
01293 } unitcell_info;
01294
01295 struct BALL_EXPORT NCSMatrix
01296 {
01297 Real matrix[12];
01298 Integer isgiven;
01299 NCSMatrix(const BALL::Matrix4x4& m, bool is_given)
01300 {
01301 matrix[0] = m(0,0); matrix[1] = m(0,1); matrix[2] = m(0,2); matrix[3] = m(0,3);
01302 matrix[4] = m(1,0); matrix[5] = m(1,1); matrix[6] = m(1,2); matrix[7] = m(1,3);
01303 matrix[8] = m(2,0); matrix[9] = m(2,1); matrix[10] = m(2,2); matrix[11] = m(2,3);
01304 isgiven = is_given;
01305 }
01306 };
01307
01308 std::vector<NCSMatrix> ncs_matrices;
01309 std::vector<AtomEntry> atoms;
01310
01311 HashSet<const ::BALL::Atom*> conect_atoms;
01312 std::vector<const Bond*> hydrogen_bonds;
01313 std::vector<const Bond*> saltbridges;
01314 std::vector<const Bond*> ssbonds;
01315
01316 std::vector<std::pair<AChar, String> > chain_residue_names;
01317 std::vector<const SecondaryStructure*> sec_structs;
01318
01319 void clear()
01320 {
01321 atoms.clear();
01322 conect_atoms.clear();
01323 hydrogen_bonds.clear();
01324 saltbridges.clear();
01325 ssbonds.clear();
01326 }
01327
01328 };
01329
01333 struct BALL_EXPORT AdditionalAtomInfo
01334 {
01335 const Chain* current_chain;
01336 const ::BALL::Residue* current_residue;
01337 Integer residue_id;
01338 AChar residue_insertion_code;
01339 AChar chain_id;
01340 LString3 residue_name;
01341 LString4 pdb_id;
01342 Position number;
01343
01344 AdditionalAtomInfo()
01345 : current_chain(0x0),
01346 current_residue(0x0),
01347 residue_id(1),
01348 residue_insertion_code(' '),
01349 chain_id(' '),
01350 number(1)
01351 {
01352 strncpy(residue_name, "UNK", 4);
01353 strncpy(pdb_id, " ", 5);
01354 }
01355 };
01356
01359 BALL_EXPORT extern const RecordTypeFormat RECORD_TYPE_FORMAT [];
01360
01361 }
01362
01363 }
01364
01365 #endif // BALL_FORMAT_PDBDEFS_H