File: molsurf.h

package info (click to toggle)
gdis 0.90-5
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 10,364 kB
  • ctags: 9,392
  • sloc: ansic: 71,121; perl: 298; sh: 115; python: 115; makefile: 33; xml: 26
file content (108 lines) | stat: -rw-r--r-- 3,538 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*
Copyright (C) 2003 by Sean David Fleming

sean@ivec.org

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

The GNU GPL can also be found at http://www.gnu.org
*/
/**************/
/* structures */
/**************/

struct surface_property_pak
{
	float	de;				/* distance to the nearest exernal atom */
	int		eType;			/* atomic number of the nearest external atom */
	float	di;				/* distance to the nearest internal atom */
	int		iType;			/* atomic number of the nearest internal atom */
	float	shape_index;	
	float	curvedness;		/* properties based on surface curvature */
	float	promol_den;	/* promolecule density, for Hirshfeld surface (== half pro crystal density) */
};

struct smv_pak
{
    gdouble value;
    gdouble colour[3];
    
    /* Added by JJM */
    gfloat property;						/* property should eventually be replaced by the struct */
	struct surface_property_pak properties;
    
    /* coords */
    gdouble x[3];
    gdouble rx[3];
    
    /* normal */
    gdouble n[3];
    gdouble nx[3];
    
    /* adjacent point */
    GSList *adj;
};

struct smt_pak
{
    struct smv_pak *point[3];
};



/**************/
/* prototypes */
/**************/

//void ms_properties(gint method, GSList *ms_points, struct model_pak *model);
void ms_colour_surface(gint, gint, GSList *, struct model_pak *);

void ms_dock_colour(gdouble *, gdouble, gdouble, gdouble);
void ms_epot_colour(gdouble *, gdouble, gdouble, gdouble);
void ms_afm_colour(gdouble *, gdouble, struct model_pak *);
void ms_hfs_colour(gdouble *, gdouble);
void ms_colour_by_de(GSList *, struct model_pak *);

void ms_colour_by_shape(GSList *points, struct model_pak *model, gint propertyType, gint method);


void ms_cube(gdouble, gint, gint, struct model_pak *);



/****************************************************************/
/* I've included these here because I am using them in molsurf, */
/* but they should probably go somewhere more sensible (JJM)	*/
/****************************************************************/
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#define MIN(a,b) (((a) < (b)) ? (a) : (b))

/****************************************************************/
/* Enumerated types for surface properties						*/
/*																*/ 
/* These values currently determine which property is 			*/
/* calculated, but they will eventually flag which property		*/
/* is currently displayed.										*/
/****************************************************************/
enum {	CURVEDNESS,			/* */
		SHAPE_INDEX,
		DE,					/* distance to the nearest atom outside the surface */
		DI,					/* distance to the nearest atom inside the surface */
		ETYPE,				/* atomic number of the nearest atom outside the surface */
		ITYPE,				/* atomic number of the nearest atom inside the surface */
		PROMOL_DEN,			/* total electron density from the promolecule (equals half the total procrystal density */ 
		AFM,				
		ELPOT,
		};