4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-2001
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * If you want to redistribute modifications, please consider that
22 * scientific software is very special. Version control is crucial -
23 * bugs must be traceable. We will be happy to consider code for
24 * inclusion in the official distribution, but derived work must not
25 * be called official GROMACS. Details are found in the README & COPYING
26 * files - if they are missing, get the official version at www.gromacs.org.
28 * To help us fund GROMACS development, we humbly ask that you cite
29 * the papers on the package - you can find them in the top README file.
31 * Do check out http://www.gromacs.org , or mail us at gromacs@gromacs.org .
34 * Good gRace! Old Maple Actually Chews Slate
40 static char *SRCID_manager_h = "$Id$";
49 /* Some window sizes */
55 typedef enum { eOSingle, eOBond, eOHBond, eONR } eObject;
57 typedef enum { eVNormal, eVSpecial, eVHidden, evNR } eVisible;
59 enum { eBThin, eBFat, eBVeryFat, eBSpheres, eBNR };
61 enum { esbNone, esbRect, esbTri, esbTrunc, esbNR };
64 t_windata wd; /* Mol window structure */
65 bool bShowHydrogen; /* Show Hydrogens? */
66 int bond_type; /* Show one of the above bondtypes */
67 int boxtype; /* Rectangular, Tric, TruncOct (display)*/
68 int realbox; /* Property of the real box */
72 eObject eO; /* The type of object */
73 eVisible eV; /* Visibility status of the object */
74 unsigned long color; /* The color (only when eV==evSpecial) */
75 atom_id ai,aj; /* The atom_id for i (and j if bond) */
76 real z; /* The Z-coordinate for depht cueing */
80 t_block *grps; /* Blocks with atom numbers */
81 char **grpnames; /* The names of the groups */
82 bool *bDisable; /* Group indexes out of natoms in TRX */
83 bool *bShow; /* Show a group ? */
87 * t_manager structure:
89 * This structure manages the display area for the gmx program.
90 * It reads the status file and sends messages when windows need to
97 int natom; /* The number of atoms */
98 t_topology top; /* topology */
100 int step; /* The actual step number */
101 real time; /* The actual time */
102 rvec *x; /* The coordinates */
103 iv2 *ix; /* The coordinates after projection */
104 real *zz; /* Z-coords */
105 matrix box; /* The box */
106 int nobj; /* The number of objects */
107 t_object *obj; /* The objects on screen */
108 bool *bHydro; /* TRUE for hydrogen atoms */
109 bool *bLabel; /* Show a label on atom i? */
110 char **szLab; /* Array of pointers to labels */
111 unsigned long *col; /* The colour of the atoms */
112 int *size; /* The size of the atoms */
113 real *vdw; /* The VDWaals radius of the atoms */
114 bool *bVis; /* visibility of atoms */
115 bool bPbc; /* Remove Periodic boundary */
116 bool bAnimate; /* Animation going on? */
117 bool bEof; /* End of file reached? */
118 bool bStop; /* Stopped by user? */
119 bool bSort; /* Sort the coordinates */
120 bool bPlus; /* Draw plus for single atom */
121 int nSkip; /* Skip n steps after each frame */
122 int nWait; /* Wait n ms after each frame */
124 t_windata wd; /* The manager subwindow */
125 t_windata title; /* Title window */
126 t_3dview *view; /* The 3d struct */
127 t_molwin *molw; /* The molecule window */
128 t_butbox *vbox; /* The video box */
129 t_butbox *bbox; /* The button box */
130 t_legendwin *legw; /* The legend window */
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,matrix box);
136 /* Initiate the display manager */
138 extern void move_man(t_x11 *x11,t_manager *man,int width,int height);
139 /* Set the right size for this window */
141 extern void step_message(t_x11 *x11,t_manager *man);
142 /* Send a message to the manager */
144 extern void set_file(t_x11 *x11,t_manager *man,char *trajectory,char *status);
145 /* Read a new trajectory and topology */
147 extern void map_man(t_x11 *x11,t_manager *man);
149 extern void move_man(t_x11 *x11,t_manager *man,int width,int height);
151 extern bool toggle_animate (t_x11 *x11,t_manager *man);
153 extern bool toggle_pbc (t_manager *man);
155 extern void no_labels(t_x11 *x11,t_manager *man);
156 /* Turn off all labels */
158 extern void done_man(t_x11 *x11,t_manager *man);
159 /* Clean up man struct */
161 extern void draw_mol(t_x11 *x11,t_manager *man);
163 extern void create_visibility(t_manager *man);
165 extern void do_filter(t_x11 *x11,t_manager *man,t_filter *filter);