3 * This source code is part of
7 * GROningen MAchine for Chemical Simulations
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
33 * Gyas ROwers Mature At Cryogenic Speed
49 /* Some window sizes */
56 eOSingle, eOBond, eOHBond, eONR
60 eVNormal, eVSpecial, eVHidden, evNR
64 eBThin, eBFat, eBVeryFat, eBSpheres, eBNR
68 esbNone, esbRect, esbTri, esbTrunc, esbNR
72 t_windata wd; /* Mol window structure */
73 bool bShowHydrogen; /* Show Hydrogens? */
74 int bond_type; /* Show one of the above bondtypes */
75 int ePBC; /* PBC type */
76 int boxtype; /* Rectangular, Tric, TruncOct (display)*/
77 int realbox; /* Property of the real box */
81 eObject eO; /* The type of object */
82 eVisible eV; /* Visibility status of the object */
83 unsigned long color; /* The color (only when eV==evSpecial) */
84 atom_id ai, aj; /* The atom_id for i (and j if bond) */
85 real z; /* The Z-coordinate for depht cueing */
89 t_blocka *grps; /* Blocks with atom numbers */
90 char **grpnames; /* The names of the groups */
91 bool *bDisable; /* Group indexes out of natoms in TRX */
92 bool *bShow; /* Show a group ? */
96 * t_manager structure:
98 * This structure manages the display area for the gmx program.
99 * It reads the status file and sends messages when windows need to
105 const char *trajfile;
106 int natom; /* The number of atoms */
107 t_topology top; /* topology */
109 real time; /* The actual time */
110 rvec *x; /* The coordinates */
111 iv2 *ix; /* The coordinates after projection */
112 real *zz; /* Z-coords */
113 matrix box; /* The box */
114 int nobj; /* The number of objects */
115 t_object *obj; /* The objects on screen */
116 bool *bHydro; /* true for hydrogen atoms */
117 bool *bLabel; /* Show a label on atom i? */
118 char **szLab; /* Array of pointers to labels */
119 unsigned long *col; /* The colour of the atoms */
120 int *size; /* The size of the atoms */
121 real *vdw; /* The VDWaals radius of the atoms */
122 bool *bVis; /* visibility of atoms */
123 bool bPbc; /* Remove Periodic boundary */
124 bool bAnimate; /* Animation going on? */
125 bool bEof; /* End of file reached? */
126 bool bStop; /* Stopped by user? */
127 bool bSort; /* Sort the coordinates */
128 bool bPlus; /* Draw plus for single atom */
129 int nSkip; /* Skip n steps after each frame */
130 int nWait; /* Wait n ms after each frame */
131 gmx_rmpbc_t gpbc; /* For removing peridiocity */
133 t_windata wd; /* The manager subwindow */
134 t_windata title; /* Title window */
135 t_3dview *view; /* The 3d struct */
136 t_molwin *molw; /* The molecule window */
137 t_butbox *vbox; /* The video box */
138 t_butbox *bbox; /* The button box */
139 t_legendwin *legw; /* The legend window */
141 output_env_t oenv; /* output env data */
144 extern t_manager *init_man(t_x11 *x11, Window Parent,
145 int x, int y, int width, int height,
146 unsigned long fg, unsigned long bg,
147 int ePBC, matrix box, const output_env_t oenv);
148 /* Initiate the display manager */
150 extern void move_man(t_x11 *x11, t_manager *man, int width, int height);
151 /* Set the right size for this window */
153 extern void step_message(t_x11 *x11, t_manager *man);
154 /* Send a message to the manager */
156 extern void set_file(t_x11 *x11, t_manager *man, const char *trajectory,
158 /* Read a new trajectory and topology */
160 extern void map_man(t_x11 *x11, t_manager *man);
162 extern void move_man(t_x11 *x11, t_manager *man, int width, int height);
164 extern bool toggle_animate (t_x11 *x11, t_manager *man);
166 extern bool toggle_pbc (t_manager *man);
168 extern void no_labels(t_x11 *x11, t_manager *man);
169 /* Turn off all labels */
171 extern void done_man(t_x11 *x11, t_manager *man);
172 /* Clean up man struct */
174 extern void draw_mol(t_x11 *x11, t_manager *man);
176 extern void create_visibility(t_manager *man);
178 extern void do_filter(t_x11 *x11, t_manager *man, t_filter *filter);