changed reading hint
[gromacs/adressmacs.git] / src / ngmx / manager.h
blob9e9be786be3e0e64e2208cd17d00316a8f888cb5
1 /*
2 * $Id$
3 *
4 * This source code is part of
5 *
6 * G R O M A C S
7 *
8 * GROningen MAchine for Chemical Simulations
9 *
10 * VERSION 2.0
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
16 * Please refer to:
17 * GROMACS: A message-passing parallel molecular dynamics implementation
18 * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19 * Comp. Phys. Comm. 91, 43-56 (1995)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
23 * or e-mail to:
24 * gromacs@chem.rug.nl
26 * And Hey:
27 * Great Red Oystrich Makes All Chemists Sane
30 #ifndef _manager_h
31 #define _manager_h
33 static char *SRCID_manager_h = "$Id$";
35 #include <stdio.h>
36 #include "typedefs.h"
37 #include "x11.h"
38 #include "xutil.h"
39 #include "3dview.h"
40 #include "nleg.h"
41 #include "buttons.h"
43 /* Some window sizes */
44 #define EWIDTH 200
45 #define EHEIGHT 0
46 #define LDHEIGHT 0
47 #define LEGHEIGHT 60
49 typedef enum { eOSingle, eOBond, eOHBond, eONR } eObject;
51 typedef enum { eVNormal, eVSpecial, eVHidden, evNR } eVisible;
53 enum { eBThin, eBFat, eBVeryFat, eBSpheres, eBNR };
55 typedef struct {
56 t_windata wd; /* Mol window structure */
57 bool bShowHydrogen; /* Show Hydrogens? */
58 int bond_type; /* Show one of the above bondtypes */
59 bool bBoxSelect; /* Show Box? */
60 } t_molwin;
62 typedef struct {
63 eObject eO; /* The type of object */
64 eVisible eV; /* Visibility status of the object */
65 unsigned long color; /* The color (only when eV==evSpecial) */
66 atom_id ai,aj; /* The atom_id for i (and j if bond) */
67 real z; /* The Z-coordinate for depht cueing */
68 } t_object;
70 typedef struct {
71 t_block *grps; /* Blocks with atom numbers */
72 char **grpnames; /* The names of the groups */
73 bool *bShow; /* Show a group ? */
74 } t_filter;
77 * t_manager structure:
79 * This structure manages the display area for the gmx program.
80 * It reads the status file and sends messages when windows need to
81 * be updated.
84 typedef struct {
85 int status;
86 char *trajfile;
87 int natom; /* The number of atoms */
88 t_topology top; /* topology */
89 rvec box_size;
90 int step; /* The actual step number */
91 real time; /* The actual time */
92 rvec *x; /* The coordinates */
93 iv2 *ix; /* The coordinates after projection */
94 real *zz; /* Z-coords */
95 matrix box; /* The box */
96 int nobj; /* The number of objects */
97 t_object *obj; /* The objects on screen */
98 bool *bHydro; /* TRUE for hydrogen atoms */
99 bool *bLabel; /* Show a label on atom i? */
100 char **szLab; /* Array of pointers to labels */
101 unsigned long *col; /* The colour of the atoms */
102 int *size; /* The size of the atoms */
103 real *vdw; /* The VDWaals radius of the atoms */
104 bool *bVis; /* visibility of atoms */
105 bool bPbc; /* Remove Periodic boundary */
106 bool bAnimate; /* Animation going on? */
107 bool bEof; /* End of file reached? */
108 bool bStop; /* Stopped by user? */
109 bool bSort; /* Sort the coordinates */
110 bool bPlus; /* Draw plus for single atom */
111 int nSkip; /* Skip n steps after each frame */
113 t_windata wd; /* The manager subwindow */
114 t_windata title; /* Title window */
115 t_3dview *view; /* The 3d struct */
116 t_molwin *molw; /* The molecule window */
117 t_butbox *vbox; /* The video box */
118 t_butbox *bbox; /* The button box */
119 t_legendwin *legw; /* The legend window */
120 } t_manager;
122 extern t_manager *init_man(t_x11 *x11,Window Parent,
123 int x,int y,int width,int height,
124 unsigned long fg,unsigned long bg);
125 /* Initiate the display manager */
127 extern void move_man(t_x11 *x11,t_manager *man,int width,int height);
128 /* Set the right size for this window */
130 extern void step_message(t_x11 *x11,t_manager *man);
131 /* Send a message to the manager */
133 extern void set_file(t_x11 *x11,t_manager *man,char *trajectory,char *status);
134 /* Read a new trajectory and topology */
136 extern void map_man(t_x11 *x11,t_manager *man);
138 extern void move_man(t_x11 *x11,t_manager *man,int width,int height);
140 extern bool toggle_animate (t_x11 *x11,t_manager *man);
142 extern bool toggle_pbc (t_manager *man);
144 extern void no_labels(t_x11 *x11,t_manager *man);
145 /* Turn off all labels */
147 extern void done_man(t_x11 *x11,t_manager *man);
148 /* Clean up man struct */
150 extern void draw_mol(t_x11 *x11,t_manager *man);
152 extern void create_visibility(t_manager *man);
154 extern void do_filter(t_x11 *x11,t_manager *man,t_filter *filter);
156 #endif