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