This file is indexed.

/usr/include/mmdb/mmdb_title.h is in libmmdb-dev 1.25.5-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
//  $Id: mmdb_title.h,v 1.22 2012/01/26 17:52:21 ekr Exp $
//  =================================================================
//
//   CCP4 Coordinate Library: support of coordinate-related
//   functionality in protein crystallography applications.
//
//   Copyright (C) Eugene Krissinel 2000-2008.
//
//    This library is free software: you can redistribute it and/or
//    modify it under the terms of the GNU Lesser General Public
//    License version 3, modified in accordance with the provisions
//    of the license to address the requirements of UK law.
//
//    You should have received a copy of the modified GNU Lesser
//    General Public License along with this library. If not, copies
//    may be downloaded from http://www.ccp4.ac.uk/ccp4license.php
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU Lesser General Public License for more details.
//
//  =================================================================
//
//    23.06.13   <--  Date of Last Modification.
//                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//  -----------------------------------------------------------------
//
//  **** Module  :  MMDB_Title <interface>
//       ~~~~~~~~~
//  **** Project :  MacroMolecular Data Base (MMDB)
//       ~~~~~~~~~
//  **** Classes :  CTitleContainer  (container of title classes)
//       ~~~~~~~~~  CObsLine
//                  CTitleLine
//                  CCaveat
//                  CCompound
//                  CSource
//                  CKeyWords
//                  CExpData
//                  CMdlType
//                  CAuthor
//                  CRevData
//                  CSupersede
//                  CJournal
//                  CRemark
//                  CBiomolecule
//                  CMMDBTitle       ( MMDB title section )
//
//   (C) E. Krissinel 2000-2013
//
//  =================================================================
//

#ifndef __MMDB_Title__
#define __MMDB_Title__


#ifndef __Stream__
#include "stream_.h"
#endif

#ifndef  __MMDB_Defs__
#include "mmdb_defs.h"
#endif

#ifndef  __MMDB_Utils__
#include "mmdb_utils.h"
#endif

#ifndef  __MMDB_MMCIF__
#include "mmdb_mmcif.h"
#endif


//  ====================  CTitleContainer  ======================

DefineClass(CTitleContainer);
DefineStreamFunctions(CTitleContainer);

class CTitleContainer : public CClassContainer  {

  public :

    CTitleContainer  () : CClassContainer() {}
    CTitleContainer  ( RPCStream Object )
                        : CClassContainer ( Object ) {}
    ~CTitleContainer () {}

    PCContainerClass MakeContainerClass ( int ClassID );

};


//  ==================  CObsLine  ========================

DefineClass(CObsLine);
DefineStreamFunctions(CObsLine);

class CObsLine : public CContainerClass  {

  public :

    Date   repDate;    //  date of replacement
    IDCode idCode;     //  ID code of replaced entry
    IDCode rIdCode[8]; //  ID codes of entries that replaced this one

    CObsLine ();
    CObsLine ( cpstr S );
    CObsLine ( RPCStream Object );
    ~CObsLine();

    void  PDBASCIIDump    ( pstr S, int N   );
    void  MakeCIF         ( PCMMCIFData CIF, int N );
    int   ConvertPDBASCII ( cpstr S );
    void  GetCIF          ( PCMMCIFData CIF, int & Signal );
    int   GetClassID      () { return ClassID_ObsLine; }

    void  Copy  ( PCContainerClass ObsLine );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :

    void InitObsLine();

};


//  ====================  CTitleLine  =====================

DefineClass(CTitleLine);
DefineStreamFunctions(CTitleLine);

class CTitleLine : public CContString  {

  public :

    CTitleLine ();
    CTitleLine ( cpstr S );
    CTitleLine ( RPCStream Object );
    ~CTitleLine();

    int   ConvertPDBASCII ( cpstr S );
    void  PDBASCIIDump    ( pstr S, int N );
    Boolean PDBASCIIDump1 ( RCFile ) { return False; }
    int   GetClassID      () { return ClassID_TitleLine; }

//    void  GetCIF          ( PCMMCIFData CIF, int & Signal );
//    void  MakeCIF         ( PCMMCIFData CIF, int N        );
//    void  Copy  ( PCContainerClass TitleLine );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :

    void InitTitleLine();

};


//  ====================  CCaveat  =====================

DefineClass(CCaveat);
DefineStreamFunctions(CCaveat);

class CCaveat : public CContString  {

  public :

    IDCode idCode;   //  ID code of the entry

    CCaveat ();
    CCaveat ( cpstr S );
    CCaveat ( RPCStream Object );
    ~CCaveat();

