home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / biology / gsrc208a.zip / GEP2.H < prev    next >
C/C++ Source or Header  |  1993-03-10  |  8KB  |  195 lines

  1. /*
  2.     GEPASI - a simulator of metabolic pathways and other dynamical systems
  3.     Copyright (C) 1989, 1992, 1993  Pedro Mendes
  4. */
  5.  
  6. /*************************************/
  7. /*                                   */
  8. /*         GWSIM - Simulation        */
  9. /*        MS-WINDOWS front end       */
  10. /*                                   */
  11. /*       Initialization and some     */
  12. /*           data structures         */
  13. /*                                   */
  14. /*           QuickC/WIN 1.0          */
  15. /*                                   */
  16. /*   (include here compilers that    */
  17. /*   compiled GWSIM successfully)    */
  18. /*                                   */
  19. /*************************************/
  20.  
  21.  
  22. struct kint {
  23.                unsigned char nconst;
  24.                unsigned char nmodf;
  25.                LPSTR descr;
  26.               LPSTR constnam;
  27.                };
  28.  
  29. struct nodet{
  30.              char item;
  31.              unsigned char val;
  32.              unsigned char left;
  33.              unsigned char right;
  34.             } ;
  35.  
  36. struct treet{
  37.              struct nodet node[256];
  38.              char id[64][10];
  39.              float constant[32];
  40.              int nnode,
  41.                  nnum,
  42.                  nid,
  43.                  nsub,
  44.                  npro,
  45.                  nmodf,
  46.                  nconst,
  47.                  revers;
  48.              char descr[64];
  49.             } ;
  50.  
  51. struct opt {
  52.             int dyn;
  53.             long pfo;
  54.             double    endtime;
  55.             double    reltol;
  56.             double    abstol;
  57.             double    hrcz;
  58.             int adams;
  59.             int bdf;
  60.             int ss;
  61.             int debug;
  62.             int txt;
  63.             int structan;
  64.             int staban;
  65.             int stdela;
  66.             int nonela;
  67.             int stdcc;
  68.             int noncc;
  69.             int dat;
  70.             int datsep;
  71.             int datwidth;
  72.             int dattit;
  73.             int datmca;
  74.             int datss;
  75.             int quotes;
  76.             int append;
  77.             char    timeu[32];
  78.             char    concu[32];
  79.             int scan;
  80.             int scanlog;
  81.             unsigned long scandens;
  82.            };
  83.  
  84. struct plt{
  85.            int type;        /* 0 for 2d, 1 for 3d */
  86.            int file;        /* 0 for dynamics, 1 for steady state */
  87.            int x;            /* column for x */
  88.            int y[10];        /* columns for y */
  89.            int z;            /* column for z */
  90.            int ny;            /* number of y variables */
  91.            int logx;        /* 1 if log x axis */
  92.            int logy;        /* 1 if log y axis */
  93.            int logz;        /* 1 if log z axis */
  94.            int lines;        /* 1 if points connected by lines */
  95.            int colour;        /* 1 if colour to be used */
  96.            int hidden;        /* 1 if hidden line removal */
  97.            int contour;        /* 1 if contour plots on base */
  98.           };
  99.  
  100. struct ou {
  101.            LPSTR title;
  102.            unsigned int idx;
  103.           };
  104.  
  105. struct sp{
  106.           int idx;
  107.           LPSTR title;
  108.           double low;
  109.           double high;
  110.           unsigned long dens;
  111.           int log;
  112.           int lidx;
  113.           int linkedto;
  114.           double factor;
  115.           int operation;
  116.          };
  117.  
  118. extern GLOBALHANDLE hMetname;                                /* handle to memory block w/ metname    */
  119. extern GLOBALHANDLE hStepname;                                /* handle to memory block w/ stepname    */
  120. extern GLOBALHANDLE hStoiu;                                    /* handle to memory block w/ stoiu        */
  121. extern GLOBALHANDLE hSto;                                    /* handle to memory block w/ stoi        */
  122. extern GLOBALHANDLE hLoop;                                    /* handle to memory block w/ loop        */
  123. extern GLOBALHANDLE hParams;                                /* handle to memory block w/ params        */
  124. extern GLOBALHANDLE hKtype;                                    /* handle to memory block w/ ktype        */
  125. extern GLOBALHANDLE hRstr;                                    /* handle to memory block w/ rstr        */
  126. extern GLOBALHANDLE hOutpEl;                                /* handle to memory block w/ outpel        */
  127. extern GLOBALHANDLE hStrPool;                                /* handle to memory block w/ strings    */
  128. extern GLOBALHANDLE hTree;                                    /* handle to memory block w/ trees        */
  129. extern GLOBALHANDLE hTreeStr;                                /* handle to memory block w/ tree str    */
  130. extern GLOBALHANDLE hTmpF;                                    /* handle to memory block w/ temp files    */
  131.  
  132. extern char (huge *metname)[NAME_L];                        /* pointer to work with metname array    */
  133. extern char (huge *stepname)[NAME_L];                        /* metabolite names                        */
  134. extern int        huge *stoiu;                                /* pointer to work with stoiu array        */
  135. extern int        huge *stoi;                                    /* pointer to work with stoi array        */
  136. extern unsigned char (huge *loop)[MAX_STEP][MAX_MET];        /* def. of modification loops            */
  137. extern int        (huge *rstr)[MAX_STEP][MAX_MOL];            /* order of substrates and products        */
  138. extern char    topname[256];                                    /* title for the topology                */
  139. extern char stepstr[MAX_STEP][256];                        /* array to hold description of steps    */
  140. extern double     huge *params[MAX_STEP];                        /* ptr to parameters for each rate eq.    */
  141. extern DWORD    sizeparam;                                    /* size of paameters memory block        */
  142. extern DWORD    sizeoutp;                                    /* size of outpel memory block            */
  143. extern DWORD    sizestrp;                                    /* size of StrPool memory block            */
  144. extern DWORD    sizestra;                                    /* size of allocated strings in StrPool    */
  145. extern DWORD    sizespar;
  146. extern DWORD    sizetr;                                        /* size of allocated strings in TreeStr    */
  147. extern unsigned char    revers[MAX_STEP];                    /* 1 if reaction is reversible            */
  148. extern int        kinetu[MAX_STEP];                            /* type of kinetics (user numb.)        */
  149. extern int        kfl[MAX_STEP];                                /* flags for input of user-def.kinetics */
  150. extern int        intmet[MAX_MET];                            /* 1 if internal metabolite                */
  151. extern double    xu[MAX_MET];                                /* metabolite concentrations            */
  152. extern double    moiety[MAX_MET];                            /* concentration of conserved moieties    */
  153. extern LPSTR    strpool;                                    /* points to the string pool mem block    */
  154. extern LPSTR    treestr;                                    /* points to the tree string pool        */
  155. extern LPSTR    treeptr;                                    /* points to the tree string pool        */
  156. extern struct    opt options;                                /* structure with simulation options    */
  157. extern struct    plt plot;                                    /* structure with plot options            */
  158. extern struct    kint huge *ktype;                            /* ptr array of kinetic types & proprt    */
  159. extern struct    ou huge *outpel;                            /* ptr array of output elements            */
  160. extern struct    sp huge *spar;                                /* ptr array of scanning elements        */
  161. extern float    ver_no;                                        /* .top and .sim version number            */
  162. extern double    dft_endtime;                                /* time value for last iteration        */
  163. extern double    dft_hrcz;                                    /* highest rate considered zero            */
  164. extern int        totmet;                                        /* number of total metabolites            */
  165. extern int        nmetab;                                        /* number of internal metabolites        */
  166. extern int        indmet;                                        /* number of independent metabolites    */
  167. extern int        nextmet;                                    /* number of external metabolites        */
  168. extern int        nsteps;                                        /* number of steps                        */
  169. extern int        nloops;                                        /* number of modifier loops             */
  170. extern int        noutpel;                                    /* number of output elements            */
  171. extern int        nudf;                                        /* number of user-defined functions        */
  172. extern int        nrateq;                                        /* number of user-defined functions        */
  173. extern int        totsel;                                     /* number of selected output elements    */
  174. extern int        totscan;                                    /* number of dimensions to scan            */
  175. extern int        nscanpar;                                   /* number of scanning elements            */
  176. extern int        nlinks;                                        /* number of links between parameters    */
  177. extern unsigned char dft_debugval;                            /* debug mode                            */
  178. extern double    dft_conc;                                    /* default cmetabolite concentration    */
  179. extern double    dft_const;                                    /* default value for kinetic constants    */
  180. extern char        *dft_timeu;                                    /* default time units                    */
  181. extern char        *dft_concu;                                    /* default conctration units            */
  182. extern unsigned long dft_pfo;                                /* number of points for output            */
  183. extern struct    treet huge *tree;                            /* function tree for rate equations        */
  184. extern struct    treet tr;                                    /* tree for the input                    */
  185. extern LPSTR    TmpFiles;                                    /* string holding names of temp files    */
  186.  
  187. int        InitGepasiVar( void );
  188. void    TidyGepasiVar( void );
  189. int     SetParams( void );
  190. int     SetOutpEl( void );
  191. void     step_string( void );
  192. void    conc_dft( void );
  193. void     numer_dft( void );
  194.  
  195.