ccp4srs  Version 1.0.0
ccp4srs_index.h
Go to the documentation of this file.
1 // $Id: ccp4srs_index.h $
2 // =================================================================
3 //
4 // CCP4 SRS Library: Storage, Retrieval and Search support for
5 // CCP4 ligand data.
6 //
7 // Copyright (C) Eugene Krissinel 2010-2013.
8 //
9 // This library is free software: you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License version 3, modified in accordance with the provisions
12 // of the license to address the requirements of UK law.
13 //
14 // You should have received a copy of the modified GNU Lesser
15 // General Public License along with this library. If not, copies
16 // may be downloaded from http://www.ccp4.ac.uk/ccp4license.php
17 //
18 // This program is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU Lesser General Public License for more details.
22 //
23 // =================================================================
24 //
25 // 18.09.13 <-- Date of Last Modification.
26 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27 // -----------------------------------------------------------------
28 //
29 // **** Module : ccp4srs_index <interface>
30 // ~~~~~~~~~
31 // **** Classes : ccp4srs::Index - SRS data index class
32 // ~~~~~~~~~
33 //
34 // (C) E. Krissinel 2010-2013
35 //
36 // =================================================================
37 //
38 
39 #ifndef CCP4SRS_INDEX_H
40 #define CCP4SRS_INDEX_H
41 
42 #include "ccp4srs_monomer.h"
43 
44 namespace ccp4srs {
45 
46  DefineClass(Index);
47 
48  class Index {
49 
50  public :
51  mmdb::ResName entryID;
52  int nAtoms;
53  int nNonHAtoms;
54  int nBonds;
55  long fGraphPos;
56  long fStructPos;
57  mmdb::pstr Comp1;
58  mmdb::pstr Comp2;
59 
60  Index ();
61  virtual ~Index();
62 
63  int MakeCompositions ( PMonomer monomer );
64 
65  int write ( mmdb::io::RFile f, int version, PMemIO memIO=NULL );
66  int read ( mmdb::io::RFile f, int version, PMemIO memIO=NULL );
67 
68  protected:
69 
70  void IndexInit();
71 
72  virtual void write_mem ( PMemIO memIO, int version );
73  virtual bool read_mem ( PMemIO memIO, int version,
74  bool * Ok = NULL );
75 
76  };
77 
78 } // namespace ccp4srs
79 
80 
81 #endif // CCP4SRS_INDEX_H
int nAtoms
number of atoms in the entry
Definition: ccp4srs_index.h:52
DefineClass(Angle)
int nBonds
number of bonds in the entry
Definition: ccp4srs_index.h:54
long fGraphPos
file offset for CGraph
Definition: ccp4srs_index.h:55
mmdb::pstr Comp1
composition string
Definition: ccp4srs_index.h:57
int nNonHAtoms
number of non-hydrogen atoms in the entry
Definition: ccp4srs_index.h:53
mmdb::ResName entryID
monomer or link ID
Definition: ccp4srs_index.h:51
mmdb::pstr Comp2
composition string with leaving atom
Definition: ccp4srs_index.h:58
void IndexInit()
Definition: ccp4srs_index.cpp:55
int read(mmdb::io::RFile f, int version, PMemIO memIO=NULL)
Definition: ccp4srs_index.cpp:151
Index()
Definition: ccp4srs_index.cpp:46
Definition: ccp4srs_angle.cpp:42
virtual void write_mem(PMemIO memIO, int version)
Definition: ccp4srs_index.cpp:171
int write(mmdb::io::RFile f, int version, PMemIO memIO=NULL)
Definition: ccp4srs_index.cpp:134
int MakeCompositions(PMonomer monomer)
Definition: ccp4srs_index.cpp:66
virtual ~Index()
Definition: ccp4srs_index.cpp:50
virtual bool read_mem(PMemIO memIO, int version, bool *Ok=NULL)
Definition: ccp4srs_index.cpp:185
Definition: ccp4srs_index.h:48
long fStructPos
file offset for CCP4SRSMonomer
Definition: ccp4srs_index.h:56