    void  PDBASCIIDump    ( pstr S, int N );
    Boolean PDBASCIIDump1 ( RCFile ) { return False; }
    void  MakeCIF         ( PCMMCIFData CIF, int N );
    int   ConvertPDBASCII ( cpstr S );
    void  GetCIF          ( PCMMCIFData CIF, int & Signal );
    int   GetClassID      () { return ClassID_CAVEAT; }

    void  Copy  ( PCContainerClass Caveat );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :

    void InitCaveat();

};


//  ====================  CCompound  =====================

DefineClass(CCompound);
DefineStreamFunctions(CCompound);

class CCompound : public CContString  {

  public :

    CCompound ();
    CCompound ( cpstr S );
    CCompound ( RPCStream Object );
    ~CCompound();

    void  PDBASCIIDump    ( pstr S, int N );
    Boolean PDBASCIIDump1 ( RCFile  ) { return False; }
    int   ConvertPDBASCII ( cpstr S );
    int   GetClassID      () { return ClassID_Compound; }

//    void  GetCIF          ( PCMMCIFData CIF, int & Signal );
//    void  MakeCIF         ( PCMMCIFData CIF, int N        );
//    void  Copy  ( PCContainerClass Compound );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :

    void InitCompound();

};


//  ====================  CSource  =====================

DefineClass(CSource);
DefineStreamFunctions(CSource);

class CSource : public CContString  {

  public :

    CSource ();
    CSource ( cpstr S );
    CSource ( RPCStream Object );
    ~CSource();

    void  PDBASCIIDump    ( pstr S, int N );
    Boolean PDBASCIIDump1 ( RCFile  ) { return False; }
    int   ConvertPDBASCII ( cpstr S );
    int   GetClassID      () { return ClassID_Source; }

//    void  GetCIF          ( PCMMCIFData CIF, int & Signal );
//    void  MakeCIF         ( PCMMCIFData CIF, int N        );
//    void  Copy  ( PCContainerClass Source );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :

    void InitSource();

};


//  ====================  CKeyWords  =====================

DefineClass(CKeyWords);
DefineStreamFunctions(CKeyWords);

class CKeyWords : public CStream  {

  public :

    int      nKeyWords;     // number of key words
    psvector KeyWord;       // key word array

    CKeyWords ();
    CKeyWords ( cpstr S );
    CKeyWords ( RPCStream Object );
    ~CKeyWords();

    void  Delete          ();

    void  PDBASCIIDump    ( RCFile f );
    void  MakeCIF         ( PCMMCIFData CIF );

    int   ConvertPDBASCII ( cpstr S );
    void  GetCIF          ( PCMMCIFData CIF );

    void  Copy  ( PCKeyWords KeyWords );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :

    Boolean Cont;

    void  Init();

};


//  ====================  CExpData  =====================

DefineClass(CExpData);
DefineStreamFunctions(CExpData);

class CExpData : public CContString  {

  public :

    CExpData ();
    CExpData ( cpstr S );
    CExpData ( RPCStream Object );
    ~CExpData();

    void  PDBASCIIDump    ( pstr S, int N );
    Boolean PDBASCIIDump1 ( RCFile ) { return False; }

    int   ConvertPDBASCII ( cpstr S );
    int   GetClassID      () { return ClassID_ExpData; }

//    void  GetCIF          ( PCMMCIFData CIF, int & Signal );
//    void  MakeCIF         ( PCMMCIFData CIF, int N        );
//    void  Copy  ( PCContainerClass ExpData );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :

    void InitExpData();

};


//  ====================  CMdlType  =====================

DefineClass(CMdlType);
DefineStreamFunctions(CMdlType);

class CMdlType : public CContString  {

  public :

    CMdlType ();
    CMdlType ( cpstr S );
    CMdlType ( RPCStream Object );
    ~CMdlType();

    void  PDBASCIIDump    ( pstr S, int N );
    Boolean PDBASCIIDump1 ( RCFile ) { return False; }

    int   ConvertPDBASCII ( cpstr S );
    int   GetClassID      () { return ClassID_MdlType; }

//    void  GetCIF          ( PCMMCIFData CIF, int & Signal );
//    void  MakeCIF         ( PCMMCIFData CIF, int N        );
//    void  Copy  ( PCContainerClass ExpData );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :

    void InitMdlType();

};


//  ====================  CAuthor  =====================

DefineClass(CAuthor);
DefineStreamFunctions(CAuthor);

class CAuthor : public CContString  {

  public :

    CAuthor ();
    CAuthor ( cpstr S );
    CAuthor ( RPCStream Object );
    ~CAuthor();

