Update copyright statements and change license to LGPL
[alexxy/gromacs.git] / include / types / matrix.h
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
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.
11  *
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.
16  *
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.
21  *
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.
26  *
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.
34  *
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.
37  */
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 #include "simple.h"
44
45 typedef struct {
46   real r,g,b;
47 } t_rgb;
48
49 typedef struct {
50   char c1; /* should all be non-zero (and printable and not '"') */
51   char c2; /* 
52             * should all be zero (single char color names: smaller xpm's) 
53             * or should all be non-zero (double char color names: more colors)
54             */
55 } t_xpmelmt;
56
57 typedef short t_matelmt;
58
59 typedef struct {
60   t_xpmelmt code; /* see comment for t_xpmelmt */
61   const char *desc;
62   t_rgb rgb;
63 } t_mapping;
64
65 #define MAT_SPATIAL_X (1<<0)                        
66 #define MAT_SPATIAL_Y (1<<1)
67 /* Defines if x and y are spatial dimensions,
68  * when not, there are n axis ticks at the middle of the elements,
69  * when set, there are n+1 axis ticks at the edges of the elements.
70  */
71
72 typedef struct {
73   unsigned int flags; /* The possible flags are defined above */
74   int  nx,ny;
75   int  y0;
76   char title[256];
77   char legend[256];
78   char label_x[256];
79   char label_y[256];
80   gmx_bool bDiscrete;
81   real *axis_x;
82   real *axis_y;
83   t_matelmt **matrix;
84   int nmap;
85   t_mapping *map;
86 } t_matrix;
87   /* title      matrix title
88    * legend     label for the continuous legend
89    * label_x    label for the x-axis
90    * label_y    label for the y-axis
91    * nx, ny     size of the matrix
92    * axis_x[]   the x-ticklabels
93    * axis_y[]   the y-ticklables
94    * *matrix[]  element x,y is matrix[x][y]
95    * nmap       number of color levels for the output(?)
96    */
97
98 #ifdef __cplusplus
99 }
100 #endif
101