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 * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
7 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
8 * and including many others, as listed in the AUTHORS file in the
9 * top-level source directory and at http://www.gromacs.org.
11 * GROMACS is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public License
13 * as published by the Free Software Foundation; either version 2.1
14 * of the License, or (at your option) any later version.
16 * GROMACS is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with GROMACS; if not, see
23 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
24 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 * If you want to redistribute modifications to GROMACS, please
27 * consider that scientific software is very special. Version
28 * control is crucial - bugs must be traceable. We will be happy to
29 * consider code for inclusion in the official distribution, but
30 * derived work must not be called official GROMACS. Details are found
31 * in the README & COPYING files - if they are missing, get the
32 * official version at http://www.gromacs.org.
34 * To help us fund GROMACS development, we humbly ask that you cite
35 * the research papers on the package. Check out http://www.gromacs.org.
43 #include "gromacs/fileio/trxio.h"
44 #include "gromacs/pbcutil/rmpbc.h"
45 #include "gromacs/topology/topology.h"
46 #include "gromacs/utility/real.h"
54 struct gmx_output_env_t
;
56 /* Some window sizes */
63 eOSingle
, eOBond
, eOHBond
, eONR
67 eVNormal
, eVSpecial
, eVHidden
, evNR
71 eBThin
, eBFat
, eBVeryFat
, eBSpheres
, eBNR
75 esbNone
, esbRect
, esbTri
, esbTrunc
, esbNR
79 t_windata wd
; /* Mol window structure */
80 bool bShowHydrogen
; /* Show Hydrogens? */
81 int bond_type
; /* Show one of the above bondtypes */
82 int ePBC
; /* PBC type */
83 int boxtype
; /* Rectangular, Tric, TruncOct (display)*/
84 int realbox
; /* Property of the real box */
88 eObject eO
; /* The type of object */
89 eVisible eV
; /* Visibility status of the object */
90 unsigned long color
; /* The color (only when eV==evSpecial) */
91 int ai
, aj
; /* The int for i (and j if bond) */
92 real z
; /* The Z-coordinate for depht cueing */
96 t_blocka
*grps
; /* Blocks with atom numbers */
97 char **grpnames
; /* The names of the groups */
98 bool *bDisable
; /* Group indexes out of natoms in TRX */
99 bool *bShow
; /* Show a group ? */
103 * t_manager structure:
105 * This structure manages the display area for the gmx program.
106 * It reads the status file and sends messages when windows need to
112 const char *trajfile
;
113 int natom
; /* The number of atoms */
114 t_topology top
; /* topology */
116 real time
; /* The actual time */
117 rvec
*x
; /* The coordinates */
118 iv2
*ix
; /* The coordinates after projection */
119 real
*zz
; /* Z-coords */
120 matrix box
; /* The box */
121 int nobj
; /* The number of objects */
122 t_object
*obj
; /* The objects on screen */
123 bool *bHydro
; /* true for hydrogen atoms */
124 bool *bLabel
; /* Show a label on atom i? */
125 char **szLab
; /* Array of pointers to labels */
126 unsigned long *col
; /* The colour of the atoms */
127 int *size
; /* The size of the atoms */
128 real
*vdw
; /* The VDWaals radius of the atoms */
129 bool *bVis
; /* visibility of atoms */
130 bool bPbc
; /* Remove Periodic boundary */
131 bool bAnimate
; /* Animation going on? */
132 bool bEof
; /* End of file reached? */
133 bool bStop
; /* Stopped by user? */
134 bool bSort
; /* Sort the coordinates */
135 bool bPlus
; /* Draw plus for single atom */
136 int nSkip
; /* Skip n steps after each frame */
137 int nWait
; /* Wait n ms after each frame */
138 gmx_rmpbc_t gpbc
; /* For removing peridiocity */
140 t_windata wd
; /* The manager subwindow */
141 t_windata title
; /* Title window */
142 t_3dview
*view
; /* The 3d struct */
143 t_molwin
*molw
; /* The molecule window */
144 t_butbox
*vbox
; /* The video box */
145 t_butbox
*bbox
; /* The button box */
146 t_legendwin
*legw
; /* The legend window */
148 gmx_output_env_t
*oenv
; /* output env data */
151 extern t_manager
*init_man(t_x11
*x11
, Window Parent
,
152 int x
, int y
, int width
, int height
,
153 unsigned long fg
, unsigned long bg
,
154 int ePBC
, matrix box
, gmx_output_env_t
*oenv
);
155 /* Initiate the display manager */
157 extern void move_man(t_x11
*x11
, t_manager
*man
, int width
, int height
);
158 /* Set the right size for this window */
160 extern void step_message(t_x11
*x11
, t_manager
*man
);
161 /* Send a message to the manager */
163 extern void set_file(t_x11
*x11
, t_manager
*man
, const char *trajectory
,
165 /* Read a new trajectory and topology */
167 extern void map_man(t_x11
*x11
, t_manager
*man
);
169 extern void move_man(t_x11
*x11
, t_manager
*man
, int width
, int height
);
171 extern bool toggle_animate (t_x11
*x11
, t_manager
*man
);
173 extern bool toggle_pbc (t_manager
*man
);
175 extern void no_labels(t_x11
*x11
, t_manager
*man
);
176 /* Turn off all labels */
178 extern void done_man(t_x11
*x11
, t_manager
*man
);
179 /* Clean up man struct */
181 extern void draw_mol(t_x11
*x11
, t_manager
*man
);
183 extern void do_filter(t_x11
*x11
, t_manager
*man
, t_filter
*filter
);