source: tags/ms_r16q3/RNA3D/RNA3D_StructureData.hxx

Last change on this file was 11002, checked in by westram, 10 years ago
  • 'class { public' → struct
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.9 KB
Line 
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
30enum {
31    STRUCTURE_BACKBONE = 300,
32    STRUCTURE_BACKBONE_CLR,
33    HELIX_NUMBERS,
34    HELIX_NUMBERS_POINTS,
35    HELIX_A, HELIX_G, HELIX_C, HELIX_U,
36    UNPAIRED_HELIX_A, UNPAIRED_HELIX_G, UNPAIRED_HELIX_C, UNPAIRED_HELIX_U,
37    NON_HELIX_A, NON_HELIX_G, NON_HELIX_C, NON_HELIX_U,
38    STRUCTURE_POS,
39    STRUCTURE_POS_ANCHOR,
40    MAP_SPECIES_BASE_DIFFERENCE,
41    MAP_SPECIES_BASE_DIFFERENCE_POS, MAP_SPECIES_BASE_DIFFERENCE_POS_ANCHOR,
42    MAP_SPECIES_BASE_A, MAP_SPECIES_BASE_G, MAP_SPECIES_BASE_C, MAP_SPECIES_BASE_U,
43    MAP_SPECIES_DELETION, MAP_SPECIES_MISSING,
44    MAP_SPECIES_INSERTION_POINTS, MAP_SPECIES_INSERTION_BASES, MAP_SPECIES_INSERTION_BASES_ANCHOR,
45    MAP_SAI_TO_STRUCTURE,
46    MAP_SEARCH_STRINGS_TO_STRUCTURE, MAP_SEARCH_STRINGS_BACKBONE,
47    ECOLI_CURSOR_POSITION,
48    ECOLI_TERTIARY_INTRACTION_PSEUDOKNOTS,
49    ECOLI_TERTIARY_INTRACTION_TRIPLE_BASES
50};
51
52struct Struct2Dplus3D {
53    char base;
54    char mask;
55    char code;
56    int pos;
57    int helixNr;
58    float x;
59    float y;
60    float z;
61    struct Struct2Dplus3D *next;
62};
63
64struct 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
73struct Struct3Dinfo {
74    float x;
75    float y;
76    float z;
77    char base;
78    int pos;
79    struct Struct3Dinfo *next;
80};
81
82struct HelixNrInfo {
83    float x, y, z;
84    int helixNr;
85    struct HelixNrInfo *next;
86};
87
88struct CurrSpecies {
89    float x;
90    float y;
91    float z;
92    int pos;
93    char base;
94    struct CurrSpecies *next;
95};
96
97struct Insertions {
98    int pos;
99    char base;
100    struct Insertions *next;
101};
102
103struct Vector3;
104
105class ED4_sequence_terminal;
106class BI_ecoli_ref;
107struct ED4_plugin_host;
108
109struct Structure3D : virtual Noncopyable {
110    Vector3 *strCen;
111
112    int iInterval;
113    int iMapSAI;
114    int iMapSearch;
115    int iMapEnable;
116    int iStartPos, iEndPos;
117    int iEColiStartPos, iEColiEndPos;
118    int iTotalSubs, iTotalDels, iTotalIns;
119    int LSU_molID;
120    int HelixBase; // to create display lists storing helix information
121
122    static GBDATA         *gb_main;
123    BI_ecoli_ref          *EColiRef;
124    ED4_plugin_host&  Host;
125
126    OpenGLGraphics *GRAPHICS; // not really a good place - it better should be passed from callers
127
128    Structure3D(ED4_plugin_host& host_);
129    ~Structure3D();
130
131    void ReadCoOrdinateFile();
132    void StoreCoordinates(float x, float y, float z, char base, unsigned int pos);
133
134    void GetSecondaryStructureInfo();
135    void Store2Dinfo(char *info, int pos, int helixNr);
136    void PrepareSecondaryStructureData();
137
138    void Combine2Dand3DstructureInfo();
139    void Store2D3Dinfo(Struct2Dinfo *s2D, Struct3Dinfo *s3D);
140
141    static int FindTypeOfRNA();
142    void DeleteOldMoleculeData();
143
144    void GenerateMoleculeSkeleton();
145    void ComputeBasePositions();
146
147    void PositionsToCoordinatesDispList(int listID, int *pos, int len);
148    void PointsToQuads(float x, float y, float z);
149    void StoreHelixNrInfo(float x, float y, float z, int helixNr);
150
151    void GenerateDisplayLists();
152    void GenerateHelixDispLists(int HELIX_NR_ID, int HELIX_NR);
153    void GenerateHelixNrDispList(int startHx, int endHx);
154    void GenerateSecStructureHelixRegions();
155    void GenerateSecStructureNonHelixRegions();
156    void GenerateSecStructureUnpairedHelixRegions();
157
158    void GenerateTertiaryInteractionsDispLists();
159
160    void MapCurrentSpeciesToEcoliTemplate(AW_root *awr);
161    void StoreCurrSpeciesDifference(char base, int pos);
162    void DeleteOldSpeciesData();
163    void BuildDisplayList(int listID, int *pos, int len);
164    void GenerateBaseDifferenceDisplayList();
165    void GenerateBaseDifferencePositionDisplayList();
166    void StoreInsertions(char base, int pos);
167    void DeleteOldInsertionData();
168    void GenerateInsertionDisplayList();
169
170    void GenerateCursorPositionDispList(long pos);
171
172    void MapSaiToEcoliTemplate();
173    void MapSearchStringsToEcoliTemplate(AW_root *awr);
174};
175
176#else
177#error RNA3D_StructureData.hxx included twice
178#endif
Note: See TracBrowser for help on using the repository browser.