ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libBASS/node_list.h
Revision: 1153
Committed: Tue May 11 04:21:52 2004 UTC (20 years, 4 months ago) by gezelter
Content type: text/plain
File size: 2082 byte(s)
Log Message:
BASS changes for adding CutoffGroups to molecules.  Also restructured
the plethora of cutoff radii into one cutoffRadius and one
switchingRadius.  Also removed the useMolecularCutoffs keyword

File Contents

# User Rev Content
1 mmeineke 377 #ifndef __NODE_LIST_H__
2     #define __NODE_LIST_H__
3    
4     /* enumerates the different types of nodes the statments can be */
5    
6     typedef enum { GLOBAL_HEAD, COMPONENT_HEAD,
7     MOLECULE_HEAD, ATOM_HEAD, BOND_HEAD, BEND_HEAD, TORSION_HEAD,
8 gezelter 988 MEMBERS_STMT, CONSTRAINT_STMT, ASSIGNMENT_STMT, POSITION_STMT,
9 gezelter 1153 ORIENTATION_STMT, ZCONSTRAINT_HEAD,
10     RIGIDBODY_HEAD, CUTOFFGROUP_HEAD } node_type;
11 mmeineke 377
12     /* a structure to hold the index of the members of a bond, bend, or torsion */
13    
14 gezelter 988 typedef struct members_data_tag{
15 gezelter 998 int nMembers;
16     int* memberList;
17 gezelter 988 } members_data;
18 mmeineke 377
19     /* a structure to hold constraint information */
20    
21     typedef struct constraint_data_tag{
22     double constraint_val;
23     } constraint_data;
24    
25     /* a structure to hold assignment info */
26    
27     typedef enum{ STR_ASSN, INT_ASSN, DOUBLE_ASSN } assign_type;
28    
29     typedef union{
30     int i_val;
31     double d_val;
32     char* str_ptr;
33     } assignment_value;
34    
35     typedef struct assignment_data_tag{
36     assign_type type;
37     char* identifier; // left hand side
38     assignment_value rhs; // right hand side
39     } assignment_data;
40    
41     /* a structure to hold the position information */
42    
43     typedef struct position_data_tag{
44     double x;
45     double y;
46     double z;
47     } position_data;
48    
49     /* a structure to hold the orientation information */
50    
51     typedef struct orientation_data_tag{
52 gezelter 998 double phi;
53     double theta;
54     double psi;
55 mmeineke 377 } orientation_data;
56    
57     /* here's the master node type. This is the node that will be strung
58     together by the yacc parser. Each statement will an individual
59     node. Block statements will act as branch nodes, pointing to their
60     own set of statement lists.*/
61    
62     typedef struct node_tag{
63     node_type type;
64     int index; // needed for atoms, bonds, etc.
65     struct node_tag* next_stmt; // the next statement
66     struct node_tag* prev_stmt; // the previous statement
67     struct node_tag* stmt_list; // the statment list if this is a block.
68    
69     /* this is a union to hold the statement data */
70    
71     union{
72 gezelter 988 members_data mbrs;
73 mmeineke 377 constraint_data cnstr;
74     assignment_data asmt;
75     position_data pos;
76     orientation_data ort;
77     } the_data;
78    
79     } node;
80    
81    
82    
83     #endif