    void  PDBASCIIDump    ( pstr S, int N   );
    Boolean PDBASCIIDump1 ( RCFile ) { return False; }

    int   ConvertPDBASCII ( cpstr S );
    int   GetClassID      () { return ClassID_Author; }

//    void  GetCIF          ( PCMMCIFData CIF, int & Signal );
//    void  MakeCIF         ( PCMMCIFData CIF, int N        );
//    void  Copy  ( PCContainerClass Author );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :

    void InitAuthor();

};


//  ====================  CRevData  =====================

DefineClass(CRevData);
DefineStreamFunctions(CRevData);

#define REVDAT_WARN_MODNUM   0x00000001
#define REVDAT_WARN_MODTYPE  0x00000002

class CRevData : public CContainerClass  {

  public :

    int     modNum;
    Date    modDate;
    char    modId[13];
    int     modType;
    RecName record[4];
    word    Warning;

    CRevData ();
    CRevData ( cpstr S );
    CRevData ( RPCStream Object );
    ~CRevData();

    void  PDBASCIIDump    ( pstr S, int N );
    void  MakeCIF         ( PCMMCIFData CIF, int N );

    int   ConvertPDBASCII ( cpstr S );
    void  GetCIF          ( PCMMCIFData CIF, int & Signal );

    int   GetClassID      () { return ClassID_RevData; }

    void  Copy  ( PCContainerClass RevData );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :

    void InitRevData();

};


//  ==================  CSupersede  ========================

DefineClass(CSupersede);
DefineStreamFunctions(CSupersede);

class CSupersede : public CContainerClass  {

  public :

    Date   sprsdeDate;  //  date of supersede
    IDCode idCode;      //  ID code of the entry
    IDCode sIdCode[8];  //  ID codes of superseded entries

    CSupersede ();
    CSupersede ( cpstr S );
    CSupersede ( RPCStream Object );
    ~CSupersede();

    void  PDBASCIIDump    ( pstr S, int N );
    void  MakeCIF         ( PCMMCIFData CIF, int N );

    int   ConvertPDBASCII ( cpstr S );
    void  GetCIF          ( PCMMCIFData CIF, int & Signal );

    int   GetClassID      () { return ClassID_Supersede; }

    void  Copy  ( PCContainerClass Supersede );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :

    void InitSupersede();

};


//  ====================  CJournal  =====================

DefineClass(CJournal);
DefineStreamFunctions(CJournal);

class CJournal : public CContString  {

  public :

    CJournal ();
    CJournal ( cpstr S );
    CJournal ( RPCStream Object );
    ~CJournal();

    void  PDBASCIIDump    ( pstr S, int N );
    Boolean PDBASCIIDump1 ( RCFile ) { return False; }

    int   ConvertPDBASCII ( cpstr S );
    int   GetClassID      () { return ClassID_Journal; }

//    void  GetCIF          ( PCMMCIFData CIF, int & Signal );
//    void  MakeCIF         ( PCMMCIFData CIF, int N        );
//    void  Copy  ( PCContainerClass Journal );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :

    void InitJournal();

};


//  ====================  CRemark  =====================

DefineClass(CRemark);
DefineStreamFunctions(CRemark);

class CRemark : public CContainerClass  {

  public :

    int  remarkNum;  // remark id
    pstr Remark;     // remark line

    CRemark ();
    CRemark ( cpstr S );
    CRemark ( RPCStream Object );
    ~CRemark();

    void  PDBASCIIDump    ( pstr S, int N );
    void  MakeCIF         ( PCMMCIFData CIF, int N );

    int   ConvertPDBASCII ( cpstr S );
    void  GetCIF          ( PCMMCIFData CIF, int & Signal );

    int   GetClassID      () { return ClassID_Remark; }

    void  Copy  ( PCContainerClass RemarkClass );

    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :

    void InitRemark();

};

//  =================  CBiomolecule  =====================

DefineClass(CBMApply);
DefineStreamFunctions(CBMApply);

class CBMApply : public CStream  {

  public :
    PChainID  chain;
    int       nChains;
    pmat44    tm;
    int       nMatrices;

    CBMApply ();
    CBMApply ( RPCStream Object );
    ~CBMApply();

    void  FreeMemory();

    int   addChains ( int & i, RPCRemark rem, RCTitleContainer Remark );
    int addMatrices ( int & i, RPCRemark rem, RCTitleContainer Remark );

    void  Copy  ( PCBMApply BMA );  // if BMA is NULL, then empties
                                    // the class
    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :
    void  InitBMApply();

};


DefineClass(CBiomolecule);
DefineStreamFunctions(CBiomolecule);

