00001 #ifndef PDBREAD_HEADER
00002 #define PDBREAD_HEADER
00003
00004
00005
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 #ifdef __cplusplus
00067 namespace RazorBack {
00068 #endif
00069
00070 typedef char Str4_[5];
00071 typedef char Str3_[4];
00072 typedef char Str2_[3];
00080 typedef enum {PDB_UNKNOWN=0, PDB_PROTEIN=1, PDB_RNA=2, PDB_DNA=4, PDB_NACID=6,
00081 PDB_SACCH=8, PDB_BIOPOLY=15, PDB_HETERO=16} Typeflags_;
00082
00091 typedef enum {PDB_NOSOLVENT=0, PDB_WATER=1, PDB_SOLVENT=2} Solvtype_;
00092
00094 typedef struct
00095 {
00096 Str3_ Name;
00097 char Chid;
00098 int Resno;
00099 char Rid;
00100 } Residue_;
00101
00103 typedef struct
00104 {
00105 int Atno;
00106 Str4_ Id;
00107 char Alt;
00108 char Res1;
00109 Residue_ Res;
00110 float X[3];
00111 float Occu, Bfact;
00112 Str4_ Segid;
00113 Str2_ Element;
00114 int Charge;
00115 long Type;
00116 } Atom_ ;
00117
00119 typedef struct
00120 {
00121 int Atomno;
00122 int Bonded[4];
00123 int Hbonded[4];
00124 int Saltbrdg[2];
00125 } Connect_;
00126
00128 typedef enum {PDB_HELIX, PDB_SHEET, PDB_TURN} Sectype_ ;
00129
00131 typedef struct
00132 {
00133 Sectype_ Sectype;
00134 int No;
00135 Str4_ Id;
00136 int Beg, End;
00137 char Chid;
00138 char Begaa, Endaa;
00139 char Begrid, Endrid;
00140 int Type;
00142 int Strandno;
00143 Str4_ Thisat, Otherat;
00144 char Thisaa, Otheraa;
00145 int This, Other;
00146 char Thisrid, Otherid, Otherchid;
00147 } Secstr_ ;
00148
00150 typedef struct
00151 {
00152 int No;
00153 int Pos1, Pos2;
00154 char Ch1, Ch2, Rid1, Rid2;
00155 } Ssbond_ ;
00156
00158 typedef struct
00159 {
00160 Atom_ *Atoms;
00161 int Atomno;
00162 Secstr_ *Secs;
00163 int Secsno;
00164 Ssbond_ *Ssbs;
00165 int Ssbno;
00166 int Resno;
00167 char Chid;
00168 int Modelno;
00169 long Type;
00170 char *Seq;
00171 } Chain_ ;
00172
00174 typedef struct
00175 {
00176 Residue_ Het;
00177 Atom_ *Atoms;
00178 int Atomno;
00179 int Biopolyno;
00180 char Descr[41];
00181 Solvtype_ Solvent;
00182 int Modelno;
00183 } Hetgroup_;
00184
00186 typedef struct
00187 {
00188 char *Name;
00189 Str3_ Hetid;
00190 int Compnum;
00191 } Hetnamformul_;
00192
00194 typedef struct
00195 {
00196 char Chid;
00197 char *Seq;
00198 int Len;
00199 } Seqinfo_;
00200
00202 typedef struct
00203 {
00204 Str3_ Name;
00205 Residue_ *Res;
00206 int Resno;
00207 } Site_;
00208
00210 typedef struct
00211 {
00212 char Header[41];
00213 char Date[10];
00214 Str4_ Pdbcode;
00215 char *Title;
00216 char *Compound;
00217 char *Source;
00218 char Expdta[61];
00219 char *Author;
00220 float Resol;
00221 Seqinfo_ *Seqs;
00222 int Seqno;
00223 Chain_ *Chains;
00224 int Chainno;
00225 Ssbond_ *Ssbs;
00226 int Ssbno;
00227 Hetgroup_ *Hets;
00228 int Hetsno;
00229 Hetnamformul_ *Hetnams;
00230 int Hetnamsno;
00231 Hetnamformul_ *Hetforms;
00232 int Hetformsno;
00233 Site_ *Sites;
00234 int Siteno;
00235 Connect_ *Connects;
00236 int Conno;
00237 } Pdbentry_ ;
00238
00239
00240
00241 #ifdef __cplusplus
00242 extern "C" {
00243 #endif
00244
00259 char aa_code31(const char *Aa3);
00260
00267 char *aa_code13(char Aa1);
00268
00275 char nu_code31(const char *Nu3);
00276
00283 Pdbentry_ *read_pdb(const char *Pdbfn);
00284
00289 float atom_dist(const Atom_ *At1, const Atom_ *At2);
00290
00297 void write_pdb(const char *Pdbfn, Pdbentry_ *Entry,
00298 char *Remarks[], int Remno);
00299
00304 Pdbentry_ *alloc_pdbentry();
00305
00310 void free_pdb(Pdbentry_ *Entry);
00311
00312 #ifdef __cplusplus
00313 } }
00314 #endif
00315
00316
00317 #endif