1 /*
2  *  (c) 2004-2011 Iowa State University
3  *      see the LICENSE file in the top level directory
4  */
5 
6 /* Global Definitions:	Written by Brett Bode - January 1998
7 
8 	Machine specific data type and compiler directives should be
9 	placed in this file to be included in every other source file.
10 
11 	Created by Brett Bode  July 1994
12 	many additions and changes up to version 1.2 in January 1995
13 	Major revamping of the master data structure for multiple frames January 1995
14 	Most stuff moved elsewhere for the major rewrite done in September 1996
15 	Macintosh (PPC and 68K) directives generalized for Rhapsody 1/1998 BMB
16 
17 */
18 
19 #ifndef _GlobalDefs_
20 #define _GlobalDefs_
21 
22 //This needs to get put into the build system...
23 #define __wxBuild__
24 #define wxMacMolPlt_VERSION "7.7"
25 
26 //activate the following line to use the interactive editor
27 // please add CXXFLAGS=-DENABLE_INTERACTIVE_MODE to your configure step rather
28 // than changing this file!
29 #ifndef ENABLE_INTERACTIVE_MODE
30 #define ENABLE_INTERACTIVE_MODE
31 #endif
32 //Activate to allow quicktime movie export on Mac
33 //#define __MAC_USE_QUICKTIME__
34 
35 #ifdef __wxBuild__
36 #include "mmp_gl.h"
37 //When building on a Mac the following types will get picked up from system headers
38 //prior to 2.9 WXOSX_CARBON wasn't defined, but is implied. It seems easier to define it than
39 //complicate the checks elsewhere.
40 #if !wxCHECK_VERSION(2, 9, 0)
41 #ifdef __WXMAC__
42 #define __WXOSX_CARBON__
43 #endif
44 #endif
45 #ifndef __WXOSX_CARBON__
46 struct RGBColor {
47 	unsigned short 					red;						/*magnitude of red component*/
48 	unsigned short 					green;						/*magnitude of green component*/
49 	unsigned short 					blue;						/*magnitude of blue component*/
50 };
51 #endif
52 
53 #ifdef _MSC_VER
54 #define snprintf _snprintf
55 //VS apparently lacks these functions
56 int strcasecmp(const char * a, const char * b);
57 int strncasecmp(const char * a, const char * b, int l);
58 #endif
59 
60 typedef char * Ptr;
61 typedef unsigned char Boolean;
62 typedef unsigned char Str255 [256];
63 #endif
64 
65 // These are here because the ifdefs are broken right now.
66 #define MAX(x, y)		(((x)>(y)) ? (x) : (y))
67 #define MIN(x, y)		(((x)>(y)) ? (y) : (x))
68 
69 //#define ChipmanCode	1	//Define to include the Chipman solvent surface code
70 
71 void MessageAlert (const char * message);
72 
73 //Useful constants
74 #define	kBohr2AngConversion	0.52917724924	/*Bohrs to Angstroms*/
75 #define kAng2BohrConversion	1.889725988		/*Angstroms to Bohrs*/
76 #define kDebyeToAU			0.39342724704	/*Debyes to AUs for charge dipoles*/
77 #define kRadToDegree		57.29577951		//Radians to Degrees conversion factor
78 #define kPi					3.141592654
79 #define	kHartreeTokCalPMol	627.5098		//Convert Hartree to kCal/mole
80 #define kCosErrorTolerance	1.0001			//Dihedral tolerance for converting
81 #define kZeroTolerance		1.0e-7			//to/from internal coords
82 
83 typedef enum {
84 	MMP_NULL,
85 	MMP_ATOM,
86 	MMP_BOND,
87 	MMP_ANNOTATION,
88 	MMP_1DSURFACE
89 } MMP_object_t;
90 
91 #endif
92