Re-organize BlueGene toolchain files
[gromacs.git] / src / ngmx / manager.h
blobe5d44b9ea24a3340546fa46b60e059b28e9adecd
1 /*
2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5 * Copyright (c) 2001-2004, The GROMACS development team,
6 * check out http://www.gromacs.org for more information.
7 * Copyright (c) 2012, by the GROMACS development team, led by
8 * David van der Spoel, Berk Hess, Erik Lindahl, and including many
9 * others, as listed in the AUTHORS file in the top-level source
10 * directory and at http://www.gromacs.org.
12 * GROMACS is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public License
14 * as published by the Free Software Foundation; either version 2.1
15 * of the License, or (at your option) any later version.
17 * GROMACS is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with GROMACS; if not, see
24 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
25 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 * If you want to redistribute modifications to GROMACS, please
28 * consider that scientific software is very special. Version
29 * control is crucial - bugs must be traceable. We will be happy to
30 * consider code for inclusion in the official distribution, but
31 * derived work must not be called official GROMACS. Details are found
32 * in the README & COPYING files - if they are missing, get the
33 * official version at http://www.gromacs.org.
35 * To help us fund GROMACS development, we humbly ask that you cite
36 * the research papers on the package. Check out http://www.gromacs.org.
39 #ifndef _manager_h
40 #define _manager_h
42 #include <stdio.h>
43 #include "typedefs.h"
44 #include "x11.h"
45 #include "xutil.h"
46 #include "3dview.h"
47 #include "nleg.h"
48 #include "buttons.h"
49 #include "statutil.h"
50 #include "rmpbc.h"
52 /* Some window sizes */
53 #define EWIDTH 200
54 #define EHEIGHT 0
55 #define LDHEIGHT 0
56 #define LEGHEIGHT 60
58 typedef enum { eOSingle, eOBond, eOHBond, eONR } eObject;
60 typedef enum { eVNormal, eVSpecial, eVHidden, evNR } eVisible;
62 enum { eBThin, eBFat, eBVeryFat, eBSpheres, eBNR };
64 enum { esbNone, esbRect, esbTri, esbTrunc, esbNR };
66 typedef struct {
67 t_windata wd; /* Mol window structure */
68 gmx_bool bShowHydrogen; /* Show Hydrogens? */
69 int bond_type; /* Show one of the above bondtypes */
70 int ePBC; /* PBC type */
71 int boxtype; /* Rectangular, Tric, TruncOct (display)*/
72 int realbox; /* Property of the real box */
73 } t_molwin;
75 typedef struct {
76 eObject eO; /* The type of object */
77 eVisible eV; /* Visibility status of the object */
78 unsigned long color; /* The color (only when eV==evSpecial) */
79 atom_id ai,aj; /* The atom_id for i (and j if bond) */
80 real z; /* The Z-coordinate for depht cueing */
81 } t_object;
83 typedef struct {
84 t_blocka *grps; /* Blocks with atom numbers */
85 char **grpnames; /* The names of the groups */
86 gmx_bool *bDisable; /* Group indexes out of natoms in TRX */
87 gmx_bool *bShow; /* Show a group ? */
88 } t_filter;
91 * t_manager structure:
93 * This structure manages the display area for the gmx program.
94 * It reads the status file and sends messages when windows need to
95 * be updated.
98 typedef struct {
99 t_trxstatus *status;
100 const char *trajfile;
101 int natom; /* The number of atoms */
102 t_topology top; /* topology */
103 rvec box_size;
104 real time; /* The actual time */
105 rvec *x; /* The coordinates */
106 iv2 *ix; /* The coordinates after projection */
107 real *zz; /* Z-coords */
108 matrix box; /* The box */
109 int nobj; /* The number of objects */
110 t_object *obj; /* The objects on screen */
111 gmx_bool *bHydro; /* TRUE for hydrogen atoms */
112 gmx_bool *bLabel; /* Show a label on atom i? */
113 char **szLab; /* Array of pointers to labels */
114 unsigned long *col; /* The colour of the atoms */
115 int *size; /* The size of the atoms */
116 real *vdw; /* The VDWaals radius of the atoms */
117 gmx_bool *bVis; /* visibility of atoms */
118 gmx_bool bPbc; /* Remove Periodic boundary */
119 gmx_bool bAnimate; /* Animation going on? */
120 gmx_bool bEof; /* End of file reached? */
121 gmx_bool bStop; /* Stopped by user? */
122 gmx_bool bSort; /* Sort the coordinates */
123 gmx_bool bPlus; /* Draw plus for single atom */
124 int nSkip; /* Skip n steps after each frame */
125 int nWait; /* Wait n ms after each frame */
126 gmx_rmpbc_t gpbc; /* For removing peridiocity */
128 t_windata wd; /* The manager subwindow */
129 t_windata title; /* Title window */
130 t_3dview *view; /* The 3d struct */
131 t_molwin *molw; /* The molecule window */
132 t_butbox *vbox; /* The video box */
133 t_butbox *bbox; /* The button box */
134 t_legendwin *legw; /* The legend window */
136 output_env_t oenv; /* output env data */
137 } t_manager;
139 extern t_manager *init_man(t_x11 *x11,Window Parent,
140 int x,int y,int width,int height,
141 unsigned long fg,unsigned long bg,
142 int ePBC,matrix box, const output_env_t oenv);
143 /* Initiate the display manager */
145 extern void move_man(t_x11 *x11,t_manager *man,int width,int height);
146 /* Set the right size for this window */
148 extern void step_message(t_x11 *x11,t_manager *man);
149 /* Send a message to the manager */
151 extern void set_file(t_x11 *x11,t_manager *man,const char *trajectory,
152 const char *status);
153 /* Read a new trajectory and topology */
155 extern void map_man(t_x11 *x11,t_manager *man);
157 extern void move_man(t_x11 *x11,t_manager *man,int width,int height);
159 extern gmx_bool toggle_animate (t_x11 *x11,t_manager *man);
161 extern gmx_bool toggle_pbc (t_manager *man);
163 extern void no_labels(t_x11 *x11,t_manager *man);
164 /* Turn off all labels */
166 extern void done_man(t_x11 *x11,t_manager *man);
167 /* Clean up man struct */
169 extern void draw_mol(t_x11 *x11,t_manager *man);
171 extern void create_visibility(t_manager *man);
173 extern void do_filter(t_x11 *x11,t_manager *man,t_filter *filter);
175 #endif