ARB
RNA3D_StructureData.hxx
Go to the documentation of this file.
1 // =============================================================== //
2 // //
3 // File : RNA3D_StructureData.hxx //
4 // Purpose : //
5 // //
6 // Institute of Microbiology (Technical University Munich) //
7 // http://www.arb-home.de/ //
8 // //
9 // =============================================================== //
10 
11 #ifndef RNA3D_STRUCTUREDATA_HXX
12 #define RNA3D_STRUCTUREDATA_HXX
13 
14 #ifndef ARBDB_H
15 #include <arbdb.h>
16 #endif
17 
18 #define SAI 0
19 #define SEARCH 1
20 
21 #define SSU_16S 1
22 #define LSU_23S 2
23 #define LSU_5S 3
24 
25 #define _1PNU 1
26 #define _1VOR 2
27 #define _1C2W 3
28 
29 // DisplayLists
30 enum {
50 };
51 
53  char base;
54  char mask;
55  char code;
56  int pos;
57  int helixNr;
58  float x;
59  float y;
60  float z;
62 };
63 
64 struct Struct2Dinfo {
65  char base; // Nucleotide
66  char mask; // Helix mask [..<<<..>>>]
67  char code; // Helix code (H)elix (N)on-helix (S)tart (E)nd
68  int pos; // Base Position
69  int helixNr; // Helix Number
70  struct Struct2Dinfo *next;
71 };
72 
73 struct Struct3Dinfo {
74  float x;
75  float y;
76  float z;
77  char base;
78  int pos;
79  struct Struct3Dinfo *next;
80 };
81 
82 struct HelixNrInfo {
83  float x, y, z;
84  int helixNr;
85  struct HelixNrInfo *next;
86 };
87 
88 struct CurrSpecies {
89  float x;
90  float y;
91  float z;
92  int pos;
93  char base;
94  struct CurrSpecies *next;
95 };
96 
97 struct Insertions {
98  int pos;
99  char base;
100  struct Insertions *next;
101 };
102 
103 struct Vector3;
104 
106 class BI_ecoli_ref;
107 struct ED4_plugin_host;
108 
109 struct Structure3D : virtual Noncopyable {
111 
113  int iMapSAI;
120  int HelixBase; // to create display lists storing helix information
121 
122  static GBDATA *gb_main;
125 
126  OpenGLGraphics *GRAPHICS; // not really a good place - it better should be passed from callers
127 
129  ~Structure3D();
130 
131  void ReadCoOrdinateFile();
132  void StoreCoordinates(float x, float y, float z, char base, unsigned int pos);
133 
135  void Store2Dinfo(char *info, int pos, int helixNr);
136 
138  void Store2D3Dinfo(Struct2Dinfo *s2D, Struct3Dinfo *s3D);
139 
140  static int FindTypeOfRNA();
141  void DeleteOldMoleculeData();
142 
144  void ComputeBasePositions();
145 
146  void PositionsToCoordinatesDispList(int listID, int *pos, int len);
147  void PointsToQuads(float x, float y, float z);
148  void StoreHelixNrInfo(float x, float y, float z, int helixNr);
149 
150  void GenerateDisplayLists();
151  void GenerateHelixDispLists(int HELIX_NR_ID, int HELIX_NR);
152  void GenerateHelixNrDispList(int startHx, int endHx);
156 
158 
160  void StoreCurrSpeciesDifference(char base, int pos);
161  void DeleteOldSpeciesData();
162  void BuildDisplayList(int listID, int *pos, int len);
165  void StoreInsertions(char base, int pos);
166  void DeleteOldInsertionData();
168 
169  void GenerateCursorPositionDispList(long pos);
170 
171  void MapSaiToEcoliTemplate();
173 
175  int NoOfHelices = 0;
176  switch (FindTypeOfRNA()) {
177  case LSU_23S: NoOfHelices = 101; break;
178  case SSU_16S: NoOfHelices = 50; break;
179  case LSU_5S: NoOfHelices = 5; break;
180  }
181  arb_assert(NoOfHelices);
182  return NoOfHelices;
183  }
184 };
185 
186 #else
187 #error RNA3D_StructureData.hxx included twice
188 #endif
#define arb_assert(cond)
Definition: arb_assert.h:245
static GBDATA * gb_main
struct CurrSpecies * next
#define LSU_5S
static char * y[maxsp+1]
void MapSearchStringsToEcoliTemplate(AW_root *awr)
void GenerateHelixDispLists(int HELIX_NR_ID, int HELIX_NR)
void GenerateBaseDifferenceDisplayList()
struct HelixNrInfo * next
void GenerateSecStructureUnpairedHelixRegions()
void GenerateHelixNrDispList(int startHx, int endHx)
void StoreCurrSpeciesDifference(char base, int pos)
struct Struct2Dinfo * next
void MapCurrentSpeciesToEcoliTemplate(AW_root *awr)
void GenerateMoleculeSkeleton()
void Store2D3Dinfo(Struct2Dinfo *s2D, Struct3Dinfo *s3D)
void GenerateSecStructureNonHelixRegions()
void BuildDisplayList(int listID, int *pos, int len)
#define SSU_16S
void StoreHelixNrInfo(float x, float y, float z, int helixNr)
struct Insertions * next
void GenerateCursorPositionDispList(long pos)
struct Struct2Dplus3D * next
#define LSU_23S
void GenerateInsertionDisplayList()
static int FindTypeOfRNA()
OpenGLGraphics * GRAPHICS
void PositionsToCoordinatesDispList(int listID, int *pos, int len)
void GenerateBaseDifferencePositionDisplayList()
struct Struct3Dinfo * next
void Store2Dinfo(char *info, int pos, int helixNr)
void StoreCoordinates(float x, float y, float z, char base, unsigned int pos)
void PointsToQuads(float x, float y, float z)
void StoreInsertions(char base, int pos)
Structure3D(ED4_plugin_host &host_)
void GetSecondaryStructureInfo()
BI_ecoli_ref * EColiRef
static int info[maxsites+1]
void GenerateTertiaryInteractionsDispLists()
void GenerateSecStructureHelixRegions()
void Combine2Dand3DstructureInfo()
ED4_plugin_host & Host