1 |
#ifndef __BASS_INTERFACE_H__ |
2 |
#define __BASS_INTERFACE_H__ |
3 |
|
4 |
|
5 |
|
6 |
typedef enum { MOLECULE, ATOM, BOND, BEND, TORSION, COMPONENT, |
7 |
POSITION, ASSIGNMENT, MEMBERS, CONSTRAINT, ORIENTATION, |
8 |
ZCONSTRAINT, RIGIDBODY, CUTOFFGROUP, BLOCK_END } event_enum; |
9 |
|
10 |
|
11 |
typedef struct{ |
12 |
double x; |
13 |
double y; |
14 |
double z; |
15 |
} position_event; |
16 |
|
17 |
typedef struct{ |
18 |
double phi; |
19 |
double theta; |
20 |
double psi; |
21 |
} orientation_event; |
22 |
|
23 |
typedef enum { STRING, INT, DOUBLE } interface_assign_type; |
24 |
|
25 |
typedef struct{ |
26 |
interface_assign_type asmt_type; |
27 |
char lhs[80]; |
28 |
union{ |
29 |
int ival; |
30 |
double dval; |
31 |
char sval[120]; |
32 |
}rhs; |
33 |
} assignment_event; |
34 |
|
35 |
typedef struct{ |
36 |
int nMembers; |
37 |
int *memberList; |
38 |
} members_event; |
39 |
|
40 |
typedef struct{ |
41 |
event_enum event_type; |
42 |
char* err_msg; |
43 |
|
44 |
union{ |
45 |
int blk_index; // block index |
46 |
position_event pos; |
47 |
orientation_event ornt; // use the same structure for orientation |
48 |
assignment_event asmt; |
49 |
members_event mbrs; |
50 |
double cnstr; // the constraint value |
51 |
} evt; |
52 |
} event; |
53 |
|
54 |
#ifdef __cplusplus |
55 |
extern "C" { |
56 |
#endif |
57 |
|
58 |
int event_handler( event* the_event ); |
59 |
|
60 |
#ifdef __cplusplus |
61 |
} |
62 |
#endif |
63 |
|
64 |
|
65 |
#endif // ifndef __BASS_INTERFACE_H__ |