class CBiomolecule : public CStream  {

  public :
    PPCBMApply BMApply;
    int        nBMAs;

    CBiomolecule ();
    CBiomolecule ( RPCStream Object );
    ~CBiomolecule();

    void  FreeMemory();

    PCBMApply addBMApply();

    int     Size();
    Boolean checkComposition ( PChainID chID, ivector occ,
                               ivector  wocc, int n );

    void  Copy  ( PCBiomolecule B );  // if B is NULL, then empties
                                      // the class
    void  write ( RCFile f );
    void  read  ( RCFile f );

  protected :
    void  InitBiomolecule();

};

//  =================  CMMDBTitle  =======================

DefineClass(CMMDBTitle);
DefineStreamFunctions(CMMDBTitle);

class CMMDBTitle : public CStream  {

  friend class CModel;
  friend class CChain;
  friend class CMMDBFile;

  public :

    CMMDBTitle ();
    CMMDBTitle ( RPCStream Object );
    ~CMMDBTitle();

    void  FreeMemory ( Boolean keepBiomolecules );

    // Fills the PDB file header
    void  SetHeader ( cpstr Classification, // any length is Ok
                      cpstr DepDate,    // DD-MMM-YYYY
                      cpstr ID_Code );  // not more than 11 chars

    // Interprets the ASCII PDB line belonging to the title section
    // and fills the corresponding fields.
    //   Returns zero if the line was converted, otherwise returns a
    // non-negative value of Error_XXXX.
    //   PDBString must be not shorter than 81 characters.
    int   ConvertPDBString ( pstr PDBString );

    // MakePDBString() makes the ASCII PDB HEADER line from the
    // class data. PDBString must be not shorter than 81 characters.
    void  MakePDBHeaderString ( pstr PDBString );

    // GetStructureTitle() returns the contents of TITLE record
    // unfolded into single line. If Title is missing, returns
    // contents of COMPND(:MOLECULE). If COMPND is missing, returns
    // HEADER. If Header is missing, returns PDB code. If no PDB
    // code is there, returns "Not available".
    pstr  GetStructureTitle ( pstr & S );

    PCTitleContainer GetRemarks();
    PCTitleContainer GetJournal();

    realtype GetResolution(); // -1.0 mean no resolution record in file

    int   ParseBiomolecules(); // returns the number of biomolecules,
                               // -2 for general format error
                               // -3 for errors in BIOMT records

    int   GetNofBiomolecules();
    void  GetBiomolecules   ( PPCBiomolecule & BM, int & nBMs );
    PCBiomolecule GetBiomolecule ( int bmNo ); // bmno=0,1,..
                               // returns NULL if bmNo is incorrect

    void  PDBASCIIDump ( RCFile      f   );
    void  MakeCIF      ( PCMMCIFData CIF );

    //   GetCIF(..) returns the same code as ConvertPDBString(..)
    // save for Error_WrongSection
    int   GetCIF       ( PCMMCIFData CIF );

    pstr   GetIDCode() { return idCode; }
    Boolean GetCol73() { return col73;  }
    void  TrimInput ( pstr PDBString );

    void  Copy  ( PCMMDBTitle TS );  // if TS is NULL, then empties
                                     // the class

    void  write ( RCFile f );    // writes header to PDB binary file
    void  read  ( RCFile f );    // reads header from PDB binary file

  protected :

    //   Header data
    pstr     classification;  // classification of the molecule
    Date     depDate;         // deposition date DD-MMM-YYYY
    IDCode   idCode;          // unique PDB identifier
    realtype resolution;      // resolution
    Boolean  col73;           // True if columns 73-80 contain PDB ID

    CTitleContainer ObsData;     // obsoletion data
    CTitleContainer Title;       // title data
    CTitleContainer CAVEAT;      // error data
    CTitleContainer Compound;    // compound data
    CTitleContainer Source;      // source
    CKeyWords       KeyWords;    // key words
    CTitleContainer ExpData;     // experimental data
    CTitleContainer MdlType;     // model desctiptions
    CTitleContainer Author;      // author data
    CTitleContainer RevData;     // revision data
    CTitleContainer Supersede;   // supersede records
    CTitleContainer Journal;     // journal records
    CTitleContainer Remark;      // remark records

    PPCBiomolecule  Biomolecule;
    int             nBiomolecules;

    void  Init();
    void  FreeBiomolecules();

    PCBiomolecule addBiomolecule();

};

extern void  TestHeader();
extern void  TestTitle (); // reads PDB title from file 'in.title'
                           // and rewrites it into 'out.title' and
                           // 'abin.title'

#endif