CMake checks for regular expression support.
[gromacs/qmmm-gamess-us.git] / src / ngmx / manager.h
blob0c13baa3da2f30a0412f860aed93d98220414105
1 /*
2 *
3 * This source code is part of
4 *
5 * G R O M A C S
6 *
7 * GROningen MAchine for Chemical Simulations
8 *
9 * VERSION 3.2.0
10 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12 * Copyright (c) 2001-2004, The GROMACS development team,
13 * check out http://www.gromacs.org for more information.
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * If you want to redistribute modifications, please consider that
21 * scientific software is very special. Version control is crucial -
22 * bugs must be traceable. We will be happy to consider code for
23 * inclusion in the official distribution, but derived work must not
24 * be called official GROMACS. Details are found in the README & COPYING
25 * files - if they are missing, get the official version at www.gromacs.org.
27 * To help us fund GROMACS development, we humbly ask that you cite
28 * the papers on the package - you can find them in the top README file.
30 * For more info, check our website at http://www.gromacs.org
32 * And Hey:
33 * Gyas ROwers Mature At Cryogenic Speed
36 #ifndef _manager_h
37 #define _manager_h
39 #include <stdio.h>
40 #include "typedefs.h"
41 #include "x11.h"
42 #include "xutil.h"
43 #include "3dview.h"
44 #include "nleg.h"
45 #include "buttons.h"
47 /* Some window sizes */
48 #define EWIDTH 200
49 #define EHEIGHT 0
50 #define LDHEIGHT 0
51 #define LEGHEIGHT 60
53 typedef enum { eOSingle, eOBond, eOHBond, eONR } eObject;
55 typedef enum { eVNormal, eVSpecial, eVHidden, evNR } eVisible;
57 enum { eBThin, eBFat, eBVeryFat, eBSpheres, eBNR };
59 enum { esbNone, esbRect, esbTri, esbTrunc, esbNR };
61 typedef struct {
62 t_windata wd; /* Mol window structure */
63 bool bShowHydrogen; /* Show Hydrogens? */
64 int bond_type; /* Show one of the above bondtypes */
65 int ePBC; /* PBC type */
66 int boxtype; /* Rectangular, Tric, TruncOct (display)*/
67 int realbox; /* Property of the real box */
68 } t_molwin;
70 typedef struct {
71 eObject eO; /* The type of object */
72 eVisible eV; /* Visibility status of the object */
73 unsigned long color; /* The color (only when eV==evSpecial) */
74 atom_id ai,aj; /* The atom_id for i (and j if bond) */
75 real z; /* The Z-coordinate for depht cueing */
76 } t_object;
78 typedef struct {
79 t_blocka *grps; /* Blocks with atom numbers */
80 char **grpnames; /* The names of the groups */
81 bool *bDisable; /* Group indexes out of natoms in TRX */
82 bool *bShow; /* Show a group ? */
83 } t_filter;
86 * t_manager structure:
88 * This structure manages the display area for the gmx program.
89 * It reads the status file and sends messages when windows need to
90 * be updated.
93 typedef struct {
94 int status;
95 const char *trajfile;
96 int natom; /* The number of atoms */
97 t_topology top; /* topology */
98 rvec box_size;
99 real time; /* The actual time */
100 rvec *x; /* The coordinates */
101 iv2 *ix; /* The coordinates after projection */
102 real *zz; /* Z-coords */
103 matrix box; /* The box */
104 int nobj; /* The number of objects */
105 t_object *obj; /* The objects on screen */
106 bool *bHydro; /* TRUE for hydrogen atoms */
107 bool *bLabel; /* Show a label on atom i? */
108 char **szLab; /* Array of pointers to labels */
109 unsigned long *col; /* The colour of the atoms */
110 int *size; /* The size of the atoms */
111 real *vdw; /* The VDWaals radius of the atoms */
112 bool *bVis; /* visibility of atoms */
113 bool bPbc; /* Remove Periodic boundary */
114 bool bAnimate; /* Animation going on? */
115 bool bEof; /* End of file reached? */
116 bool bStop; /* Stopped by user? */
117 bool bSort; /* Sort the coordinates */
118 bool bPlus; /* Draw plus for single atom */
119 int nSkip; /* Skip n steps after each frame */
120 int nWait; /* Wait n ms after each frame */
122 t_windata wd; /* The manager subwindow */
123 t_windata title; /* Title window */
124 t_3dview *view; /* The 3d struct */
125 t_molwin *molw; /* The molecule window */
126 t_butbox *vbox; /* The video box */
127 t_butbox *bbox; /* The button box */
128 t_legendwin *legw; /* The legend window */
130 output_env_t oenv; /* output env data */
131 } t_manager;
133 extern t_manager *init_man(t_x11 *x11,Window Parent,
134 int x,int y,int width,int height,
135 unsigned long fg,unsigned long bg,
136 int ePBC,matrix box, const output_env_t oenv);
137 /* Initiate the display manager */
139 extern void move_man(t_x11 *x11,t_manager *man,int width,int height);
140 /* Set the right size for this window */
142 extern void step_message(t_x11 *x11,t_manager *man);
143 /* Send a message to the manager */
145 extern void set_file(t_x11 *x11,t_manager *man,const char *trajectory,
146 const char *status);
147 /* Read a new trajectory and topology */
149 extern void map_man(t_x11 *x11,t_manager *man);
151 extern void move_man(t_x11 *x11,t_manager *man,int width,int height);
153 extern bool toggle_animate (t_x11 *x11,t_manager *man);
155 extern bool toggle_pbc (t_manager *man);
157 extern void no_labels(t_x11 *x11,t_manager *man);
158 /* Turn off all labels */
160 extern void done_man(t_x11 *x11,t_manager *man);
161 /* Clean up man struct */
163 extern void draw_mol(t_x11 *x11,t_manager *man);
165 extern void create_visibility(t_manager *man);
167 extern void do_filter(t_x11 *x11,t_manager *man,t_filter *filter);
169 #endif