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,2013, 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.
52 /* Some window sizes */
59 eOSingle
, eOBond
, eOHBond
, eONR
63 eVNormal
, eVSpecial
, eVHidden
, evNR
67 eBThin
, eBFat
, eBVeryFat
, eBSpheres
, eBNR
71 esbNone
, esbRect
, esbTri
, esbTrunc
, esbNR
75 t_windata wd
; /* Mol window structure */
76 gmx_bool bShowHydrogen
; /* Show Hydrogens? */
77 int bond_type
; /* Show one of the above bondtypes */
78 int ePBC
; /* PBC type */
79 int boxtype
; /* Rectangular, Tric, TruncOct (display)*/
80 int realbox
; /* Property of the real box */
84 eObject eO
; /* The type of object */
85 eVisible eV
; /* Visibility status of the object */
86 unsigned long color
; /* The color (only when eV==evSpecial) */
87 atom_id ai
, aj
; /* The atom_id for i (and j if bond) */
88 real z
; /* The Z-coordinate for depht cueing */
92 t_blocka
*grps
; /* Blocks with atom numbers */
93 char **grpnames
; /* The names of the groups */
94 gmx_bool
*bDisable
; /* Group indexes out of natoms in TRX */
95 gmx_bool
*bShow
; /* Show a group ? */
99 * t_manager structure:
101 * This structure manages the display area for the gmx program.
102 * It reads the status file and sends messages when windows need to
108 const char *trajfile
;
109 int natom
; /* The number of atoms */
110 t_topology top
; /* topology */
112 real time
; /* The actual time */
113 rvec
*x
; /* The coordinates */
114 iv2
*ix
; /* The coordinates after projection */
115 real
*zz
; /* Z-coords */
116 matrix box
; /* The box */
117 int nobj
; /* The number of objects */
118 t_object
*obj
; /* The objects on screen */
119 gmx_bool
*bHydro
; /* TRUE for hydrogen atoms */
120 gmx_bool
*bLabel
; /* Show a label on atom i? */
121 char **szLab
; /* Array of pointers to labels */
122 unsigned long *col
; /* The colour of the atoms */
123 int *size
; /* The size of the atoms */
124 real
*vdw
; /* The VDWaals radius of the atoms */
125 gmx_bool
*bVis
; /* visibility of atoms */
126 gmx_bool bPbc
; /* Remove Periodic boundary */
127 gmx_bool bAnimate
; /* Animation going on? */
128 gmx_bool bEof
; /* End of file reached? */
129 gmx_bool bStop
; /* Stopped by user? */
130 gmx_bool bSort
; /* Sort the coordinates */
131 gmx_bool bPlus
; /* Draw plus for single atom */
132 int nSkip
; /* Skip n steps after each frame */
133 int nWait
; /* Wait n ms after each frame */
134 gmx_rmpbc_t gpbc
; /* For removing peridiocity */
136 t_windata wd
; /* The manager subwindow */
137 t_windata title
; /* Title window */
138 t_3dview
*view
; /* The 3d struct */
139 t_molwin
*molw
; /* The molecule window */
140 t_butbox
*vbox
; /* The video box */
141 t_butbox
*bbox
; /* The button box */
142 t_legendwin
*legw
; /* The legend window */
144 output_env_t oenv
; /* output env data */
147 extern t_manager
*init_man(t_x11
*x11
, Window Parent
,
148 int x
, int y
, int width
, int height
,
149 unsigned long fg
, unsigned long bg
,
150 int ePBC
, matrix box
, const output_env_t oenv
);
151 /* Initiate the display manager */
153 extern void move_man(t_x11
*x11
, t_manager
*man
, int width
, int height
);
154 /* Set the right size for this window */
156 extern void step_message(t_x11
*x11
, t_manager
*man
);
157 /* Send a message to the manager */
159 extern void set_file(t_x11
*x11
, t_manager
*man
, const char *trajectory
,
161 /* Read a new trajectory and topology */
163 extern void map_man(t_x11
*x11
, t_manager
*man
);
165 extern void move_man(t_x11
*x11
, t_manager
*man
, int width
, int height
);
167 extern gmx_bool
toggle_animate (t_x11
*x11
, t_manager
*man
);
169 extern gmx_bool
toggle_pbc (t_manager
*man
);
171 extern void no_labels(t_x11
*x11
, t_manager
*man
);
172 /* Turn off all labels */
174 extern void done_man(t_x11
*x11
, t_manager
*man
);
175 /* Clean up man struct */
177 extern void draw_mol(t_x11
*x11
, t_manager
*man
);
179 extern void create_visibility(t_manager
*man
);
181 extern void do_filter(t_x11
*x11
, t_manager
*man
, t_filter
*filter
);